Message239583
> In this case all started threads left dangling and make MemotyError even more probably
Oh, I didn't know that. Good catch.
test_support_start_threads.patch looks good to me and it looks like a nice enhancement.
But would it be possible to emit a warning if a thread hangs?
For example, try to join with a timeout of 60 seconds, and then display a warning, and retry with a timeout of 120 seconds, then display a second warning, etc.
Maybe we may even give up after a timeout (ex: 5 minutes, or 15 minutes, it's up to you). An exception must be raised in this case. You can use faulthandler.dump_traceback() to display the traceback of all threads in this case.
I hope that my concern is more theorical, but it would reduce the duration of tests when the test suite is stuck (which is quite common), and so being able to test more changesets per day.
--
I noticed that under low memory condition, some tests hang because Python doesn't handle notify the "parent thread" that the "child thread" fails to start. So the parent thread is stuck and nothing happens. Well, I'm not sure that it's related to this issue. At least, test_support_start_threads.patch doesn't help. |
|
Date |
User |
Action |
Args |
2015-03-30 08:48:22 | vstinner | set | recipients:
+ vstinner, pitrou, ezio.melotti, michael.foord, serhiy.storchaka |
2015-03-30 08:48:22 | vstinner | set | messageid: <1427705302.21.0.688012243657.issue23799@psf.upfronthosting.co.za> |
2015-03-30 08:48:22 | vstinner | link | issue23799 messages |
2015-03-30 08:48:21 | vstinner | create | |
|