Skip to content

debugger_test.sh: ignore the order of waiting threads - #33

Merged
LarryRuane merged 1 commit into
masterfrom
debugger-test-order
Nov 10, 2026
Merged

LarryRuane merged 1 commit into
masterfrom
debugger-test-order

Conversation

@LarryRuane

Copy link
Copy Markdown
Owner

CI's debuggers job failed on master at d4dd7c8, a docs-only commit. gdb and lldb listed the two waiting threads at the barrier stop in opposite orders.

ptbtall walks the wait lists by bucket, and the bucket comes from hashing the channel address. The test's channels are on the stack, and the stack addresses differ between gdb and lldb, so the bucket order can differ too. It looks like it only passed before because the addresses happened to hash the same way.

The script now sorts each run of waiting threads before comparing. Running and ready threads keep their order, since the ready list is FIFO. Passes locally with gdb and lldb-22.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SR7v9BVsFrHiEhQBSqZmAs

ptbtall lists waiting threads by wait-list bucket, and the bucket comes
from hashing the channel address. The channels in test_barrier() are on
the stack, whose addresses differ between gdb and lldb (their inferior
environments differ), so the two can list the same waiters in different
orders. CI failed this way on master at d4dd7c8 with no code change.
Sort each run of waiting threads before comparing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SR7v9BVsFrHiEhQBSqZmAs
@LarryRuane
LarryRuane merged commit 3d66eb7 into master Nov 10, 2026
32 checks passed
@LarryRuane
LarryRuane deleted the debugger-test-order branch November 10, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant