Skip to content

Commit

Permalink
[FIXED] Panic when monitoring enabled on non 64bit architectures
Browse files Browse the repository at this point in the history
This is due to an unaligned 64-bit atomic operation. Move the
field at top of structure with 64-bit aligned preceding fields.

Resolves #2011

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
  • Loading branch information
kozlovic committed Mar 9, 2022
1 parent 1712ee3 commit dde235a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ type Info struct {

// Server is our main struct.
type Server struct {
// Fields accessed with atomic operations need to be 64-bit aligned
gcid uint64
// How often user logon fails due to the issuer account not being pinned.
pinnedAccFail uint64
stats
mu sync.Mutex
kp nkeys.KeyPair
Expand Down Expand Up @@ -266,9 +269,6 @@ type Server struct {
// Keep track of what that user name is for config reload purposes.
sysAccOnlyNoAuthUser string

// How often user logon fails due to the issuer account not being pinned.
pinnedAccFail uint64

// This is a central logger for IPQueues when the number of pending
// messages reaches a certain thresold (per queue)
ipqLog *srvIPQueueLogger
Expand Down

0 comments on commit dde235a

Please sign in to comment.