Repository navigation
systrap: shift the spinning queue by the stub gap - #15573
Conversation
stubSpinningThreadQueueAddr was the only stub region after the gap that didn't move with it. With a small gap, the relocated sysmsg stacks or the context queue land on top of it, and stubs spin forever in spinning_queue_remove_first. Fixes gvisor#15572 Assisted-by: Claude Code Signed-off-by: Nahum Litvin <[email protected]>
|
The new test only shows the queue is misplaced. To see the actual hang I put a small repro tool on a branch: https://github.com/NahumLitvin/gvisor/tree/systrap-triage/tools/systrap-triage From a go branch checkout, as root on Linux: It builds master with a debug-only patch that forces
On a hang the collector shows the queue address inside the |
|
@avagin @konstantin-s-bogom could you take a look? One line plus a layout test. @avagin this is the spinning queue from 0cbe6fc, the repro tool is linked in the comment above. |
konstantin-s-bogom
left a comment
There was a problem hiding this comment.
Thanks for the fix
`stubSpinningThreadQueueAddr` was the only region after the gap that didn't move with it, so a small `gap` puts the queue on top of a sysmsg stack and stubs spin forever in `spinning_queue_remove_first`. Adds the missing shift and a test that the queue sits between the context queue and context region. On arm64 the test fails 3/3 without the fix and passes 3/3 with it. Fixes #15572 Assisted-by: Claude Code FUTURE_COPYBARA_INTEGRATE_REVIEW=#15573 from NahumLitvin:systrap-spinq-gap c7f458a PiperOrigin-RevId: 996619645
stubSpinningThreadQueueAddrwas the only region after the gap that didn't move with it, so a smallgapputs the queue on top of a sysmsg stack and stubs spin forever inspinning_queue_remove_first.Adds the missing shift and a test that the queue sits between the context queue and context region. On arm64 the test fails 3/3 without the fix and passes 3/3 with it.
Fixes #15572
Assisted-by: Claude Code