-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal/child_process: call postSend on error #4752
internal/child_process: call postSend on error #4752
Conversation
@indutny sorry, I'm not familiar enough with the code to comment |
@sam-github no worries @bnoordhuis you are my last hope |
@indutny With the short commit message and lack of test I'm having a hard time seeing this in context. Will be happy to review if at least one of those two can be improved/added. |
998145a
to
1feb860
Compare
@trevnorris how about this? |
LGTM but "certain callbacks invoked" sounds a bit vague; I'd write "two callbacks are invoked, (Aside, it's "These callbacks", not "This callbacks.") |
Call `obj.postSend` in error case of `process.send()`. The `net.Socket`'s handle should not be leaked. Note that there are two callbacks invoked on handles when they are sent to the child process over IPC pipes. These callbacks are specified by `handleConversion` object, and during send two of them are invoked: * `send` * `postSend` Now for `net.Socket` in particular, `postSend` performs clean up by closing the actual uv handle. However this clean up will not happen in one of the branches. This pull request aims to fix this.
1feb860
to
994071b
Compare
@bnoordhuis thank you! Does this one look better? I didn't want to repeat |
If I'm understanding this one correctly, then LGTM but would prefer additional sign off |
marking as lts-watch defensively... but not sure it's appropriate to land there yet. Need more input |
Commit log LGTM. |
@jasnell hm... it should be probably a good idea, though, I'm not sure if it matters that much for LTS. Never seen a bug that caused this, this is just a sanity check commit. |
Landed in 6712a1f, thank you! |
Call `obj.postSend` in error case of `process.send()`. The `net.Socket`'s handle should not be leaked. Note that there are two callbacks invoked on handles when they are sent to the child process over IPC pipes. These callbacks are specified by `handleConversion` object, and during send two of them are invoked: * `send` * `postSend` Now for `net.Socket` in particular, `postSend` performs clean up by closing the actual uv handle. However this clean up will not happen in one of the branches. This pull request aims to fix this. PR-URL: #4752 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Call `obj.postSend` in error case of `process.send()`. The `net.Socket`'s handle should not be leaked. Note that there are two callbacks invoked on handles when they are sent to the child process over IPC pipes. These callbacks are specified by `handleConversion` object, and during send two of them are invoked: * `send` * `postSend` Now for `net.Socket` in particular, `postSend` performs clean up by closing the actual uv handle. However this clean up will not happen in one of the branches. This pull request aims to fix this. PR-URL: #4752 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Call `obj.postSend` in error case of `process.send()`. The `net.Socket`'s handle should not be leaked. Note that there are two callbacks invoked on handles when they are sent to the child process over IPC pipes. These callbacks are specified by `handleConversion` object, and during send two of them are invoked: * `send` * `postSend` Now for `net.Socket` in particular, `postSend` performs clean up by closing the actual uv handle. However this clean up will not happen in one of the branches. This pull request aims to fix this. PR-URL: #4752 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Call `obj.postSend` in error case of `process.send()`. The `net.Socket`'s handle should not be leaked. Note that there are two callbacks invoked on handles when they are sent to the child process over IPC pipes. These callbacks are specified by `handleConversion` object, and during send two of them are invoked: * `send` * `postSend` Now for `net.Socket` in particular, `postSend` performs clean up by closing the actual uv handle. However this clean up will not happen in one of the branches. This pull request aims to fix this. PR-URL: #4752 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Call `obj.postSend` in error case of `process.send()`. The `net.Socket`'s handle should not be leaked. Note that there are two callbacks invoked on handles when they are sent to the child process over IPC pipes. These callbacks are specified by `handleConversion` object, and during send two of them are invoked: * `send` * `postSend` Now for `net.Socket` in particular, `postSend` performs clean up by closing the actual uv handle. However this clean up will not happen in one of the branches. This pull request aims to fix this. PR-URL: #4752 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Call `obj.postSend` in error case of `process.send()`. The `net.Socket`'s handle should not be leaked. Note that there are two callbacks invoked on handles when they are sent to the child process over IPC pipes. These callbacks are specified by `handleConversion` object, and during send two of them are invoked: * `send` * `postSend` Now for `net.Socket` in particular, `postSend` performs clean up by closing the actual uv handle. However this clean up will not happen in one of the branches. This pull request aims to fix this. PR-URL: nodejs#4752 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Call
obj.postSend
in error case ofprocess.send()
. Thenet.Socket
's handle should not be leaked.Noticed this while looking through the code. I'm not sure if any reliable test case could be written for it, but the problem seems to be kind of obvious to me.
R = @bnoordhuis or @sam-github
cc @nodejs/collaborators