Rework locking and eventing during startup and shutdown to alleviate some VT issues#2525
Rework locking and eventing during startup and shutdown to alleviate some VT issues#2525
Conversation
…ring shutdown activities.
…Remove extraneous attempts at cleanup.
…igure out why everything else doesn't.
…t leaves such that we can clean everything up appropriately.
…ge to tell the input thread it is allowed to operate under the lock the IO thread is holding. Without this, the signal thread breaking and shutting down may be able to acquire the lock in a split second and cause unexpected oddities to occur for shutting down console context while it is being allocated for a client.
|
Please see MicrosoftDocs/Console-Docs#100 for my proposal on documentation updates. |
…so they don't hang forever.
… the main IO thread because it's untenable to pass the lock in that way.
…o it can unblock them by opening thread and we're good.
…s that tear down process cleanly when they are destroyed.
|
OK. I need to adapt the little test utility into a feature test for this to ensure that it remains working and stable into the future and then this will be good to go. |
…urcing it from Dustin's sample utility that was used to help figure this out.
…ually be validated.
…ose what is going wrong with *some* of the permutations of this test in the CI.
|
Table of the most recent failure run (since run data is trimmed over time).
I updated the test to provide more verbose logging of what it is doing while it runs so I can maybe figure out where exactly it's hanging. The table above is the runs that failed. I can't tell if it's always these 5 or if those are a random 5 because the previous run data was pruned. On my local machine, I cannot seem to reproduce this issue. So I'm trying to come up with a way to figure out what's going wrong in the lab. The error code given is We'll see what happens in this CI run and I'll keep looking tomorrow. |
|
OK current CI run failures: 4, 7, 13, 16, 18, 22. Same error code. So it's not specific tests... its something about the tests overall. |
|
OK. Isolating the runs resolves this issue. This is now ready for review. |
zadjii-msft
left a comment
There was a problem hiding this comment.
I mostly just have questions and nits
…re per PR feedback. Also removed a hungarian.
Summary of the Pull Request
Adjusts the startup and shutdown behavior of most threads in the console host to alleviate race conditions that are either exacerbated or introduced by the VT PTY threads.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed