Repository navigation
fix(test): stop watch and doc_read tests failing under load - #1877
Merged
Merged
Conversation
A test that forks while a watch test holds the lock gives its child a copy of the open lock file until the child execs. The lock then stays taken after the test dropped it, so the next acquire saw it busy. Wait until the lock is free before a test relies on that. Signed-off-by: igorjs <2278164+igorjs@users.noreply.github.com>
A fake converter written with fs::write could still be open for writing when another test forked, so under load its first start failed as busy or stalled in the system scan. Write it, flush it, and run it once with --version, retrying while busy. Bound the sigterm start wait and the too-long check by what they prove rather than short fixed numbers. Signed-off-by: igorjs <2278164+igorjs@users.noreply.github.com>
igorjs
marked this pull request as ready for review
November 19, 2026 09:30
igorjs
enabled auto-merge
November 19, 2026 09:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two groups of tests failed at random under load. Both causes are in the tests.
watchthe_running_watch_carries_out_an_approved_item_on_its_next_cycleand siblings. The lock is anflock. When another test forks, the child holds a copy of the open lock file until it execs, so the lock stays taken after the guard was dropped. Tests now wait until it is free.doc_read, includinga_converter_that_uses_too_much_memory_is_stoppedandsection_99. The fake converter was written withfs::writeand could still be open for writing when a sibling forked, so its first start failed as busy. It is now flushed, closed and run once with--version, retrying while busy. Two fixed time bounds now match what they prove.The memory watchdog already measures the converter's own process group, so it was not the cause. The
cli_smokememory rebuild limit did not reproduce in 6 loaded runs and is unchanged.Notes for reviewers
Full suite,
--test-threads 64, 12yesprocesses. The watch test failed in 4 of 12 runs before and 0 of 12 after. Thedoc_readsuite failed in 8 of 8 runs before and 0 of 10 after. Threereal_home,healandservice_managerlib tests failed in every loaded run, before and after, and pass alone. They are not touched.