Skip to content

Small cleanups to slowjam attack - #134

Merged
carlaKC merged 2 commits into
masterfrom
fix-slowjam-teardown
Jul 7, 2026
Merged

Small cleanups to slowjam attack#134
carlaKC merged 2 commits into
masterfrom
fix-slowjam-teardown

Conversation

@carlaKC

@carlaKC carlaKC commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Investigating hanging issue from virtual clock, some low hanging fruit which I believe may be causing the sim to hang.

carlaKC and others added 2 commits July 7, 2026 11:32
The jamming interceptor only removed the payment from `jamming_payments`
on the sleep (hold-time-elapsed) arm of the select. On the shutdown arm
it returned without removing, leaving the entry behind. `run_attack`'s
teardown loop waits for that set to drain, so a shutdown that landed
while a payment was held would leave the loop spinning on a set that
could never empty.

Move the removal after the select so both the hold-time and shutdown
paths untrack the payment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The teardown loop bound the `jamming_payments` guard to the whole loop
body, so it held the mutex across the 5-minute `clock.sleep`. It also had
no shutdown exit, relying solely on the set draining.

Scope the lock to just the `is_empty` check so the guard drops before the
sleep, and add a shutdown arm to the wait so the loop exits promptly on
teardown instead of polling against a set that may not drain.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@carlaKC
carlaKC merged commit f6842a7 into master Jul 7, 2026
2 checks passed
@carlaKC

carlaKC commented Jul 7, 2026

Copy link
Copy Markdown
Owner Author

Trivial cleanups, merged without review.

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