-
Notifications
You must be signed in to change notification settings - Fork 12
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
Root tty hangs #234
Root tty hangs #234
Conversation
Need to squash / drop a few of these commits. |
We're not actually using this but it's for reference if we do end up needing it. The std lib's `pdb` internals override SIGINT handling whenever one enters the debugger repl. Force a handler that kills the tree if SIGINT is triggered from the root actor, otherwise ignore it since supervised children should be managed already. This resolves an issue with guest mode where `pdb` causes SIGINTs to be swallowed resulting in the host loop never terminating the process tree.
Always try to release the root tty lock on broken connection errors.
26de034
to
e083362
Compare
e083362
to
76342ed
Compare
@@ -298,8 +298,8 @@ async def _open_and_supervise_one_cancels_all_nursery( | |||
f'child {_debug._global_actor_in_debug}\n' | |||
'Waiting on tty lock to release..') | |||
|
|||
with trio.CancelScope(shield=True): | |||
await debug_complete.wait() | |||
# with trio.CancelScope(shield=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may end up wanting to keep this but right now it's causing too many hangs.
@@ -62,7 +62,7 @@ def _trio_main( | |||
""" | |||
# Disable sigint handling in children; | |||
# we don't need it thanks to our cancellation machinery. | |||
signal.signal(signal.SIGINT, signal.SIG_IGN) | |||
# signal.signal(signal.SIGINT, signal.SIG_IGN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well keep for reference.
Debugger improvements to avoid even further tty clobbering edge cases and potential root actor hangs when the debug lock is acquired but the child completes or intends to release it but the root never is notified.