You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something I've again noticed only in 3.10 (i think?).
Synopsis
in tractor as part of goodboy/tractor#165 we have a custom pdbpp.Pdb and a new WIP custom SIGINT handler which is designed to more or less prevent clobbering of the pdbpp REPL when in use by a child process. The idea is there is a global process tree lock that prevents more then one in-tree sub-process from using the root's TTY at once. This normally works well (except for a couple edge cases that are being ironed out / deferred).
When inside the pdp repl we want to shield off SIGINT to avoid it causing downstream cancellation in (nested) child subprocs which is one of the main reasons for the custom handler and instance flag adjustments:
It seems that when sending next commands during a "pdp instance session" (where we are interacting and waiting on either of continue or quit to be issued) it can go into some sort of weird state where the .curframe is not set on the instance:
Digging into this I found that self.curframe seems to be first set inside the stdlib's code: Pdp.setup() which leads me to believe somehow the instance can get to a place where it's been created but .setup() hasn't yet been called?
I'm not entirely sure where to start to meta-debug this issue 😂 and would love to know if just trying to call longlist from a handler is totally not recommended and if there is some alternative / better way to accomplish this desired UX.
look forward to your thoughts and recommendations 😎
The text was updated successfully, but these errors were encountered:
Something I've again noticed only in 3.10 (i think?).
Synopsis
in
tractor
as part of goodboy/tractor#165 we have a custompdbpp.Pdb
and a new WIP custom SIGINT handler which is designed to more or less prevent clobbering of thepdbpp
REPL when in use by a child process. The idea is there is a global process tree lock that prevents more then one in-tree sub-process from using the root's TTY at once. This normally works well (except for a couple edge cases that are being ironed out / deferred).tractor
is built ontrio
and requires special management of the stdlib'spdb
flags in order to avoid breaking structured-concurrency style KBI handling:breakpoint()
builtin to address thisIntended UX
When inside the pdp repl we want to shield off SIGINT to avoid it causing downstream cancellation in (nested) child subprocs which is one of the main reasons for the custom handler and instance flag adjustments:
.nosigint = True
which tells thepdbp
instance not to override with it's own SIGINT handler and,.allow_kbint = True
which is to tell the custom handler to always raise KBI if it did get called. ).The desired behavior is to simply have a log message tell the user that some actor is currently in debug so SIGINT is being ignored until the debugger is released (by sending
continue
orquit
) and in this case we simply want to.do_longlist()
at the last frame to avoid seeing only that log msg and instead put the user "back to where they were" console-ux wise.Current issue
It seems that when sending
next
commands during a "pdp instance session" (where we are interacting and waiting on either ofcontinue
orquit
to be issued) it can go into some sort of weird state where the.curframe
is not set on the instance:Digging into this I found that
self.curframe
seems to be first set inside the stdlib's code:Pdp.setup()
which leads me to believe somehow the instance can get to a place where it's been created but.setup()
hasn't yet been called?I'm not entirely sure where to start to meta-debug this issue 😂 and would love to know if just trying to call longlist from a handler is totally not recommended and if there is some alternative / better way to accomplish this desired UX.
look forward to your thoughts and recommendations 😎
The text was updated successfully, but these errors were encountered: