STINNER Victor <vstin...@python.org> added the comment:
More logs on the AArch64 issue. It seems like *sometimes*, gdb fails to parse debug symbols of _testcapi.cpython-310d-aarch64-linux-gnu.so, whereas most of the time, "bt" shows symbols as expected. stdout+stderr when the bug happens. ####################################################### Function "meth_fastcall" not defined. Breakpoint 1 (meth_fastcall) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". 1069559: opening file=/home/vstinner/python/master/build/lib.linux-aarch64-3.10-pydebug/_testcapi.cpython-310d-aarch64-linux-gnu.so [0]; direct_opencount=1 1069559: Program received signal SIGTRAP, Trace/breakpoint trap. ?? () from /home/vstinner/python/master/build/lib.linux-aarch64-3.10-pydebug/_testcapi.cpython-310d-aarch64-linux-gnu.so #0 ?? () from /home/vstinner/python/master/build/lib.linux-aarch64-3.10-pydebug/_testcapi.cpython-310d-aarch64-linux-gnu.so #1 ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Unable to locate python frame ####################################################### Extract of a successful run: ####################################################### Function "meth_fastcall" not defined. Breakpoint 1 (meth_fastcall) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, meth_fastcall (self=<module at remote 0xffffea683e90>, args=, nargs=0) at /home/vstinner/python/master/Modules/_testcapimodule.c:5255 5255 { #0 meth_fastcall (self=<module at remote 0xffffea683e90>, args=, nargs=0) at /home/vstinner/python/master/Modules/_testcapimodule.c:5255 #1 cfunction_vectorcall_FASTCALL (func=<built-in method meth_fastcall of module object at remote 0xffffea683e90>, args=, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/methodobject.c:424 #2 _PyObject_VectorcallTstate (tstate=, callable=<built-in method meth_fastcall of module object at remote 0xffffea683e90>, args=, nargsf=9223372036854775808, kwnames=0x0) at ./Include/cpython/abstract.h:114 ####################################################### I can reproduce the issue with command "./script.sh" using the following files. script.sh: --- $ cat script.sh OUT=$(mktemp) while true; do gdb --batch -x cmds -args ./python -S x.py < /dev/null 2>&1 | tee $OUT grep -q -F '<built-in method meth_fastcall' $OUT || break echo echo "====================================================" echo done echo "#######################################################" echo "BUG!" echo "#######################################################" cat $OUT echo "#######################################################" rm -f $OUT --- x.py: --- import _testcapi def foo(): # _testcapi.meth_varargs() _testcapi.meth_fastcall() def bar(): foo() bar() --- cmds: --- set breakpoint pending on add-auto-load-safe-path /home/vstinner/python/master/python-gdb.py set breakpoint pending yes set print address off break meth_fastcall run set print entry-values no bt py-bt --- ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41473> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com