Skip to content

bpo-38070: _Py_DumpTraceback() writes <no Python frame> #16244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 17, 2019
Merged

bpo-38070: _Py_DumpTraceback() writes <no Python frame> #16244

merged 1 commit into from
Sep 17, 2019

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 17, 2019

When a Python thread has no frame, _Py_DumpTraceback() and
_Py_DumpTracebackThreads() now write "", rather than
writing nothing.

https://bugs.python.org/issue38070

When a Python thread has no frame, _Py_DumpTraceback() and
_Py_DumpTracebackThreads() now write "<no Python frame>", rather than
writing nothing.
@vstinner
Copy link
Member Author

Example with the change:

$ PYTHONHOME=/ ./python 
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f8a5a7f4740 (most recent call first):
<no Python frame>

without the change:

$ PYTHONHOME=/ ./python 
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007fd955873740 (most recent call first):

@vstinner vstinner merged commit 8fa3e17 into python:master Sep 17, 2019
@vstinner vstinner deleted the traceback_no_frame branch September 17, 2019 21:36
vstinner added a commit that referenced this pull request Sep 18, 2019
* bpo-38070: _Py_DumpTraceback() writes <no Python frame> (GH-16244)

When a Python thread has no frame, _Py_DumpTraceback() and
_Py_DumpTracebackThreads() now write "<no Python frame>", rather than
writing nothing.

(cherry picked from commit 8fa3e17)

* bpo-38070: Enhance _PyObject_Dump() (GH-16243)

_PyObject_Dump() now dumps the object address for freed objects and
objects with ob_type=NULL.

(cherry picked from commit b39afb7)

* bpo-38070: Add _PyRuntimeState.preinitializing (GH-16245)

Add _PyRuntimeState.preinitializing field: set to 1 while
Py_PreInitialize() is running.

_PyRuntimeState: rename also pre_initialized field to preinitialized.

(cherry picked from commit d3b9041)

* bpo-38070: Py_FatalError() logs runtime state (GH-16246)


(cherry picked from commit 1ce16fb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants