Skip to content

Commit

Permalink
Fix arm64 panics by updating google/snappy library to latest, 0.0.4 (#…
Browse files Browse the repository at this point in the history
…11396)

Pick up golang/snappy#56 to handle arm64 architectures to fix panics. tldr; Golang 1.16 changed `memmove` implementation for arm64 requiring additional cpu registers that snappy wasn't preserving in its assembly implementation.

Other projects have experienced this issue as well, searching for `encode_arm64.s:666` on your favorite search engine will reveal some.  Vault updated the dependency earlier this August: hashicorp/vault#12371 .

I believe this issue affects Nomad 1.2.x and 1.1.x. Nomad 1.0.x use Golang 1.15 and isn't affected. However, backporting the change to 1.0.x should be harmless.

Fixed #11385 .
  • Loading branch information
Mahmood Ali committed Oct 27, 2021
1 parent 796a91b commit 5f6ad87
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/11396.txt
@@ -0,0 +1,3 @@
```release-note: bug
server: Fixed a panic on arm64 platform when dispatching a job with a payload
```
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -46,7 +46,7 @@ require (
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/fsouza/go-dockerclient v1.6.5
github.com/golang/protobuf v1.5.0
github.com/golang/snappy v0.0.2
github.com/golang/snappy v0.0.4
github.com/google/go-cmp v0.5.5
github.com/gorilla/websocket v1.4.2
github.com/gosuri/uilive v0.0.4
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Expand Up @@ -298,8 +298,9 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw=
github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
Expand Down

0 comments on commit 5f6ad87

Please sign in to comment.