Skip to content

Conversation

@killagu
Copy link
Contributor

Fixes: #47948

@nodejs-github-botnodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels May 10, 2023
@bnoordhuis
Copy link
Member

bnoordhuis commented May 11, 2023

General observation: the way _write() synchronously invokes cb() is wrong(ish). Node normally follows the iron-clad rule that callbacks are always invoked asynchronously, otherwise you can end up overflowing the stack. Ex.:

functionagain(){stream._write(buf,'utf8',again);// RangeError: Maximum call stack size exceeded }

edit: oh nevermind, this is stream.Writable._write() and the streams code takes care of deferring the callback.

@killagukillaguforce-pushed the fix/stdout_error branch 3 times, most recently from 3726f80 to 7c8c81fCompareMay 11, 2023 07:39
@kvakilkvakil added the request-ci Add this label to start a Jenkins CI on a PR. label May 12, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 12, 2023
@nodejs-github-bot
Copy link
Collaborator

@killagu
Copy link
ContributorAuthor

ping @bnoordhuis

@lpincalpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 21, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 21, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@lpinca
Copy link
Member

Some failures on Windows seems related. @killagu can you take a look?

@killagu
Copy link
ContributorAuthor

Of course.

@killagu
Copy link
ContributorAuthor

Sorry, I'm still looking for a suitable Windows machine to run Node.js compilation and testing. I will provide an update once there is progress.

@lpincalpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 26, 2023
@killagu
Copy link
ContributorAuthor

@lpinca I've identified the cause. On the Windows platform, it requires manual release of the fd; otherwise, it will block the process from cleaning up the temporary directory upon exiting. Could you please trigger the CI again? Thank you.

@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 26, 2023
@nodejs-github-bot
Copy link
Collaborator

@killagu
Copy link
ContributorAuthor

😅 Force push let the ci down fatal: reference is not a tree: 7bcb45c7a81c3bba6e9ffa96754329c9facd4aa4.

@nodejs-github-bot
Copy link
Collaborator

@lpinca
Copy link
Member

Also one final request. Can you please change the commit message to something like this?

fs: call the callback with an error if writeSync fails 

Thank you.

Catch SyncWriteStream write file error. Fixes: nodejs#47948 Signed-off-by: killagu <[email protected]>
@killagu
Copy link
ContributorAuthor

killagu commented Jun 26, 2023

It's updated. Thanks very much for review and lots of help.

@lpincalpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 26, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 26, 2023
@nodejs-github-bot
Copy link
Collaborator

@lpincalpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 26, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 26, 2023
@nodejs-github-botnodejs-github-bot merged commit 32eb492 into nodejs:mainJun 26, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 32eb492

RafaelGSS pushed a commit that referenced this pull request Jul 3, 2023
Catch SyncWriteStream write file error. Fixes: #47948 Signed-off-by: killagu <[email protected]> PR-URL: #47949 Reviewed-By: Luigi Pinca <[email protected]>
@RafaelGSSRafaelGSS mentioned this pull request Jul 3, 2023
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Catch SyncWriteStream write file error. Fixes: nodejs#47948 Signed-off-by: killagu <[email protected]> PR-URL: nodejs#47949 Reviewed-By: Luigi Pinca <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Catch SyncWriteStream write file error. Fixes: nodejs#47948 Signed-off-by: killagu <[email protected]> PR-URL: nodejs#47949 Reviewed-By: Luigi Pinca <[email protected]>
ruyadorno pushed a commit that referenced this pull request Sep 10, 2023
Catch SyncWriteStream write file error. Fixes: #47948 Signed-off-by: killagu <[email protected]> PR-URL: #47949 Reviewed-By: Luigi Pinca <[email protected]>
@ruyadornoruyadorno mentioned this pull request Sep 10, 2023
ruyadorno pushed a commit that referenced this pull request Sep 13, 2023
Catch SyncWriteStream write file error. Fixes: #47948 Signed-off-by: killagu <[email protected]> PR-URL: #47949 Reviewed-By: Luigi Pinca <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fsIssues and PRs related to the fs subsystem / file system.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

process.stdout may memleak if write file failed.

5 participants

@killagu@bnoordhuis@nodejs-github-bot@lpinca@kvakil