*** glibc detected *** gdb: malloc(): smallbin double linked list

J

John Reid

Hi,

I've compiled
Python 2.7 (r27:82500, Nov 2 2010, 09:00:37)
[GCC 4.4.3] on linux2

with the following configure options
../configure --prefix=/home/john/local/python-dbg --with-pydebug

I've installed numpy and some other packages but when I try to run my
extension code under gdb I get the errors below. Does anyone have any
ideas of how to track down what's happening here? I imagine I've
misconfigured something somewhere. Is valgrind the answer?

Thanks,
John.



*** glibc detected *** gdb: malloc(): smallbin double linked list
corrupted: 0x0000000004de7ad0 ***
======= Backtrace: =========
/lib/libc.so.6(+0x775b6)[0x7f0a252215b6]
/lib/libc.so.6(+0x7b8e9)[0x7f0a252258e9]
/lib/libc.so.6(__libc_malloc+0x6e)[0x7f0a2522658e]
gdb(xmalloc+0x18)[0x45bc38]
gdb[0x476df1]
gdb[0x474c9b]
gdb[0x474ee8]
gdb(execute_command+0x2dd)[0x458d1d]
gdb(catch_exception+0x50)[0x535510]
gdb[0x4b5191]
gdb(interp_exec+0x17)[0x535637]
gdb(mi_cmd_interpreter_exec+0x6c)[0x4b9adc]
gdb[0x4ba71a]
gdb(catch_exception+0x50)[0x535510]
gdb(mi_execute_command+0x97)[0x4ba137]
gdb[0x53a0f8]
gdb(gdb_do_one_event+0x29a)[0x53b38a]
gdb(catch_errors+0x5b)[0x53531b]
gdb(start_event_loop+0x1e)[0x53a90e]
gdb[0x44f619]
gdb(catch_errors+0x5b)[0x53531b]
gdb[0x450166]
gdb(catch_errors+0x5b)[0x53531b]
gdb(gdb_main+0x24)[0x44f554]
gdb(main+0x2e)[0x44f51e]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f0a251c8c4d]
gdb[0x44f429]
======= Memory map: ========
00400000-00818000 r-xp 00000000 08:05 4832730 /usr/bin/gdb
00a17000-00a18000 r--p 00417000 08:05 4832730 /usr/bin/gdb
00a18000-00a25000 rw-p 00418000 08:05 4832730 /usr/bin/gdb
00a25000-00a43000 rw-p 00000000 00:00 0
0287f000-0b920000 rw-p 00000000 00:00 0 [heap]
7f0a1c000000-7f0a1c021000 rw-p 00000000 00:00 0
7f0a1c021000-7f0a20000000 ---p 00000000 00:00 0
7f0a20fc0000-7f0a20fd6000 r-xp 00000000 08:05 3498245 /lib/libgcc_s.so.1
7f0a20fd6000-7f0a211d5000 ---p 00016000 08:05 3498245 /lib/libgcc_s.so.1
7f0a211d5000-7f0a211d6000 r--p 00015000 08:05 3498245 /lib/libgcc_s.so.1
7f0a211d6000-7f0a211d7000 rw-p 00016000 08:05 3498245 /lib/libgcc_s.so.1
7f0a211fd000-7f0a21211000 r--p 000dc000 08:05 4825848
/usr/lib/libstdc++.so.6.0.13
7f0a21211000-7f0a21218000 r--p 00018000 08:05 4841756
/usr/lib/debug/lib/librt-2.11.1.so
7f0a21218000-7f0a21226000 r--p 00001000 08:05 4841756
/usr/lib/debug/lib/librt-2.11.1.so
7f0a21226000-7f0a2123e000 r--p 000bc000 08:05 4653290
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/libboost_python.so.1.44.0
7f0a2123e000-7f0a21287000 r--p 003dd000 08:05 4653290
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/libboost_python.so.1.44.0
7f0a21287000-7f0a21299000 r--p 00425000 08:05 4653290
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/libboost_python.so.1.44.0
7f0a21299000-7f0a213e7000 r--p 0018c000 08:05 4653290
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/libboost_python.so.1.44.0
7f0a213e7000-7f0a2152f000 r--p 0207c000 08:05 4653324
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/_stempy.so
7f0a2152f000-7f0a22027000 r--p 01585000 08:05 4653324
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/_stempy.so
7f0a22027000-7f0a22400000 rw-p 00000000 00:00 0
7f0a22408000-7f0a224d1000 r--p 00315000 08:05 4653290
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/libboost_python.so.1.44.0
7f0a224d1000-7f0a224ff000 r--p 002e8000 08:05 4653290
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/libboost_python.so.1.44.0
7f0a224ff000-7f0a22526000 r--p 00038000 08:05 4653310
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/myrrh_pylib-d
7f0a22526000-7f0a2259c000 r--p 01510000 08:05 4653324
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/_stempy.so
7f0a2259c000-7f0a2280c000 r--p 012a0000 08:05 4653324
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/_stempy.so
7f0a2280c000-7f0a2343f000 rw-p 00000000 00:00 0
7f0a23443000-7f0a2344c000 r--p 0001a000 08:05 6169643
/home/john/local/python-dbg/lib/python2.7/lib-dynload/datetime.so
7f0a2344c000-7f0a2345c000 r--p 002d9000 08:05 4653290
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/libboost_python.so.1.44.0
7f0a2345c000-7f0a23461000 r--p 0005e000 08:05 4653310
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/myrrh_pylib-d
7f0a23461000-7f0a23477000 r--p 0001f000 08:05 4653310
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/myrrh_pylib-d
7f0a23477000-7f0a2347d000 r--p 00004000 08:05 4653095
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/libboost_system.so.1.44.0
7f0a2347d000-7f0a2350c000 r--p 00757000 08:05 4653324
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/_stempy.so
7f0a2350c000-7f0a23555000 r--p 021c3000 08:05 4653324
/home/john/Dev/MyProjects/Bio/MotifSearch/python/stempy/_debug/_stempy.so
7f0a23555000-7f0a2355b000 r--p 00048000 08:05 6169627
/home/john/local/python-dbg/lib/python2.7/lib-dynload/_ctypes.so
7f0a2355b000-7f0a2356f000 r--p 0002d000 08:05 6169627
/home/john/local/python-dbg/lib/python2.7/lib-dynload/_ctypes.so
7f0a2356f000-7f0a23575000 r--p 000b1000 08:05 3489898
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/random/mtrand.so
7f0a23575000-7f0a2357c000 r--p 000ab000 08:05 3489898
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/random/mtrand.so
7f0a2357c000-7f0a2358d000 r--p 0009b000 08:05 3489898
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/random/mtrand.so
7f0a2358d000-7f0a2359b000 r--p 000dd000 08:05 4827887
/usr/lib/libgfortran.so.3.0.0
7f0a2359b000-7f0a235ac000 r--p 00416000 08:05 6709644
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/linalg/lapack_lite.so
7f0a235ac000-7f0a23668000 rw-p 00000000 00:00 0
7f0a23668000-7f0a2366d000 r--p 00033000 08:05 3180358
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/scalarmath.so
7f0a2366d000-7f0a23678000 r--p 00052000 08:05 3180358
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/scalarmath.so
7f0a23678000-7f0a2367d000 r--p 0004c000 08:05 3180358
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/scalarmath.so
7f0a2367d000-7f0a23690000 r--p 00039000 08:05 3180358
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/scalarmath.so
7f0a23690000-7f0a23698000 r--p 0001b000 08:05 6169649
/home/john/local/python-dbg/lib/python2.7/lib-dynload/cPickle.so
7f0a23698000-7f0a236a7000 r--p 004fd000 08:05 3180355
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/_dotblas.so
7f0a236a7000-7f0a2374f000 rw-p 00000000 00:00 0
7f0a2374f000-7f0a2375a000 r--p 0001b000 08:05 3180353
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/_sort.so
7f0a2375a000-7f0a23762000 r--p 00065000 08:05 3180320
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/umath.so
7f0a23762000-7f0a23774000 r--p 000ae000 08:05 3180320
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/umath.so
7f0a23774000-7f0a2377a000 r--p 000a9000 08:05 3180320
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/umath.so
7f0a2377a000-7f0a23780000 r--p 000a4000 08:05 3180320
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/umath.so
7f0a23780000-7f0a237b4000 r--p 00071000 08:05 3180320
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/umath.so
7f0a237b4000-7f0a23881000 rw-p 00000000 00:00 0
7f0a23883000-7f0a23888000 r--p 0000f000 08:05 3146117
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/fft/fftpack_lite.so
7f0a23888000-7f0a23897000 r--p 000b9000 08:05 3180362
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/multiarray.so
7f0a23897000-7f0a238a1000 r--p 00118000 08:05 3180362
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/multiarray.so
7f0a238a1000-7f0a238ae000 r--p 0010c000 08:05 3180362
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/multiarray.so
7f0a238ae000-7f0a238e8000 r--p 000d3000 08:05 3180362
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/multiarray.so
7f0a238e8000-7f0a23aa4000 r--p 004e2000 08:05 4841832
/usr/lib/debug/lib/libc-2.11.1.so
7f0a23aa4000-7f0a23b03000 r--p 0069d000 08:05 4841832
/usr/lib/debug/lib/libc-2.11.1.so
7f0a23b03000-7f0a23b27000 r--p 004bf000 08:05 4841832
/usr/lib/debug/lib/libc-2.11.1.so
7f0a23b27000-7f0a23bc3000 r--p 00424000 08:05 4841832
/usr/lib/debug/lib/libc-2.11.1.so
7f0a23bc3000-7f0a23c3e000 r--p 003aa000 08:05 4841832
/usr/lib/debug/lib/libc-2.11.1.so
7f0a23c3e000-7f0a23fca000 r--p 0001f000 08:05 4841832
/usr/lib/debug/lib/libc-2.11.1.so
7f0a23fca000-7f0a240f6000 rw-p 00000000 00:00 0
7f0a240f8000-7f0a24118000 r--p 00121000 08:05 3180362
/home/john/local/python-dbg/lib/python2.7/site-packages/numpy-1.5.1rc1-py2.7-linux-x86_64.egg/numpy/core/multiarray.so
7f0a24118000-7f0a24129000 r--p 0000e000 08:05 4950482
/usr/lib/debug/lib/libz.so.1.2.3.3
7f0a24129000-7f0a24133000 r--p 00000000 08:05 4950482
/usr/lib/debug/lib/libz.so.1.2.3.3
7f0a24133000-7f0a24154000 r--p 00155000 08:05 2900170 /lib/libc-2.11.1.so
7f0a24154000-7f0a241a2000 r--p 00061000 08:05 4841716
/usr/lib/debug/lib/libm-2.11.1.so
7f0a241a2000-7f0a241a8000 r--p 0005c000 08:05 4841716
/usr/lib/debug/lib/libm-2.11.1.so
7f0a241a8000-7f0a241bb000 r--p 0004a000 08:05 4841716
/usr/lib/debug/lib/libm-2.11.1.so
7f0a241bb000-7f0a241ed000 r--p 00007000 08:05 4841716
/usr/lib/debug/lib/libm-2.11.1.so
7f0a241ed000-7f0a241f4000 r-xp 00000000 08:05 2900165
/lib/libthread_db-1.0.so
7f0a241f4000-7f0a243f3000 ---p 00007000 08:05 2900165
/lib/libthread_db-1.0.so
7f0a243f3000-7f0a243f4000 r--p 00006000 08:05 2900165
/lib/libthread_db-1.0.so
7f0a243f4000-7f0a243f5000 rw-p 00007000 08:05 2900165
/lib/libthread_db-1.0.so
7f0a243f9000-7f0a2440c000 r--p 00038000 08:05 4841716
/usr/lib/debug/lib/libm-2.11.1.so
7f0a2440c000-7f0a2441b000 r--p 00000000 08:05 4841839
/usr/lib/debug/lib/libdl-2.11.1.so
7f0a2441b000-7f0a24431000 r--p 00078000 08:05 4841828
/usr/lib/debug/lib/libpthread-2.11.1.so
7f0a24431000-7f0a24439000 r--p 00071000 08:05 4841828
/usr/lib/debug/lib/libpthread-2.11.1.so
7f0a24439000-7f0a2444c000 r--p 0005f000 08:05 4841828
/usr/lib/debug/lib/libpthread-2.11.1.so
7f0a2444c000-7f0a2445c000 r--p 00050000 08:05 4841828
/usr/lib/debug/lib/libpthread-2.11.1.so
7f0a2445c000-7f0a244a9000 r--p 00004000 08:05 4841828
/usr/lib/debug/lib/libpthread-2.11.1.so
7f0a244a9000-7f0a244cc000 r--p 00063000 08:05 4841753
/usr/lib/debug/lib/ld-2.11.1.so
7f0a244cc000-7f0a244d6000 r--p 00085000 08:05 4841753
/usr/lib/debug/lib/ld-2.11.1.so
7f0a244d6000-7f0a244f3000 r--p 001be000 08:05 221210
/home/john/local/python-dbg/bin/python2.7
7f0a244f3000-7f0a24537000 r--p 00370000 08:05 221210
/home/john/local/python-dbg/bin/python2.7
7f0a24537000-7f0a2453e000 r--p 003b3000 08:05 221210
/home/john/local/python-dbg/bin/python2.7
7f0a2453e000-7f0a2455c000 r--p 00353000 08:05 221210
/home/john/local/python-dbg/bin/python2.7
7f0a2455c000-7f0a24583000 r--p 0032d000 08:05 221210
/home/john/local/python-dbg/bin/python2.7
7f0a24583000-7f0a24591000 r--p 00320000 08:05 221210
/home/john/local/python-dbg/bin/python2.7
7f0a24591000-7f0a2468b000 r--p 00227000 08:05 221210
/home/john/local/python-dbg/bin/python2.7
7f0a2468b000-7f0a247a8000 rw-p 00000000 00:00 0
7f0a247a8000-7f0a247aa000 r-xp 00000000 08:05 2900166
/lib/libutil-2.11.1.so
7f0a247aa000-7f0a249a9000 ---p 00002000 08:05 2900166
/lib/libutil-2.11.1.so
7f0a249a9000-7f0a249aa000 r--p 00001000 08:05 2900166
/lib/libutil-2.11.1.so
7f0a249aa000-7f0a249ab000 rw-p 00002000 08:05 2900166
/lib/libutil-2.11.1.so
7f0a249ab000-7f0a249c3000 r-xp 00000000 08:05 2900168
/lib/libpthread-2.11.1.so
7f0a249c3000-7f0a24bc2000 ---p 00018000 08:05 2900168
/lib/libpthread-2.11.1.so
7f0a24bc2000-7f0a24bc3000 r--p 00017000 08:05 2900168
/lib/libpthread-2.11.1.so
7f0a24bc3000-7f0a24bc4000 rw-p 00018000 08:05 2900168
/lib/libpthread-2.11.1.so
7f0a24bc4000-7f0a24bc8000 rw-p 00000000 00:00 0
7f0a24bc8000-7f0a24d30000 r-xp 00000000 08:05 2901949
/lib/libcrypto.so.0.9.8
7f0a24d30000-7f0a24f2f000 ---p 00168000 08:05 2901949
/lib/libcrypto.so.0.9.8
7f0a24f2f000-7f0a24f3c000 r--p 00167000 08:05 2901949
/lib/libcrypto.so.0.9.8
7f0a24f3c000-7f0a24f54000 rw-p 00174000 08:05 2901949
/lib/libcrypto.so.0.9.8
7f0a24f54000-7f0a24f58000 rw-p 00000000 00:00 0
7f0a24f58000-7f0a24fa3000 r-xp 00000000 08:05 2901950 /lib/libssl.so.0.9.8
7f0a24fa3000-7f0a251a2000 ---p 0004b000 08:05 2901950 /lib/libssl.so.0.9.8
7f0a251a2000-7f0a251a4000 r--p 0004a000 08:05 2901950 /lib/libssl.so.0.9.8
7f0a251a4000-7f0a251a9000 rw-p 0004c000 08:05 2901950 /lib/libssl.so.0.9.8
7f0a251a9000-7f0a251aa000 rw-p 00000000 00:00 0
7f0a251aa000-7f0a25324000 r-xp 00000000 08:05 2900170 /lib/libc-2.11.1.so
7f0a25324000-7f0a25523000 ---p 0017a000 08:05 2900170 /lib/libc-2.11.1.so
7f0a25523000-7f0a25527000 r--p 00179000 08:05 2900170 /lib/libc-2.11.1.so
7f0a25527000-7f0a25528000 rw-p 0017d000 08:05 2900170 /lib/libc-2.11.1.so
7f0a25528000-7f0a2552d000 rw-p 00000000 00:00 0
7f0a2552d000-7f0a2552f000 r-xp 00000000 08:05 2900174 /lib/libdl-2.11.1.so
7f0a2552f000-7f0a2572f000 ---p 00002000 08:05 2900174 /lib/libdl-2.11.1.so
7f0a2572f000-7f0a25730000 r--p 00002000 08:05 2900174 /lib/libdl-2.11.1.so
7f0a25730000-7f0a25731000 rw-p 00003000 08:05 2900174 /lib/libdl-2.11.1.so
7f0a25731000-7f0a25757000 r-xp 00000000 08:05 2900004
/lib/libexpat.so.1.5.2
7f0a25757000-7f0a25957000 ---p 00026000 08:05 2900004
/lib/libexpat.so.1.5.2
7f0a25957000-7f0a25959000 r--p 00026000 08:05 2900004
/lib/libexpat.so.1.5.2
7f0a25959000-7f0a2595a000 rw-p 00028000 08:05 2900004
/lib/libexpat.so.1.5.2
7f0a2595a000-7f0a25b98000 r-xp 00000000 08:05 4827971
/usr/lib/libpython2.6.so.1.0
7f0a25b98000-7f0a25d98000 ---p 0023e000 08:05 4827971
/usr/lib/libpython2.6.so.1.0
7f0a25d98000-7f0a25d9a000 r--p 0023e000 08:05 4827971
/usr/lib/libpython2.6.so.1.0
7f0a25d9a000-7f0a25dfc000 rw-p 00240000 08:05 4827971
/usr/lib/libpython2.6.so.1.0
7f0a25dfc000-7f0a25e0b000 rw-p 00000000 00:00 0
7f0a25e0b000-7f0a25e8d000 r-xp 00000000 08:05 2900011 /lib/libm-2.11.1.so
7f0a25e8d000-7f0a2608c000 ---p 00082000 08:05 2900011 /lib/libm-2.11.1.so
7f0a2608c000-7f0a2608d000 r--p 00081000 08:05 2900011 /lib/libm-2.11.1.so
7f0a2608d000-7f0a2608e000 rw-p 00082000 08:05 2900011 /lib/libm-2.11.1.so
7f0a2608e000-7f0a260a4000 r-xp 00000000 08:05 2900157 /lib/libz.so.1.2.3.3
7f0a260a4000-7f0a262a3000 ---p 00016000 08:05 2900157 /lib/libz.so.1.2.3.3
7f0a262a3000-7f0a262a4000 r--p 00015000 08:05 2900157 /lib/libz.so.1.2.3.3
7f0a262a4000-7f0a262a5000 rw-p 00016000 08:05 2900157 /lib/libz.so.1.2.3.3
7f0a262a5000-7f0a262e3000 r-xp 00000000 08:05 3498266
/lib/libncurses.so.5.7
7f0a262e3000-7f0a264e3000 ---p 0003e000 08:05 3498266
/lib/libncurses.so.5.7
7f0a264e3000-7f0a264e7000 r--p 0003e000 08:05 3498266
/lib/libncurses.so.5.7
7f0a264e7000-7f0a264e8000 rw-p 00042000 08:05 3498266
/lib/libncurses.so.5.7
7f0a264e8000-7f0a26521000 r-xp 00000000 08:05 3498308
/lib/libreadline.so.6.1
7f0a26521000-7f0a26720000 ---p 00039000 08:05 3498308
/lib/libreadline.so.6.1
7f0a26720000-7f0a26722000 r--p 00038000 08:05 3498308
/lib/libreadline.so.6.1
7f0a26722000-7f0a26728000 rw-p 0003a000 08:05 3498308
/lib/libreadline.so.6.1
7f0a26728000-7f0a26729000 rw-p 00000000 00:00 0
7f0a26729000-7f0a26749000 r-xp 00000000 08:05 2900131 /lib/ld-2.11.1.so
7f0a26749000-7f0a2674f000 r--p 00013000 08:05 6169622
/home/john/local/python-dbg/lib/python2.7/lib-dynload/itertools.so
7f0a2674f000-7f0a26758000 r--p 0004c000 08:05 4841753
/usr/lib/debug/lib/ld-2.11.1.so
7f0a26758000-7f0a267a4000 r--p 00001000 08:05 4841753
/usr/lib/debug/lib/ld-2.11.1.so
7f0a267a4000-7f0a26857000 rw-p 00000000 00:00 0
7f0a26857000-7f0a26858000 r--p 00000000 08:05 5792628
/usr/share/locale-langpack/en_GB/LC_MESSAGES/libc.mo
7f0a26858000-7f0a268da000 rw-p 00000000 00:00 0
7f0a268da000-7f0a26919000 r--p 00000000 08:05 4874536
/usr/lib/locale/en_GB.utf8/LC_CTYPE
7f0a26919000-7f0a26920000 rw-p 00000000 00:00 0
7f0a26922000-7f0a26928000 r--p 0005e000 08:05 4841753
/usr/lib/debug/lib/ld-2.11.1.so
7f0a26928000-7f0a26933000 r--p 00054000 08:05 4841753
/usr/lib/debug/lib/ld-2.11.1.so
7f0a26935000-7f0a26938000 rw-p 00000000 00:00 0
7f0a26938000-7f0a2693e000 r--p 00000000 08:05 5792627
/usr/share/locale-langpack/en_GB/LC_MESSAGES/gdb.mo
7f0a2693e000-7f0a26945000 r--s 00000000 08:05 5417899
/usr/lib/gconv/gconv-modules.cache
7f0a26945000-7f0a26946000 r--p 00000000 08:05 4875999
/usr/lib/locale/en_GB.utf8/LC_MESSAGES/SYS_LC_MESSAGES
7f0a26946000-7f0a26948000 rw-p 00000000 00:00 0
7f0a26948000-7f0a26949000 r--p 0001f000 08:05 2900131 /lib/ld-2.11.1.so
7f0a26949000-7f0a2694a000 rw-p 00020000 08:05 2900131 /lib/ld-2.11.1.so
7f0a2694a000-7f0a2694b000 rw-p 00000000 00:00 0
7ffff92d6000-7ffff92f8000 rw-p 00000000 00:00 0 [stack]
7ffff93ff000-7ffff9400000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
 
N

Nobody

I've compiled
Python 2.7 (r27:82500, Nov 2 2010, 09:00:37) [GCC 4.4.3] on linux2

with the following configure options
./configure --prefix=/home/john/local/python-dbg --with-pydebug

I've installed numpy and some other packages but when I try to run my
extension code under gdb I get the errors below. Does anyone have any
ideas of how to track down what's happening here? I imagine I've
misconfigured something somewhere. Is valgrind the answer?

I imagine that your extension code is trashing the heap, in which case,
valgrind is probably the answer.

My first guess would be that something is writing to a heap block after it
has been deallocated (possibly due to omitting a Py_INCREF). Of course,
other causes are possible, but writing to deallocated memory is a common
problem when writing extensions for languages with garbage collection.
 
L

Lawrence D'Oliveiro

I imagine that your extension code is trashing the heap, in which case,
valgrind is probably the answer.

Something simpler to try first is to run the code with the MALLOC_CHECK_
environment variable set to 2 or 3. That might give a few more clues.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,930
Messages
2,570,072
Members
46,522
Latest member
Mad-Ram

Latest Threads

Top