Michael Niksa
Michael Niksa
Beautiful, thank you! @tyriar
@Tyriar, OK. I'm working on a fix for the one specific stack/repro I had right now above. I have a solution for that particular race, but it revealed a deadlock...
> @miniksa so https://github.com/microsoft/node-pty/blob/3e645898f83370db2894cdde09ac180235e1cfb7/src/win/conpty.cc#L438 should move above the ClosePseudoConsole call? No, I mean the handles `hIn` and `hOut` inside your `pty_baton` that you got from opening up the session. `hShell`...
@zadjii-msft, to totally fix this I need to re-evaluate https://github.com/microsoft/terminal/blob/ff87190823ea699a7eee4dafda34358ee0caffa4/src/interactivity/base/ServiceLocator.cpp#L39-L46. I don't have full context on the issue you fixed in the past, so I don't want to break that...
> I just hit the hang when closing a regular terminal (not a task) which has `PSEUDOCONSOLE_INHERIT_CURSOR` set to 0. Killing conhost freed up the UI again. Next time you...
Here is a second interlock that can occur later in the shutdown process: ``` . 0 Id: 29ec.45ac Suspend: 0 Teb: 000000c2`af097000 Unfrozen # Child-SP RetAddr Call Site 00 000000c2`af2ff9c8...
On the plus side, I'm making progress. On the minus side, for every race condition I resolve here, I find some more.
OK. I fixed as many races and locks as I could. @sbatten, @Tyriar There will still be a situation where you close the pseudoconsole too fast that I cannot resolve....
This caused many, many issues when imported to Windows so it had to be reverted. Reactivating as we'll have to refine it further going forward.
@JustinGrote, to be 100% clear, VS Code can fix this on the client end by properly threading the handles received from the ConPTY. The hang is because all of the...