Hang on startup when awaiting terminal PID
See original GitHub issueWorking with current master, I’m getting an occasional (about 50% of the time) hang on startup in Windows PowerShell.
This is again mysterious like the last issue I opened:
However, there’s no dispose issue here.
Debugging the progress of this seems to interfere with the possibility of this deadlock occurring.
The log progresses to this point:
2020-02-24 13:57:16.584 -08:00 [DBG] Starting server, deregistering host logger and registering shutdown listener
2020-02-24 13:57:16.842 -08:00 [DBG] Creating LSP transport with endpoint InOut pipe: PSES_lffxipsq.u5q
2020-02-24 13:57:16.848 -08:00 [VRB] Writing session file
2020-02-24 13:57:16.848 -08:00 [VRB] Writing session started
2020-02-24 13:57:16.869 -08:00 [VRB] Assembly resolve event fired for Microsoft.WSMan.Management.resources, Version=3.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35
2020-02-24 13:57:16.870 -08:00 [VRB] Assembly resolve event fired for Microsoft.WSMan.Management.resources, Version=3.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35
2020-02-24 13:57:16.906 -08:00 [VRB] Loaded System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
2020-02-24 13:57:16.906 -08:00 [VRB] Loaded System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
2020-02-24 13:57:16.920 -08:00 [DBG] Session file written to c:\Users\roholt\Documents\Dev\vscode-PowerShell\sessions\PSES-VSCode-1088-643948 with content:
{"status":"started","languageServiceTransport":"NamedPipe","languageServicePipeName":"\\\\.\\pipe\\PSES_lffxipsq.u5q","debugServiceTransport":"NamedPipe","debugServicePipeName":"\\\\.\\pipe\\PSES_vtetuqus.ss5"}
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (3 by maintainers)
Top Results From Across the Web
5.6. Checklist: Terminal Hangs When I Log In
Enter the command kill PID (Section 24.12), where PID is the identification number from the previous step. If that doesn't work, try kill...
Read more >Why is my terminal freezing up? - Ask Ubuntu
usually when the terminal freezes it is caused by another application in the background using too many resources, like the CPU or Disk...
Read more >Reboot from the command line (stuck processes) - Ask Different
I tried again with sudo reboot -nq and after 15 minutes the machine rebooted. I don't know it one of processes finally died...
Read more >How to get pid of just started process - Server Fault
In the second case, the pid will be set only if the first command succeeds. You can get the process id from $pid...
Read more >How to wait in bash for several subprocesses to finish, and ...
wait also (optionally) takes the PID of the process to wait for, and with $! you get the PID of the last command...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Unfortunately there’s really not much to go on. When I next reproduce it I’ll take a full screenshot
Just to document a bit more, I can reproduce this with the following change from https://github.com/PowerShell/vscode-powershell/commit/d431617d6997c75fdce35342323e016f1bbaf271:
So startup pauses, since the client never opens a named pipe. The debugging the server shows it waiting on a named pipe connection.
In the client, pausing the debugger shows us stopped here:
For whatever reason we are left awaiting the
processIdvalue.I’ve only seen reports of this on Windows.