-
Notifications
You must be signed in to change notification settings - Fork 419
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
tracer: unaligned atomic operation causes panic #1418
Comments
Hello! Thanks for pointing this out to us. Elsewhere in datadog we've been moving to standardize on go.uber.com/atomic which should prevent these alignment errors. I've made an internal bug ticket for us to fix this. |
knusbaum
added a commit
that referenced
this issue
Aug 23, 2022
sync/atomic has several issues. Among them is that it causes a panic when a field isn't correctly aligned. Alignment must me manually ensured and is easy to forget. Instead, we will use go.uber.org/atomic which provides wrappers around Go's standard library atomics. The wrappers ensure we always use atomic operations to load and store the values, and also prevent the alignment issue. Fixes #1418
knusbaum
added a commit
that referenced
this issue
Aug 23, 2022
sync/atomic has several issues. Among them is that it causes a panic when a field isn't correctly aligned. Alignment must be manually ensured and is easy to forget. Instead, we will use go.uber.org/atomic which provides wrappers around Go's standard library atomics. The wrappers ensure we always use atomic operations to load and store the values, and also prevent the alignment issue. Fixes #1418
knusbaum
added a commit
that referenced
this issue
Sep 13, 2022
sync/atomic has several issues. Among them is that it causes a panic when a 64-bit field isn't correctly aligned. Alignment must be manually ensured and is easy to forget. Instead, we will use 32-bit atomic integers which do not require manual alignment. We can eventually trade them out for Go's new atomics APIs that were introduced in go1.19, but we have to wait until 1.18 falls out of our supported versions. Fixes #1418
knusbaum
added a commit
that referenced
this issue
Sep 15, 2022
sync/atomic has several issues. Among them is that it causes a panic when a 64-bit field isn't correctly aligned. Alignment must be manually ensured and is easy to forget. Instead, we will use 32-bit atomic integers which do not require manual alignment. We can eventually trade them out for Go's new atomics APIs that were introduced in go1.19, but we have to wait until 1.18 falls out of our supported versions. Fixes #1418
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe this to be related to the issue here DataDog/datadog-go#260, as you can see from these logs,
ddtrace panics here
dd-trace-go/ddtrace/tracer/spancontext.go
Line 212 in 03a3099
dd-trace-go/ddtrace/tracer/spancontext.go
Line 164 in 03a3099
This is running in GCP on an n2 node.
The text was updated successfully, but these errors were encountered: