This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: glibc error: corrupted double linked list (CPython 2.5.1)
Type: Stage:
Components: Interpreter Core Versions: Python 2.5
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: facundobatista, nnorwitz, rhettinger, yangzhang
Priority: normal Keywords:

Created on 2007-05-14 21:28 by yangzhang, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg32005 - (view) Author: Yang Zhang (yangzhang) Date: 2007-05-14 21:28
I'm sometimes (50% of the time) getting the following CPython 2.5.1 crash when my program terminates. I would include the source to my program, but it has lots of dependencies, and it would be a substantial task to find a minimal case.

*** glibc detected *** python: corrupted double-linked list: 0x0a2018a0 ***
======= Backtrace: =========
/lib/libc.so.6[0xd14e9f]
/lib/libc.so.6[0xd167ae]
/lib/libc.so.6(__libc_free+0x78)[0xd19f6f]
/usr/local/lib/libpython2.5.so.1.0(PyObject_Free+0x53)[0x211933]
/usr/local/lib/libpython2.5.so.1.0(PyObject_GC_Del+0x53)[0x288fc3]
/usr/local/lib/libpython2.5.so.1.0(PyFrame_Fini+0x31)[0x1f8f81]
/usr/local/lib/libpython2.5.so.1.0(Py_Finalize+0x105)[0x27d825]
/usr/local/lib/libpython2.5.so.1.0(Py_Exit+0x17)[0x27d927]
/usr/local/lib/libpython2.5.so.1.0[0x27da4f]
/usr/local/lib/libpython2.5.so.1.0(PyErr_PrintEx+0x1aa)[0x27dc6a]
/usr/local/lib/libpython2.5.so.1.0(PyErr_Print+0x1e)[0x27de6e]
/usr/local/lib/libpython2.5.so.1.0(PyRun_SimpleFileExFlags+0xf1)[0x27f0d1]
/usr/local/lib/libpython2.5.so.1.0(PyRun_AnyFileExFlags+0x7a)[0x27f46a]
/usr/local/lib/libpython2.5.so.1.0(Py_Main+0xae8)[0x288a78]
python(main+0x32)[0x8048592]
/lib/libc.so.6(__libc_start_main+0xdc)[0xcc84e4]
python[0x80484d1]
======= Memory map: ========
00110000-00120000 r-xp 00000000 08:02 489896     /lib/libpthread-2.4.so
00120000-00121000 r--p 0000f000 08:02 489896     /lib/libpthread-2.4.so
00121000-00122000 rw-p 00010000 08:02 489896     /lib/libpthread-2.4.so
00122000-00124000 rw-p 00122000 00:00 0
00124000-00147000 r-xp 00000000 08:02 489888     /lib/libm-2.4.so
00147000-00148000 r--p 00022000 08:02 489888     /lib/libm-2.4.so
00148000-00149000 rw-p 00023000 08:02 489888     /lib/libm-2.4.so
00149000-00159000 r-xp 00000000 08:02 2154663    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/cPickle.so
00159000-0015a000 rw-p 00010000 08:02 2154663    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/cPickle.so
0015a000-0015d000 r-xp 00000000 08:02 2154640    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/cStringIO.so
0015d000-0015e000 rw-p 00003000 08:02 2154640    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/cStringIO.so
0015e000-00161000 r-xp 00000000 08:02 2154619    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/time.so
00161000-00163000 rw-p 00002000 08:02 2154619    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/time.so
00163000-00167000 r-xp 00000000 08:02 2154653    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/collections.so
00167000-00168000 rw-p 00004000 08:02 2154653    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/collections.so
00168000-001a9000 r-xp 00000000 08:02 490243     /lib/libssl.so.0.9.8a
001a9000-001ad000 rw-p 00040000 08:02 490243     /lib/libssl.so.0.9.8a
001ad000-001af000 r-xp 00000000 08:02 2154635    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/fcntl.so
001af000-001b0000 rw-p 00002000 08:02 2154635    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/fcntl.so
001b0000-001b2000 r-xp 00000000 08:02 2154613    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/grp.so
001b2000-001b3000 rw-p 00001000 08:02 2154613    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/grp.so
001b3000-001b4000 r-xp 00000000 08:02 2154641    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/_bisect.so
001b4000-001b5000 rw-p 00001000 08:02 2154641    /toast/pkg/python/v2.5.1/1/root/lib/python2.5/lib-dynload/_bisect.so
001b5000-002bd000 r-xp 00000000 08:02 2139893    /toast/pkg/python/v2.5.1/1/root/lib/libpython2.5.so.1.0
002bd000-002e3000 rw-p 00107000 08:02 2139893    /toast/pkg/python/v2.5.1/1/root/lib/libpython2.5.so.1.0
002e3000-002e9000 rw-p 002e3000 00:00 0
002e9000-002f8000 r-xp 00000000 08:02 489892     /lib/libresolv-2.4.so
002f8000-002f9000 r--p 0000e000 08:02 489892     /lib/libresolv-2.4.so
002f9000-002fa000 rw-p 0000f000 08:02 489892     /lib/libresolv-2.4.so
002fa000-002fc000 rw-p 002fa000 00:00 0
002fc000-0030e000 r-xp 00000000 08:02 1290756    /usr/lib/libz.so.1.2.3
0030e000-0030f000 rw-p 00011000 08:02 1290756    /usr/lib/libz.so.1.2.3
0030f000-0032f000 r-xp 00000000 08:02 565445     /usr/lib/libpq.so.4.1
0032f000-00330000 rw-p 0001f000 08:02 565445     /usr/lib/libpq.so.4.1
00330000-0033f000 r-xp 00000000 08:02 2154660    /toast/pkg/pAborted
msg32006 - (view) Author: Yang Zhang (yangzhang) Date: 2007-05-14 21:31
just to add some more details:

this is on my up2date fedora core 5 box, with a built-from-source cpython 2.5.1. afaik i'm not using any non-standard extension modules.
msg32007 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-05-15 05:48
Yang Zhang, thanks for the report.  Unfortunately, it will be virtually impossible for us to try to debug this without a test case.  I see libpq.so in there, which I believe is from Postgres.  Is that correct?  There is no postgres module that's part of standard python.  The extension module is a third party extension.  It's possible that's where the problem is.  Without more info, it could really be anywhere.

Perhaps you could run this under valgrind or some other memory debugger and find the problem or at least narrow it down?  
msg32008 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2007-05-18 23:27
Recommend closing this as a third-party bug (Python doesn't have a doubly-linked list object).

FWIW, I would guess this bug has to do with violating the tight invariants around this data structure (i.e. linked elements having to subclass from a link object, avoiding circular references, keeping the length attribute up-to-date, and assuring that the endpoint links point to something indicated the end of the chain).
msg62823 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2008-02-23 22:25
As Raymond says, it's not a Python issue, but an extension one.
History
Date User Action Args
2022-04-11 14:56:24adminsetgithub: 44953
2008-02-23 22:25:43facundobatistasetstatus: open -> closed
nosy: + facundobatista
resolution: rejected
messages: + msg62823
2007-05-14 21:28:54yangzhangcreate