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.
Created on 2015年04月01日 09:43 by vstinner, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| py_write_noraise.patch | vstinner, 2015年04月01日 09:43 | review | ||
| traceback_eintr.patch | vstinner, 2015年04月01日 09:44 | review | ||
| faulthandler_eintr.patch | vstinner, 2015年04月01日 09:44 | review | ||
| Messages (2) | |||
|---|---|---|---|
| msg239776 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2015年04月01日 09:43 | |
While working on the PEP 475, I noticed that the faulthandler module doesn't handle well reentrant calls to its signal handlers. If a signal is received while faulthandler is displaying the traceback, faulthandler restarts to display a new traceback (and then finish to display the previous traceback). Moreover, faulthandler uses the C function write() to display the traceback and it ignores write() errors. It should retry write() if write() is interrupted by a signal (fails with EINTR). Attached py_write_noraise.patch: - Add a new _Py_write_noraise() function - Document functions releasing the GIL Attached traceback_eintr.patch: - Modify functions displaying traceback to use _Py_write_noraise() instead of write() Attached faulthandler_eintr.patch: - Add a reentrant flag to the two signal handlers of faulthandler - Modify faulthandler.dump_traceback() to call PyErr_CheckSignals(), to call the Python signal handler if a signal was received while faulthandler was displaying the traceback of all Python threads |
|||
| msg239829 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年04月01日 16:51 | |
New changeset 60e001ec141d by Victor Stinner in branch 'default': Issue #23836: Add _Py_write_noraise() function https://hg.python.org/cpython/rev/60e001ec141d New changeset d9b9e2a68e7c by Victor Stinner in branch 'default': Issue #23836: Document functions releasing the GIL in fileutils.c https://hg.python.org/cpython/rev/d9b9e2a68e7c New changeset 12e065efc821 by Victor Stinner in branch 'default': Issue #23836: Use _Py_write_noraise() to retry on EINTR in trip_signal() of https://hg.python.org/cpython/rev/12e065efc821 New changeset e3c97621d8b4 by Victor Stinner in branch 'default': Issue #23836: Use _Py_write_noraise() to retry on EINTR in child_exec() of https://hg.python.org/cpython/rev/e3c97621d8b4 New changeset 29ab05c5e9dc by Victor Stinner in branch 'default': Issue #23836: Use _Py_write_noraise() to retry on EINTR in _Py_DumpTraceback() https://hg.python.org/cpython/rev/29ab05c5e9dc New changeset f07b855afbb2 by Victor Stinner in branch 'default': Issue #23836: Fix the faulthandler module to handle reentrant calls https://hg.python.org/cpython/rev/f07b855afbb2 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:14 | admin | set | github: 68024 |
| 2015年04月01日 16:52:11 | vstinner | set | status: open -> closed resolution: fixed |
| 2015年04月01日 16:51:54 | python-dev | set | nosy:
+ python-dev messages: + msg239829 |
| 2015年04月01日 09:45:04 | vstinner | link | issue23648 dependencies |
| 2015年04月01日 09:44:47 | vstinner | set | nosy:
+ neologix |
| 2015年04月01日 09:44:11 | vstinner | set | files: + faulthandler_eintr.patch |
| 2015年04月01日 09:44:06 | vstinner | set | files: + traceback_eintr.patch |
| 2015年04月01日 09:43:59 | vstinner | create | |