glibc detected double free or corruption

Discussion in 'Python' started by Aryeh Leib Taurog, Feb 8, 2010.

  1. I'm encountering the following error on my fastcgi web server and
    would
    greatly appreciate ANY pointers for debugging/fixing this problem.

    *** glibc detected *** /usr/bin/python2.5: double free or corruption
    (fasttop): 0x08b47d60 ***

    If I don't set MALLOC_CHECK_ then the server just hangs and the above
    message appears in the fastcgi error log. With MALLOC_CHECK_=0 I get
    an
    error message in the browser instead.

    I'm using the following components (on a shared hosting account):

    Debian lenny 64 bit
    Python 2.5.2
    lighttpd 1.4.19
    Django 1.1.1
    latest flup (today's hg tip, flup-server-ae5fe54fba18)
    postgresql 8.3.9
    psycopg2 2.0.13

    What's interesting about the problem is it seems to happen only when
    new
    fcgi processes are spawned and only when a db query is made. That is,
    the
    frequency of the problem corresponds exactly with the maxrequests
    setting
    on my fcgi process. If I set maxrequests to 1 then I get this error
    for
    each request that hits the database. If I set it to 3 then I get the
    error
    with every third request, if that request hits the database.

    If I put Django into DEBUG and set MALLOC_CHECK_=0 then I get the
    following
    error with traceback:

    Exception Type: OperationalError
    Exception Value: server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.

    Exception Location: /home/altaurog/django/db/backends/util.py in
    execute, line 19

    Regardless of which url/view I request, the exception always is raised
    on a
    sql execute statement.

    ---
    Aryeh Leib Taurog
    Aryeh Leib Taurog, Feb 8, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Grant Edwards

    glibc detected double free or corruption

    Grant Edwards, Dec 20, 2006, in forum: Python
    Replies:
    0
    Views:
    414
    Grant Edwards
    Dec 20, 2006
  2. Delaney, Timothy (Tim)

    RE: glibc detected double free or corruption

    Delaney, Timothy (Tim), Dec 20, 2006, in forum: Python
    Replies:
    0
    Views:
    519
    Delaney, Timothy (Tim)
    Dec 20, 2006
  3. chuan
    Replies:
    2
    Views:
    3,085
    James Kanze
    Nov 15, 2008
  4. Gabriel Genellina
    Replies:
    1
    Views:
    567
    Gabriel Genellina
    Feb 25, 2009
  5. Pallav singh
    Replies:
    1
    Views:
    466
    Jens Thoms Toerring
    Jan 29, 2012
Loading...

Share This Page