From d055e1d5045390b3995e66d323d911279f109109 Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Sat, 28 Jun 2025 12:51:53 -0400 Subject: [PATCH 1/2] Include a C stack in the faulthandler example --- Doc/library/faulthandler.rst | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Doc/library/faulthandler.rst b/Doc/library/faulthandler.rst index 1977f4d3ba3916..e3071621779d0f 100644 --- a/Doc/library/faulthandler.rst +++ b/Doc/library/faulthandler.rst @@ -230,4 +230,39 @@ handler: Current thread 0x00007fb899f39700 (most recent call first): File "/home/python/cpython/Lib/ctypes/__init__.py", line 486 in string_at File "", line 1 in + + Current thread's C stack trace (most recent call first): + Binary file "/home/python/cpython/python", at _Py_DumpStack+0x42 [0x5b27f7d7147e] + Binary file "/home/python/cpython/python", at +0x32dcbd [0x5b27f7d85cbd] + Binary file "/home/python/cpython/python", at +0x32df8a [0x5b27f7d85f8a] + Binary file "/usr/lib/libc.so.6", at +0x3def0 [0x77b73226bef0] + Binary file "/usr/lib/libc.so.6", at +0x17ef9c [0x77b7323acf9c] + Binary file "/home/python/cpython/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so", at +0xcdf6 [0x77b7315dddf6] + Binary file "/usr/lib/libffi.so.8", at +0x7976 [0x77b73158f976] + Binary file "/usr/lib/libffi.so.8", at +0x413c [0x77b73158c13c] + Binary file "/usr/lib/libffi.so.8", at ffi_call+0x12e [0x77b73158ef0e] + Binary file "/home/python/cpython/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so", at +0x15a33 [0x77b7315e6a33] + Binary file "/home/python/cpython/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so", at +0x164fa [0x77b7315e74fa] + Binary file "/home/python/cpython/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so", at +0xc624 [0x77b7315dd624] + Binary file "/home/python/cpython/python", at _PyObject_MakeTpCall+0xce [0x5b27f7b73883] + Binary file "/home/python/cpython/python", at +0x11bab6 [0x5b27f7b73ab6] + Binary file "/home/python/cpython/python", at PyObject_Vectorcall+0x23 [0x5b27f7b73b04] + Binary file "/home/python/cpython/python", at _PyEval_EvalFrameDefault+0x490c [0x5b27f7cbb302] + Binary file "/home/python/cpython/python", at +0x2818e6 [0x5b27f7cd98e6] + Binary file "/home/python/cpython/python", at +0x281aab [0x5b27f7cd9aab] + Binary file "/home/python/cpython/python", at PyEval_EvalCode+0xc5 [0x5b27f7cd9ba3] + Binary file "/home/python/cpython/python", at +0x255957 [0x5b27f7cad957] + Binary file "/home/python/cpython/python", at +0x255ab4 [0x5b27f7cadab4] + Binary file "/home/python/cpython/python", at _PyEval_EvalFrameDefault+0x6c3e [0x5b27f7cbd634] + Binary file "/home/python/cpython/python", at +0x2818e6 [0x5b27f7cd98e6] + Binary file "/home/python/cpython/python", at +0x281aab [0x5b27f7cd9aab] + Binary file "/home/python/cpython/python", at +0x11b6e1 [0x5b27f7b736e1] + Binary file "/home/python/cpython/python", at +0x11d348 [0x5b27f7b75348] + Binary file "/home/python/cpython/python", at +0x11d626 [0x5b27f7b75626] + Binary file "/home/python/cpython/python", at PyObject_Call+0x20 [0x5b27f7b7565e] + Binary file "/home/python/cpython/python", at +0x32a67a [0x5b27f7d8267a] + Binary file "/home/python/cpython/python", at +0x32a7f8 [0x5b27f7d827f8] + Binary file "/home/python/cpython/python", at +0x32ac1b [0x5b27f7d82c1b] + Binary file "/home/python/cpython/python", at Py_RunMain+0x31 [0x5b27f7d82ebe] + Segmentation fault From 0b3edcf3aebddec695936e2b6b74ce94b1c8fb60 Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Sun, 29 Jun 2025 09:43:24 -0400 Subject: [PATCH 2/2] Use /opt/python --- Doc/library/faulthandler.rst | 56 ++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Doc/library/faulthandler.rst b/Doc/library/faulthandler.rst index e3071621779d0f..677966a8b2eaab 100644 --- a/Doc/library/faulthandler.rst +++ b/Doc/library/faulthandler.rst @@ -228,41 +228,41 @@ handler: Fatal Python error: Segmentation fault Current thread 0x00007fb899f39700 (most recent call first): - File "/home/python/cpython/Lib/ctypes/__init__.py", line 486 in string_at + File "/opt/python/Lib/ctypes/__init__.py", line 486 in string_at File "", line 1 in Current thread's C stack trace (most recent call first): - Binary file "/home/python/cpython/python", at _Py_DumpStack+0x42 [0x5b27f7d7147e] - Binary file "/home/python/cpython/python", at +0x32dcbd [0x5b27f7d85cbd] - Binary file "/home/python/cpython/python", at +0x32df8a [0x5b27f7d85f8a] + Binary file "/opt/python/python", at _Py_DumpStack+0x42 [0x5b27f7d7147e] + Binary file "/opt/python/python", at +0x32dcbd [0x5b27f7d85cbd] + Binary file "/opt/python/python", at +0x32df8a [0x5b27f7d85f8a] Binary file "/usr/lib/libc.so.6", at +0x3def0 [0x77b73226bef0] Binary file "/usr/lib/libc.so.6", at +0x17ef9c [0x77b7323acf9c] - Binary file "/home/python/cpython/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so", at +0xcdf6 [0x77b7315dddf6] + Binary file "/opt/python/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so", at +0xcdf6 [0x77b7315dddf6] Binary file "/usr/lib/libffi.so.8", at +0x7976 [0x77b73158f976] Binary file "/usr/lib/libffi.so.8", at +0x413c [0x77b73158c13c] Binary file "/usr/lib/libffi.so.8", at ffi_call+0x12e [0x77b73158ef0e] - Binary file "/home/python/cpython/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so", at +0x15a33 [0x77b7315e6a33] - Binary file "/home/python/cpython/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so", at +0x164fa [0x77b7315e74fa] - Binary file "/home/python/cpython/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so", at +0xc624 [0x77b7315dd624] - Binary file "/home/python/cpython/python", at _PyObject_MakeTpCall+0xce [0x5b27f7b73883] - Binary file "/home/python/cpython/python", at +0x11bab6 [0x5b27f7b73ab6] - Binary file "/home/python/cpython/python", at PyObject_Vectorcall+0x23 [0x5b27f7b73b04] - Binary file "/home/python/cpython/python", at _PyEval_EvalFrameDefault+0x490c [0x5b27f7cbb302] - Binary file "/home/python/cpython/python", at +0x2818e6 [0x5b27f7cd98e6] - Binary file "/home/python/cpython/python", at +0x281aab [0x5b27f7cd9aab] - Binary file "/home/python/cpython/python", at PyEval_EvalCode+0xc5 [0x5b27f7cd9ba3] - Binary file "/home/python/cpython/python", at +0x255957 [0x5b27f7cad957] - Binary file "/home/python/cpython/python", at +0x255ab4 [0x5b27f7cadab4] - Binary file "/home/python/cpython/python", at _PyEval_EvalFrameDefault+0x6c3e [0x5b27f7cbd634] - Binary file "/home/python/cpython/python", at +0x2818e6 [0x5b27f7cd98e6] - Binary file "/home/python/cpython/python", at +0x281aab [0x5b27f7cd9aab] - Binary file "/home/python/cpython/python", at +0x11b6e1 [0x5b27f7b736e1] - Binary file "/home/python/cpython/python", at +0x11d348 [0x5b27f7b75348] - Binary file "/home/python/cpython/python", at +0x11d626 [0x5b27f7b75626] - Binary file "/home/python/cpython/python", at PyObject_Call+0x20 [0x5b27f7b7565e] - Binary file "/home/python/cpython/python", at +0x32a67a [0x5b27f7d8267a] - Binary file "/home/python/cpython/python", at +0x32a7f8 [0x5b27f7d827f8] - Binary file "/home/python/cpython/python", at +0x32ac1b [0x5b27f7d82c1b] - Binary file "/home/python/cpython/python", at Py_RunMain+0x31 [0x5b27f7d82ebe] + Binary file "/opt/python/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so", at +0x15a33 [0x77b7315e6a33] + Binary file "/opt/python/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so", at +0x164fa [0x77b7315e74fa] + Binary file "/opt/python/build/lib.linux-x86_64-3.15/_ctypes.cpython-315d-x86_64-linux-gnu.so", at +0xc624 [0x77b7315dd624] + Binary file "/opt/python/python", at _PyObject_MakeTpCall+0xce [0x5b27f7b73883] + Binary file "/opt/python/python", at +0x11bab6 [0x5b27f7b73ab6] + Binary file "/opt/python/python", at PyObject_Vectorcall+0x23 [0x5b27f7b73b04] + Binary file "/opt/python/python", at _PyEval_EvalFrameDefault+0x490c [0x5b27f7cbb302] + Binary file "/opt/python/python", at +0x2818e6 [0x5b27f7cd98e6] + Binary file "/opt/python/python", at +0x281aab [0x5b27f7cd9aab] + Binary file "/opt/python/python", at PyEval_EvalCode+0xc5 [0x5b27f7cd9ba3] + Binary file "/opt/python/python", at +0x255957 [0x5b27f7cad957] + Binary file "/opt/python/python", at +0x255ab4 [0x5b27f7cadab4] + Binary file "/opt/python/python", at _PyEval_EvalFrameDefault+0x6c3e [0x5b27f7cbd634] + Binary file "/opt/python/python", at +0x2818e6 [0x5b27f7cd98e6] + Binary file "/opt/python/python", at +0x281aab [0x5b27f7cd9aab] + Binary file "/opt/python/python", at +0x11b6e1 [0x5b27f7b736e1] + Binary file "/opt/python/python", at +0x11d348 [0x5b27f7b75348] + Binary file "/opt/python/python", at +0x11d626 [0x5b27f7b75626] + Binary file "/opt/python/python", at PyObject_Call+0x20 [0x5b27f7b7565e] + Binary file "/opt/python/python", at +0x32a67a [0x5b27f7d8267a] + Binary file "/opt/python/python", at +0x32a7f8 [0x5b27f7d827f8] + Binary file "/opt/python/python", at +0x32ac1b [0x5b27f7d82c1b] + Binary file "/opt/python/python", at Py_RunMain+0x31 [0x5b27f7d82ebe] Segmentation fault