Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

still "double free or corruption" crashes

#198

Submitted by: ilengyel@yahoo.com

The package compiles without error; however, python codes using psycopg2 crashes randomly and frequently with "double free or corruption" error even on simple select queries (the client and server are on the same machine). OS is RHEL 6.5 (64-bit Intel-Xeon hardware), Python 2.6.6, Postgresql 9.3 and everything is compiled locally. No python crashes when connected from a remote machine which runs Fedora19 or 20 so the problem is not the server. On the remote client Psycopg2 was compiled using the same version of supporting libpq as on the server. It must be something related to compiler version or flags that may cause memory corruption. This "double free or corruption" problem appears to be an issue going back 5-6 years. Looks like there is no clear, stable solution yet. Tried to recompile psycopg2 with -O2 flag (solved the issue for one), but not for me. I am puzzled how the issue re-appears with every version of psycopg2 for some. I really like some features of postgresql, but this will force me back to mysql as I cannot change the OS on this specific machine.

Reported by Psycopg website · March 10th, 2014 @ 02:44 PM

State: invalid
Milestone: none
Assigned to: nobody

Activity

  1. Daniele Varrazzo
    Daniele Varrazzo

    Can you provide a stack trace of some sort?

    Are you sure 2.5.2 is the version you are using?

    If crashes are repeated it smells more you are somehow end up using a wrong version of free(): if we had widespread segfaults even on simple queries we'd have tons of reports by now and yours is the first. The problem you mention that may got fix by -O2 is probably the concurrency problem in #166 Double-free in connection dealloc fixed in 2.5.1, but that was much harder to trigger.

    March 10th, 2014 @ 03:05 PM

  2. Daniele Varrazzo
    Daniele Varrazzo
    • State changed from new to invalid

    Closing this as it's unlikely it's our fault

    April 3rd, 2014 @ 12:21 AM