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

[1.0.3 -> main] Fix flaky nodeos_snapshot_diff_test due to a race condition #885

Merged
merged 7 commits into from
Oct 4, 2024

Conversation

linh2931
Copy link
Member

@linh2931 linh2931 commented Oct 3, 2024

Forwards #875.

Recently, nodeos_snapshot_diff_test fails in almost every CICD run.

This is due to a race condition that at the startup of head mode node, net thread and http thread can start to work in different order. If http thread processes schedule_snapshot request after net thread starts to sync with the irreversible mode node, schedule_snapshot request will miss the scheduled block number. If it is before net thread starts to sync with the irreversible mode node, schedule_snapshot request will catch the scheduled block number and the snapshot is taken.

This PR changes to start up the head mode node while the irreversible mode node is down so that net thread will not sync, make schedule_snapshot request, and finally restart irreversible node.

Test run in CICD for 3 times. No failure happened.

Resolves #846

@ericpassmore ericpassmore added the test-bug A test is not working as was intended. label Oct 4, 2024
@ericpassmore
Copy link
Contributor

Note:start
category: Tests
component: Snapshot
summary: Fix flaky nodeos_snapshot_diff_test due to a race condition.
Note:end

@linh2931 linh2931 merged commit af51472 into main Oct 4, 2024
36 checks passed
@linh2931 linh2931 deleted the merge_snapshot_diff_test_fix branch October 4, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-bug A test is not working as was intended.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure: nodeos_snapshot_diff_if_test
3 participants