STINNER Victor added the comment:

asyncio_subprocess_watchdog.patch:

* add test_asyncio.watchdog.setup_watchdog(): use 
faulthandler.dump_traceback_later() to kill the process if it hangs more than 
'timeout' seconds (do nothing if faulthandler is not present, eg. on other 
Python VMs than CPython)
* add SubprocessTestsMixin.debug_info(): return returncode, stdout, stderr
* use debug_info() on functions using subprocess may may hang

The patch should give more information on the child process if it hangs. I 
didn't see the test_asyncio hang on "AMD64 Snow Leop 3.x" recently. The hang is 
probably random :-/

I chose a default timeout of 5 minutes, it should be enough for the short tests 
of test_asyncio. You may set the timeout to 15 minutes if a buildbot is too 
slow. Or set the timeout to 1 minute if you prefer to not hang a buildbot too 
long.

I tested asyncio_subprocess_watchdog.patch manually with a shorter timeout and 
by adding time.sleep(60) in echo.py, echo2.py and echo3.py.

----------
keywords: +patch
Added file: http://bugs.python.org/file32750/asyncio_subprocess_watchdog.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19652>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to