[WIP][2.7] bpo-30351: regrtest: add --timeout#2317
Conversation
|
This is an experimental debug tool for regrtest to try to debug http://bugs.python.org/issue30351 since faulthandler is not in the Python 2.7 stdlib (it was added to Python 3.3), and it's not that easy to install a C extension from PyPI on buildbots. |
Sorry, something went wrong.
Add an optional watchdog thread which dumps the Python traceback regrtest takes longer than timeout seconds.
|
Using a thread is portable, but Python 2.7 doesn't have signal.pthread_sigmask(), so the thread may receive signals which is likely to change the behaviour of some tests relying on signals :-/ |
Sorry, something went wrong.
serhiy-storchaka
left a comment
There was a problem hiding this comment.
I'm not very experienced with all this, but LGTM. I have added a couple of nitpicks, questions and suggestions, but in any case approve the PR.
Sorry, something went wrong.
|
The design of this debug tool is very different from faulthandler and is likely to cause bugs when it's enabled. I'm not sure that I would like to get this change merged :-( I wrote it to try to debug regrtest hangs on Python 2.7 on platforms without gdb with python-gdb.py plugin. |
Sorry, something went wrong.
|
You better know what your code does. 😉 |
Sorry, something went wrong.
|
I don't think that the watchdog is reliable, it can "catch" signals (we miss signal.pthread_sigmask() on Python 2.7), and 2.7 buildbots became very stable so I don't need this tool anymore. I just abandon my PR. |
Sorry, something went wrong.
|
I rebased my PR: 3019. |
Sorry, something went wrong.
Add an optional watchdog thread which dumps the Python traceback
regrtest takes longer than timeout seconds.