[Python-Dev] test_anydbm segfault on Mandrake 8.1

Skip Montanaro skip at pobox.com
Sat Feb 7 10:04:17 EST 2004

I'm getting this on Mandrake 8.1:

    % ./python Lib/test/test_anydbm.py
    Segmentation fault

Running under gdb I get this for the Python stack:

    (gdb) ppystack
    /home/skip/src/python/dist/src/Lib/bsddb/__init__.py (337): _openDBEnv
    /home/skip/src/python/dist/src/Lib/bsddb/__init__.py (281): hashopen
    /home/skip/src/python/dist/src/Lib/dbhash.py (15): open
    /home/skip/src/python/dist/src/Lib/anydbm.py (66): open
    Lib/test/test_anydbm.py (36): test_anydbm_creation
    /home/skip/src/python/dist/src/Lib/unittest.py (245): run
    /home/skip/src/python/dist/src/Lib/unittest.py (419): __call__
    /home/skip/src/python/dist/src/Lib/unittest.py (419): __call__
    /home/skip/src/python/dist/src/Lib/unittest.py (686): run
    /home/skip/src/python/dist/src/Lib/test/test_support.py (255): run_suite
    /home/skip/src/python/dist/src/Lib/test/test_support.py (278): run_unittest
    Lib/test/test_anydbm.py (88): test_main
    Lib/test/test_anydbm.py (4): ?

and this is the beginning of the gdb stack trace:

    #0  0x00000000 in ?? ()
    #1  0x402a0d0f in DBEnv_open (self=0x401a6680, args=0x4026494c)
	at /home/skip/src/python/dist/src/Modules/_bsddb.c:3227
    #2  0x080fd98a in PyCFunction_Call (func=0x40264dec, arg=0x4026494c, kw=0x0)
	at Objects/methodobject.c:93
    #3  0x080b3c3d in call_function (pp_stack=0xbfffda7c, oparg=2)
	at Python/ceval.c:3452
    #4  0x080b2080 in eval_frame (f=0x814e024) at Python/ceval.c:2126
    #5  0x080b599b in fast_function (func=0x4026048c, pp_stack=0xbfffdb8c, n=0, 
	na=0, nk=0) at Python/ceval.c:3531
    #6  0x080b3b29 in call_function (pp_stack=0xbfffdb8c, oparg=0)
	at Python/ceval.c:3471
    #7  0x080b2080 in eval_frame (f=0x8196794) at Python/ceval.c:2126
    #8  0x080b2d92 in PyEval_EvalCodeEx (co=0x4021d820, globals=0x402179bc, 
	locals=0x0, args=0x81b8630, argcount=3, kws=0x81b863c, kwcount=0, 
	defs=0x402603b8, defcount=8, closure=0x0) at Python/ceval.c:2676
    #9  0x080b5911 in fast_function (func=0x402573e4, pp_stack=0xbfffdd2c, n=3, 
	na=3, nk=0) at Python/ceval.c:3542

ldd tells me this about the _bsddb shared object:

    % ldd build/lib.linux-i686-2.4/_bsddb.so 
	    libdb-3.3.so => /lib/libdb-3.3.so (0x40023000)
	    libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 (0x400b3000)
	    libc.so.6 => /lib/libc.so.6 (0x400bb000)
	    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

and rpm suggests I've got Berkeley DB 3.3.11 installed.  Is that recent
enough for the bsddb package (suggesting a bug in setup.py) or is something
else going on?


More information about the Python-Dev mailing list