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

ioctl(2) failed exception #220

Open
Tyriar opened this issue Sep 5, 2018 · 4 comments
Open

ioctl(2) failed exception #220

Tyriar opened this issue Sep 5, 2018 · 4 comments
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities

Comments

@Tyriar
Copy link
Member

Tyriar commented Sep 5, 2018

Maybe the pty has already been destroyed?

Stack 
Error: ioctl(2) failed.
at UnixTerminal.resize (/node_modules.asar/node-pty/lib/unixTerminal.js:227:13)
/vs/workbench/parts/terminal/node/terminalProcess.ts#123:19 (resize)
/vs/workbench/parts/terminal/electron-browser/terminalProcessManager.ts#158:17 (setDimensions)
/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts#999:72 (onComplete)
/vs/base/common/winjs.base.js#1191:0 (_notify)
/vs/base/common/winjs.base.js#867:0 (enter)
/vs/base/common/winjs.base.js#1089:0 (_run)
/vs/base/common/winjs.base.js#1057:0 (c)
/vs/workbench/parts/terminal/electron-browser/terminalProcessManager.ts#63:4 (call)
/vs/base/common/event.ts#140:15 (fire)
/vs/workbench/parts/terminal/electron-browser/terminalProcessManager.ts#132:24 (call)
/vs/base/common/event.ts#140:15 (fire)
/vs/workbench/parts/terminal/node/terminalProcess.ts#104:25 (_sendProcessId)
/vs/workbench/parts/terminal/node/terminalProcess.ts#69:8

VS Code issue: microsoft/vscode#57976

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities labels Sep 5, 2018
@jerch
Copy link
Collaborator

jerch commented Sep 5, 2018

@Tyriar:
Hard to say, this error will be thrown whenever the file descriptor fd is invalid: https://github.com/Microsoft/node-pty/blob/1c3cd4710c48ad45615da562d10d76162ad43c39/src/unix/pty.cc#L368

Possible reasons:

  • fd is something else (not a pty master at all)
  • pty already closed and fd is stale
  • fd number got reattched to something else (e.g. some other file)

Any more info when this exactly happens?

Might be useful to output errno to see the actual error.

@Tyriar
Copy link
Member Author

Tyriar commented Sep 10, 2018

No more info unfortunately, these are just errors that we're seeing in the wild.

@Tyriar
Copy link
Member Author

Tyriar commented May 1, 2019

I don't see how this could happen atm as this._fd is synchronously in the ctor and resize must have been called after it, but the repro in microsoft/vscode#71078 seems to indicate that resizing again will fix it.

Tyriar added a commit that referenced this issue May 1, 2019
@Tyriar Tyriar added this to the 0.8.1 milestone May 1, 2019
@Tyriar Tyriar self-assigned this May 1, 2019
@Tyriar Tyriar removed the help wanted Issues identified as good community contribution opportunities label May 1, 2019
@Tyriar Tyriar removed this from the 0.8.1 milestone May 1, 2019
@Tyriar Tyriar added the help wanted Issues identified as good community contribution opportunities label May 1, 2019
@Tyriar Tyriar removed their assignment May 1, 2019
@Tyriar
Copy link
Member Author

Tyriar commented May 1, 2019

Adding a better error that should reveal why the call failed in #285

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

2 participants