Skip to content

fs: check closing_ in FileHandle::Close - #39472

Closed
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:maybe-fix-flaky-filehandle-readablestream-test
Closed

fs: check closing_ in FileHandle::Close#39472
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:maybe-fix-flaky-filehandle-readablestream-test

Conversation

@jasnell

Copy link
Copy Markdown
Member

Fix possible flaky failure. Keep uv_fs_close from being called twice
on the same fd.

Since I'm not able to reproduce the failure locally, I don't yet know if this fixes the flaky failure in CI.

Refs: #39464
Signed-off-by: James M Snell jasnell@gmail.com

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels Jul 20, 2021
@nodejs-github-bot

This comment has been minimized.

@jasnelljasnell changed the title fs: closing closing_ in FileHandle::Closefs: check closing_ in FileHandle::CloseJul 20, 2021
@jasnell
jasnellforce-pushed the maybe-fix-flaky-filehandle-readablestream-test branch from e77b5fd to 71343eaCompareJuly 20, 2021 15:30
@nodejs-github-bot

This comment has been minimized.

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@jasnell

Copy link
Copy Markdown
MemberAuthor

Ok, I think I got it properly identified. The FileHandle::DoShutdown was not checking to see if the FileHandle was already closed or closing.

Fix possible flaky failure. Keep uv_fs_close from being called twice
on the same fd.
Refs: nodejs#39464
Signed-off-by: James M Snell <jasnell@gmail.com>
@jasnell
jasnellforce-pushed the maybe-fix-flaky-filehandle-readablestream-test branch from 72a4621 to 39ea214CompareJuly 20, 2021 21:19
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@jasnelljasnell added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. and removed needs-ci PRs that need a full CI run. labels Jul 20, 2021
danbev pushed a commit that referenced this pull request Jul 22, 2021
Fix possible flaky failure. Keep uv_fs_close from being called twice
on the same fd.
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #39472
Refs: #39464
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@danbev

Copy link
Copy Markdown
Contributor

Landed in f1d3533.

@danbevdanbev closed this Jul 22, 2021
targos pushed a commit that referenced this pull request Jul 25, 2021
Fix possible flaky failure. Keep uv_fs_close from being called twice
on the same fd.
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #39472
Refs: #39464
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
@BethGriggsBethGriggs mentioned this pull request Jul 26, 2021
BethGriggs pushed a commit that referenced this pull request Jul 29, 2021
Fix possible flaky failure. Keep uv_fs_close from being called twice
on the same fd.
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #39472
Refs: #39464
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.c++Issues and PRs that require attention from people who are familiar with C++.fsIssues and PRs related to the fs subsystem / file system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@jasnell@nodejs-github-bot@danbev@mcollina@tniessen@targos