bus error at glibc when running python command

47 Views Asked by At

I encountered the problem when I run a conan install command. Conan is a pure python project. I try to use gdb to debug the core file, and the backtrace is like this:

#0  0x00007f3a7e3ee5d3 in strncmp () at ../sysdeps/x86_64/strcmp.S:2075
#1  0x00007f3a7e3d2429 in print_statistics (rtld_total_timep=0x7ffea4463a90) at ../sysdeps/generic/_itoa.h:67
#2 ...

the gdb layout

Download the core file

The state of the cpu is strange. rip points to 0x7f3a7e3ee5d3 <strncmp+5779>,which seems not to be a valid instruction entry.

I also debug the command directly, and the backtrace is like this:

#0  0x00007ffff7ff25d3 in ?? () from /lib64/ld-linux-x86-64.so.2
#1  0x00007ffff7fd6429 in ?? () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7fd961b in ?? () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7fde515 in ?? () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7daf928 in _dl_catch_exception () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x00007ffff7fde963 in ?? () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff7fe4db0 in ?? () from /lib64/ld-linux-x86-64.so.2
#7  0x00007ffff7daf928 in _dl_catch_exception () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x00007ffff7fe460a in ?? () from /lib64/ld-linux-x86-64.so.2
#9  0x00007ffff7f9634c in ?? () from /lib/x86_64-linux-gnu/libdl.so.2
#10 0x00007ffff7daf928 in _dl_catch_exception () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x00007ffff7daf9f3 in _dl_catch_error () from /lib/x86_64-linux-gnu/libc.so.6
#12 0x00007ffff7f96b59 in ?? () from /lib/x86_64-linux-gnu/libdl.so.2
#13 0x00007ffff7f963da in dlopen () from /lib/x86_64-linux-gnu/libdl.so.2
#14 0x00000000005cebc6 in _PyImport_FindSharedFuncptr (prefix=0x6234a4 "PyInit", shortname=0x7ffff5f359a0 "_sqlite3", 
    pathname=0x7ffff5f66720 "/path/miniconda3/lib/python3.10/lib-dynload/_sqlite3.cpython-310-x86_64-linux-gnu.so", fp=0x0)
    at /usr/local/src/conda/python-3.10.9/Python/dynload_shlib.c:100

I fixed this problem by reinstall the python environment in miniconda.

similar problem

Is this a bug from glibc/python, or just the _sqlite3.cpython-310-x86_64-linux-gnu.so is broken?

0

There are 0 best solutions below