-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: unaligned 64-bit atomic operation on AWS Fargate X86_64 CPU architecture #2337
Comments
I've forked the library to test and this commit mshaeon@32e6e16 fixed the panic issue. |
As per golang/go#41970 any 64-bit variable that is accessed atomically must be 64-bit aligned and this can be ensured by making it the first entry in the struct. Fixes #2337
As per golang/go#41970 any 64-bit variable that is accessed atomically must be 64-bit aligned and this can be ensured by making it the first entry in the struct. Fixes #2337
@wricardo thanks for reporting this. I've applied the fix, but I wasn't able to find a linter that would prevent us from (re-)introducing this problem in the future, as none of the general fieldalignment tools seem to have any special consideration for atomic values |
@dnwe I coincidentally went through this same exercise, if you want to steal this chunk of code: twmb/franz-go@b76183a#diff-9a979a1e38ba79e2c75e54c4bf21fe1a2a1b935e1736666565f992e634dadd0fR27-R59 it will ensure 64 bit atomic access is aligned for arm 32 bit, which would prevent this issue here as well |
Versions
Configuration
I'm using default configurations
sarama.NewConfig()
Problem Description
Deploying my consumer to AWS Fargate on X86_64 CPU architecture, causes panic:
According to this issue golang/go#41970 the issue might be fixed by changing the order of the field
updateMetaDataMs int64
in theclient
struct defined in theclient.go
The text was updated successfully, but these errors were encountered: