-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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
vscode leaking tty fd's #182212
Comments
Reported in the past here: #58814 @deepak1556 + @rzhao271 you might know how to fix this? |
I logged in this morning to find all my TTY fd's used up again. |
This might be a regression from microsoft/node-pty#589, will investigate. |
I can confirm that used ttys count is incremented with every task execution (count can be seen in macos terminal new window/tab). After ~450 build tasks you cannot even create real terminal window without restarting vscode to free stuff again. |
Current workaround how to clean tty count without restarting vscode everyday:
Then you need to |
Please pay attention to this regression between 1.77.3 and 1.78.0. |
Still not fixed. Every build task run on macos allocates new virtual terminal, after day of build runs you will need to restart vscode. Very annoying. @deepak1556 please, at least add |
Does this issue occur when all extensions are disabled?: TBD
macOS 13.3.1 (a) (22E772610a)
Steps to Reproduce:
I've had this happen twice now, once today and last time was on May 5th.
I try to connect to my remote session and I get this:
I try to jump into my macOS terminal, which I typically always have open anyway and run some commands, ssh works fine of course, perplexed... I wound up trying to open a new tab with a new terminal and it fails...
After much digging I find this:
vscode is using all of my available TTY fd's.
This happened in the course of 2 days (I rebooted the machine 2 days ago).
It is worth noting right now I have 3 vscode windows open, all disconnected from the remote.
Closing all vscode windows (but with the vscode process still running as happens on macOS until you cmd+q it) does not change this number.
Actually quitting vscode gives me all my tty fd's back.
(let's assume from now on when I say fd I'm referring to /dev/ptmx fd's)
On a brand new vscode instance (no remote connection or anything), just a window open there are 0 open fd's from vscode.
Opening one terminal in vscode there are now 2 fd's opened.
After closing that terminal there is 1 fd open.
Opening a new terminal there are 3 fd's open.
Closing that terminal there are 2 fd's open now.
Open a new terminal and there are now 4 fd's (seeing a pattern here).
Opening a 2nd terminal there are 6 fd's open.
Close that 2nd terminal 5 fd's.
Connect to a remote, which automatically opens a new terminal, 8 fd's.
Close the remote terminal, still 8 fd's open.
Open a new remote terminal, still 8 fd's open (some re-use here?)
Open 3 more remote terminals, still 8 fd's open.
Go back to the original local window and open a remote project, 10 fd's open. (seems remote's share the same local fd's between terminals in one window)
Close that window, create a new window and open the same remote project, 13 fd's open.
Closing all open windows (but keeping vscode running) still 13 fd's open
Open a new window connected to the same remote+project, 16 fd's open.
Based on this pattern it looks like:
The text was updated successfully, but these errors were encountered: