-
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
Do we need to detect KBI for debugging? #148
Comments
Ok, so figured out what I think is the main bug to do with the #129 stuff.
This more often then not seems to result in some kind of deadlock where the parent is waiting on the child to terminate but the child is waiting on the lock from the parent somehow, I think. |
Alright dug slightly into using
|
Disabled It's still not solving the main issue with debugging where if you ctl-c from the |
I think the issue has been resolved by allocating a separate cancel scope for the service nursery scheduled in Ahhh! It's probably that the channel server is blocking for the task to finish and since this tty lock request task is not put in the rpc task set the "all channels are ded" event never comes in because we have a task locked in the parent from the service nursery that's never cancelled. This looks to be the source of the deadlock and should be resolved now 🏄 I'm gonna close this once some tests come in. The good news is that working through the |
I've been running into this problem using the new debugger support from #129:
ctrl-c
while already in debuggerSIGINT
during a request for the tty lock in the root-parent from a child processIn some cases this causes awkward crashing with errors other then the expected KBI and in the worst case the program actually hangs since the child causes deadlock trying to acquire the parent's tty lock (and the parent is waiting for the child to terminate - speaking of which this might be a good test as part of #145).
I got some tips in the
trio
gitter channel.@oremanj said:
@njsmith followed up with:
To which I suggested separate
SIGINT
handlers per proc, to which he responsed:@oremanj also mentioned:
So I think the solution might be best accomplished via the suggestion of ignoring
SIGINT
in child procs and using our cancel method call to accomplish that. Also, thedeliver_cancel
system @oremanj mentioned is on my list to check out.The text was updated successfully, but these errors were encountered: