-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Insiders failed to launch for test run using vscode-test ("Could not delete obsolete instance handle" - sock file missing?) #86382
Comments
Actually, I'm seeing this reliably. Most of my bots only run one set of tests, but the one that runs multiple is seeing this on Insiders on macOS all the time. Anything I can do to get more info that might help understand what's happening? |
@dbaeumer I see some old issues where you know more about the socket files created. Do you have any pointers why this might happen? |
@octref for communication between various processes we use socket files under Linux / MacOS. The one mentioned here is for the main process. May be @bpasero knows about it. I was on issues for the extension host and LSP server. The problem looks like someone tries to delete a non existing socket file ( |
I can answer if I know the source process and the target process. We have different IPC mechanisms in place depending on that. |
@DonJayamanne Did the problem in #81652 go away or did you find a solution? |
Unfortunately this didn't go away for me. |
I don't think this is specific to |
@DonJayamanne @DanTup would be good if you can try to reproduce this running out of sources, then we can possibly add some logging code |
I'm not sure how to make this run from source on GH Actions, but here's a repo that repros the issue on GH Actions: https://github.com/DanTup/vscode-sock-issue-86382 |
This comes from vscode/src/vs/code/electron-main/main.ts Line 245 in 3d5b61c
Which means that Code (1) wasn't able to connect to an existing socket file and (2) wasn't able to delete the socket file. So it can't proceed. Deleting the socket file is the recover action. If that fails we can't do anything else. Do these tests run concurrently? If so, you must prevent that and run them serially, or run them all with separate user data dirs. |
@joaomoreno they do not run currently. I included a link to the code that runs the tests:
|
Does it work if you |
It doesn't appear to. I added: await new Promise((resolve) => setTimeout(resolve, 5000)); And still have the same failure: https://github.com/DanTup/vscode-sock-issue-86382/runs/393328115#step:7:54 |
Can you check whether that directory exists at the time the error occurs?
|
That's the folder passed to VS Code's If you fork the repo, it should all be set up to run using GitHub Actions when you commit, so it may be easier for you to debug there directly. |
Unfortunately I cannot afford to spend a day investigating an obscure user CI issue, surely you can understand. I'm more than happy to give you a general direction on where to look. In any case, I would still write some code that checks for that folder's existence once |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
Rob mentioned he's running into this when running from js-debug, see the linked issue for details. I postulated it might be related to our forceful killTree function that causes some bad/missing teardown behavior in VS Code. |
For me this is easy to repro. I can investigate more if someone can point me towards where these socket files are created and if you know why their path lengths might be limited. Seems like the path length is limited to 103 characters.
|
103 is exactly right: https://nodejs.org/api/net.html#net_identifying_paths_for_ipc_connections |
Here is my suggested fix #91931 |
Added comment to the PR: #91931 (review) Given that this is one instance and it's even a CI and not an actual use case, please just use a shorter user data dir. Is that possible? |
Will do this instead
|
Add warning about long generated IPC paths, fix #86382
Needs to be in short dir name, see microsoft/vscode#86382
Needs to be in short dir name, see microsoft/vscode#86382
Needs to be in short dir name, see microsoft/vscode#86382
Needs to be a short dir name, see microsoft/vscode#86382
This fixes the following error: WARNING: IPC handle [...] is longer than 103 chars, try a shorter --user-data-dir Could not delete obsolete instance handle Error: ENOENT: no such file or directory This is a workaround for microsoft/vscode#86382. When using a long path for --user-data-dir, on OSX VS Code could only be started once. Restarting VS Code would result in the error given above.
This fixes the following error: WARNING: IPC handle [...] is longer than 103 chars, try a shorter --user-data-dir Could not delete obsolete instance handle Error: ENOENT: no such file or directory This is a workaround for microsoft/vscode#86382. When using a long path for --user-data-dir, on OSX VS Code could only be started once. Restarting VS Code would result in the error given above.
This fixes the following error: WARNING: IPC handle [...] is longer than 103 chars, try a shorter --user-data-dir Could not delete obsolete instance handle Error: ENOENT: no such file or directory This is a workaround for microsoft/vscode#86382. When using a long path for --user-data-dir, on OSX VS Code could only be started once. Restarting VS Code would result in the error given above.
I don't have repro steps for this (nor do I know how common it is), but it seems like this came up in #81652 but the issue was closed by the bot and it doesn't seem like it was addressed.
I'm running tests on GitHub Actions - this one using macOS. I use vscode-test to run the tests like this:
This is called multiple times with different
testFolder
andworkspaceFolder
params. One test run was fine, but then I got this error (which then repeated for every subsequent invocation in the same way):Is this something VS Code can recover better from? It's particularly bad on GitHub Actions where it's not possible to re-run individual steps (so I have to re-run a whole 1-hour run to retry this) - though I appreciate that's hardly VS Code's fault :-)
The text was updated successfully, but these errors were encountered: