Skip to content
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

Avoiding "write EPIPE process.send" error on exit #13774

Merged
merged 1 commit into from
Oct 24, 2016
Merged

Avoiding "write EPIPE process.send" error on exit #13774

merged 1 commit into from
Oct 24, 2016

Conversation

daserge
Copy link
Contributor

@daserge daserge commented Oct 14, 2016

Repro steps:

  • Add vscode-react-native extension,
  • Run dev version of VS Code,
  • Attach a debugger to the VS Code (Attach to Extension host),
  • Close dev version of VS Code,
  • Observe that process.send(data) fails with stack:"Error: write EPIPE\n at exports._errnoException (util.js:1026:11)\n at process.target._send (internal/child_process.js:654:20)\n at process.target.send (internal/child_process.js:538:19)\n at f:\\coho\\react-native\\vscode\\out\\vs\\workbench\\node\\file:\\F:\\coho\\react-native\\vscode\\src\\vs\\workbench\\node\\extensionHostProcess.ts:40:13\n at sendAccumulated (f:\\coho\\react-native\\vscode\\out\\vs\\platform\\extensions\\common\\file:\\F:\\coho\\react-native\\vscode\\src\\vs\\platform\\extensions\\common\\ipcRemoteCom.ts:257:3)\n at _combinedTickCallback (internal/process/next_tick.js:67:7)\n at process._tickCallback (internal/process/next_tick.js:98:9)" error.

@mention-bot
Copy link

@daserge, thanks for your PR! By analyzing the history of the files in this pull request, we identified @egamma, @jrieken and @alexandrudima to be potential reviewers.

@msftclas
Copy link

Hi @daserge, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Sergey Shakhnazarov (Akvelon)). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@bpasero bpasero self-assigned this Oct 15, 2016
@bpasero
Copy link
Member

bpasero commented Oct 16, 2016

I am not convinced about this change because it basically stops all VSCode-to-Extension communication as soon as termination is triggered. However in extensionHostMain#terminate() we still give extensions some time to deactivate and it could be that during deactivation there is still some communication happening to the VSCode side from the extension (or the other way around).

Unless there is a real problem here from seeing the EPIPE error I would suggest to leave this as is.

@jrieken jrieken removed their assignment Oct 17, 2016
@msftclas
Copy link

@daserge, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, MSBOT;

@alexdima alexdima added this to the October 2016 milestone Oct 24, 2016
@alexdima alexdima merged commit bdc5eef into microsoft:master Oct 24, 2016
alexdima added a commit that referenced this pull request Oct 24, 2016
Avoiding "write EPIPE process.send" error on exit
@alexdima
Copy link
Member

alexdima commented Oct 24, 2016

@daserge Thank you for the contribution! ❤️

@bpasero Dirk and I saw this happening a lot in the shutdown phase, and it is all unexpected. At least on Windows, the renderer process basically sends __$terminate and then disappears.

fyi @dbaeumer we won't get anymore errors in talking back to the main process.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants