Skip to content
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

test(stages): fix deadlock with multiple static file writers #7011

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented Mar 6, 2024

Fixes #7007

Opening multiple static files writers can cause a deadlock due to a shared underlying DashMap. If two static file segments get into the same shard, we deadlock.

reth (alexey/stages-test-utils-deadlock) cargo test -p reth-stages --no-run
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.69s
  Executable unittests src/lib.rs (target/debug/deps/reth_stages-97c9591b70959ba5)reth (alexey/stages-test-utils-deadlock) for run in {1..50}; do target/debug/deps/reth_stages-97c9591b70959ba5 execute_intermediate_commit stage_checkpoint_pruned execute_sender_recovery | rg 'test result: ok'; done | wc -l
      50

@shekhirin shekhirin added C-bug An unexpected or incorrect behavior A-staged-sync Related to staged sync (pipelines and stages) C-test A change that impacts how or what we test A-static-files Related to static files labels Mar 6, 2024
Copy link
Member

@emhane emhane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so it was just bug in the test not in lib, good

@shekhirin shekhirin added this pull request to the merge queue Mar 6, 2024
Merged via the queue into main with commit dd6742e Mar 6, 2024
27 checks passed
@shekhirin shekhirin deleted the alexey/stages-test-utils-deadlock branch March 6, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-staged-sync Related to staged sync (pipelines and stages) A-static-files Related to static files C-bug An unexpected or incorrect behavior C-test A change that impacts how or what we test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky tests in stages
2 participants