microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.59k stars 29.03k forks source link

conpty process blocked update on Windows #225719

Open connor4312 opened 2 months ago

connor4312 commented 2 months ago

I attempted to update Insiders today using the usual "apply update and restart" action and ran into the following error. It looks like some console-related processes blocked update. No VS Code windows were open.

image

The command line of the process doing the blocking was:

"c:\Users\conno\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\node_modules.asar.unpacked\node-pty\build\Release\conpty\OpenConsole.exe" --headless --inheritcursor --width 80 --height 30 --signal 0x638 --server 0x69c

I am using the new windowsUseConptyDll setting, if that matters.

joaomoreno commented 2 months ago

https://github.com/microsoft/vscode/issues/225160

deepak1556 commented 1 month ago

Upon killing the processes hold the lock and taking the update, the restored terminals show as disconnected, and I could not create new terminals until I restarted vscode:

image

Edit: so far 4 for 4 on hitting this each time I update Insiders

Originally posted by @connor4312 in https://github.com/microsoft/vscode/issues/225160#issuecomment-2293757400

deepak1556 commented 1 month ago

@connor4312 I am looking to repro but maybe I am missing some steps, can you confirm. Is there any particular set of terminal commands that trigger this issue ?

connor4312 commented 1 month ago

That's right. But specifically, I usually have the vscode-copilot repo open which has its long running watch tasks, so that may also be a part of it.

deepak1556 commented 1 month ago

Didn't have any luck with the copilot repo as well, can you try the following steps before applying the next update

Screenshot 2022-08-23 200440

connor4312 commented 1 month ago

Thanks, sent!

deepak1556 commented 1 month ago

Thanks for the profile, based on the process lifetimes I was able to backtrack the steps that might repro the issue and I now have a reliable repro,

I feel the scenario during the update might have been the same, @connor4312 just to validate this scenario can you check if update fails when you don't have any debugging session.

connor4312 commented 1 month ago

I updated Insiders today without a debugging session and didn't run into the issue 🙂

Tyriar commented 1 month ago

I saw this just now:

Image Image

connor4312 commented 6 days ago

This broke my Insiders build today, I think I tried to cancel setup when the issue happened and then I opened Insiders again to see if that would work without digging out LockHunter. The update failed and then gave the "antivirus might have interfered with the update" error, and I had to reinstall Insiders at that point.

connor4312 commented 5 days ago

Today and for the mid-day Insiders yesterday I was much more careful about the update

just to validate this scenario can you check if update fails when you don't have any debugging session.

This does happen even when there is no debugging session active. In both cases I had the task terminals open for Copilot Chat, so I suspect maybe task reconnection logic is related to this issue

Tyriar commented 4 days ago

@deepak1556 was going to check this out when he's free 🙏

deepak1556 commented 4 days ago

Didn't have much cycles this milestone due to my vacation, I will look into this in the next debt week.