◐ Shell
reader mode source ↗
Skip to content

[WIP][2.7] bpo-30351: regrtest: add --timeout#2317

Closed
vstinner wants to merge 1 commit into
python:2.7from
vstinner:watchdog
Closed

[WIP][2.7] bpo-30351: regrtest: add --timeout#2317
vstinner wants to merge 1 commit into
python:2.7from
vstinner:watchdog

Conversation

@vstinner

Copy link
Copy Markdown
Member

Add an optional watchdog thread which dumps the Python traceback
regrtest takes longer than timeout seconds.

@vstinner

Copy link
Copy Markdown
Member Author

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.

Add an optional watchdog thread which dumps the Python traceback
regrtest takes longer than timeout seconds.
@vstinner

Copy link
Copy Markdown
Member Author

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 :-/

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide 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.

@vstinner

Copy link
Copy Markdown
Member Author

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.

@serhiy-storchaka

Copy link
Copy Markdown
Member

You better know what your code does. 😉

@vstinner

Copy link
Copy Markdown
Member Author

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.

@vstinner vstinner closed this Jul 21, 2017
@vstinner vstinner deleted the watchdog branch July 21, 2017 09:52
@vstinner

vstinner commented Aug 7, 2017

Copy link
Copy Markdown
Member Author

I rebased my PR: 3019.

@vstinner

vstinner commented Aug 7, 2017

Copy link
Copy Markdown
Member Author

PR #3019.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants