Repository navigation
test: deflake test-fastutf8stream-periodicflush - #67355
Open
christianaurichzm wants to merge 1 commit into
Open
christianaurichzm wants to merge 1 commit into
christianaurichzm wants to merge 1 commit into
Conversation
The manual flush case called destroy() right after flush(). destroy() closes the fd without waiting for the write that flush() started, so under load the close can win and the write fails with EBADF. The file was also read on a 500 ms timer instead of after the flush. Destroy the stream and read the file from the flush callback. Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67355 +/- ##
==========================================
- Coverage 90.69% 90.69% -0.01%
==========================================
Files 797 797
Lines 279572 279572
Branches 53778 53788 +10
==========================================
- Hits 253569 253565 -4
- Misses 16287 16297 +10
+ Partials 9716 9710 -6 🚀 New features to boost your workflow:
|
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.
test-fastutf8stream-periodicflushfailed twice in the 2026-11-09 reliability report withEBADFon write.The manual flush case calls
flush()and thendestroy()right away.destroy()closes the fd without waiting for the write thatflush()started, so on a busy machine the close can happen first and the write fails. The file was also read on a 500 ms timer instead of after the flush.This moves the
destroy()and the read into the flush callback.It doesn't fail for me locally, but delaying every
fs.write()by 50 ms with the preload below gives the same stack trace as CI. With it the test fails 196/200 on main and 0/200 with this change.Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-11-09.md