Message274530
Thanks for the reply! I've managed to reproduce the issue without using ctypes, so we can exclude ctypes as the cause of the problem :)
The bug only occurs for me after hundreds of iterations of the script, so it is very intermittent.
From my results, it appears the signal handler is called, but the exception isn't caught in the try block (this matches your result).
From the call stack it appears the exception handler is called at
"print 'unexcepted'", which is after the try block.
Interestingly, if I place a print after time.sleep, I cannot repro this issue. Maybe there is a race between the signal handler execution and execution of the try block in the main thread? Adding the print might slow down the main thread enough that the race disappears.
I don't know the source that well, so I'll need to do some digging to get any more information.
I hope this helps!
-George Slavin |
|
Date |
User |
Action |
Args |
2016-09-06 06:47:04 | gslavin | set | recipients:
+ gslavin, eryksun, Andre Merzky |
2016-09-06 06:47:04 | gslavin | set | messageid: <1473144424.13.0.571105092332.issue27889@psf.upfronthosting.co.za> |
2016-09-06 06:47:04 | gslavin | link | issue27889 messages |
2016-09-06 06:47:04 | gslavin | create | |
|