Repository navigation
Conversation
An fd released with closeSync() can be reused by background I/O before FileHandle.close() runs in the thread pool, so closing it can succeed. Construct the handle around a high invalid fd to keep the native EBADF rejection path deterministic. Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-10-15.md Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex
aduh95
approved these changes
Oct 15, 2026
aduh95
left a comment
Contributor
There was a problem hiding this comment.
Switching to internal API is not very satisfying, but I guess the test still does its job of validating the error shape
Collaborator
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66750 +/- ##
=======================================
Coverage 90.48% 90.49%
=======================================
Files 797 797
Lines 277491 277491
Branches 53318 53332 +14
=======================================
+ Hits 251091 251116 +25
+ Misses 16793 16782 -11
+ Partials 9607 9593 -14 🚀 New features to boost your workflow:
|
watilde
approved these changes
Oct 15, 2026
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.
An fd released with closeSync() can be reused by background I/O before FileHandle.close() runs in the thread pool, so closing it can succeed. Construct the handle around a high invalid fd to keep the native EBADF rejection path deterministic.
Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-10-15.md
Assisted-by: Codex