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] Fix flaky nodeos_snapshot_diff_test due to a race condition #875

Merged
merged 4 commits into from
Oct 3, 2024

Conversation

linh2931
Copy link
Member

@linh2931 linh2931 commented Oct 2, 2024

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

@heifner heifner changed the base branch from main to release/1.0 October 2, 2024 21:01
@linh2931 linh2931 added the test-bug A test is not working as was intended. label Oct 2, 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 fb33083 into release/1.0 Oct 3, 2024
36 checks passed
@linh2931 linh2931 deleted the snapshot_diff_test_fix branch October 3, 2024 21:11
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