-
Notifications
You must be signed in to change notification settings - Fork 3.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
tracing: panic due to "getting first from empty ring buffer" #75045
Comments
sql/tests.TestCreateRandomSchema failed with artifacts on master @ 365b4da8bd02c06ee59d2130a56dec74ffc9ce21:
Help
See also: How To Investigate a Go Test Failure (internal)
|
Actually, was only interested in the last failure, the first looks unrelated ("panic: getting first from empty ring buffer"). |
+cc @andreimatei, might have something to do with tracing. |
Also seen in I can repro with this test under stress. Somehow the maintained size of the structured recording buffer seems to get desynchronized from the buffer's contents. Nothing in this area seems to have changed recently, so I'm not sure why we're seeing these failures all of a sudden. |
Surprisingly or not, this bisected to #73876. |
This patch fixes a bug leading to corruption of one of the Span's recording buffers. We had broken code like the following: ``` for _, e := range c.StructuredRecords { s.recordInternalLocked(&e, &s.mu.recording.structured) } ``` `recordInternalLocked(ptr)` takes ownership of ptr, so the `&e` is broken because `e` keep being reassigned. The bug was causing buffer elements to essentially be overwritten. In turn, this was leading to inconsistencies in the accounting of the size of the buffer's elements - we were maintaining a size sum that was diverging from the overwritten reality. Fixes cockroachdb#74994 Fixes cockroachdb#75045 Release note: None
Fixing in #75099 |
75099: tracing: fix corruption of structured recording buffer r=andreimatei a=andreimatei This patch fixes a bug leading to corruption of one of the Span's recording buffers. We had broken code like the following: ``` for _, e := range c.StructuredRecords { s.recordInternalLocked(&e, &s.mu.recording.structured) } ``` `recordInternalLocked(ptr)` takes ownership of ptr, so the `&e` is broken because `e` keep being reassigned. The bug was causing buffer elements to essentially be overwritten. In turn, this was leading to inconsistencies in the accounting of the size of the buffer's elements - we were maintaining a size sum that was diverging from the overwritten reality. Fixes #74994 Fixes #75045 Release note: None Co-authored-by: Andrei Matei <[email protected]>
This patch fixes a bug leading to corruption of one of the Span's recording buffers. We had broken code like the following: ``` for _, e := range c.StructuredRecords { s.recordInternalLocked(&e, &s.mu.recording.structured) } ``` `recordInternalLocked(ptr)` takes ownership of ptr, so the `&e` is broken because `e` keep being reassigned. The bug was causing buffer elements to essentially be overwritten. In turn, this was leading to inconsistencies in the accounting of the size of the buffer's elements - we were maintaining a size sum that was diverging from the overwritten reality. Fixes cockroachdb#74994 Fixes cockroachdb#75045 Release note: None
sql/tests.TestCreateRandomSchema failed with artifacts on master @ 365b4da8bd02c06ee59d2130a56dec74ffc9ce21:
Fatal error:
Stack:
Log preceding fatal error
Help
See also: How To Investigate a Go Test Failure (internal)
Parameters in this failure:
This test on roachdash | Improve this report!
The text was updated successfully, but these errors were encountered: