This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients ezio.melotti, michael.foord, pitrou, serhiy.storchaka, vstinner
Date 2015-03-30.08:48:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427705302.21.0.688012243657.issue23799@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2015-03-30 08:48:22vstinnersetrecipients: + vstinner, pitrou, ezio.melotti, michael.foord, serhiy.storchaka
2015-03-30 08:48:22vstinnersetmessageid: <1427705302.21.0.688012243657.issue23799@psf.upfronthosting.co.za>
2015-03-30 08:48:22vstinnerlinkissue23799 messages
2015-03-30 08:48:21vstinnercreate