postgresql-plpython-8.1 crash on feisty w/launchpad

Bug #85647 reported by Barry Warsaw
12
Affects Status Importance Assigned to Milestone
postgresql-8.1 (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Developing Launchpad on Feisty, I have a reproducible crash of postgresql-plpython-8.1 when I run "make check" in a Launchpad branch. Follow the directions on RocketFuelSetup and when you get to the "make check" step, tail /var/log/postgresql/postgresql-8.1-main.log. I get the following in the log file:

*** glibc detected *** postgres: barry template1 [local] SELECT: free(): invalid
 pointer: 0xb6efee90 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7bf37ad]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7bf6e10]
/usr/lib/postgresql/8.1/lib/plpython.so[0xb709f894]
/usr/lib/libpython2.5.so.1.0[0xb6fa4ce3]
/usr/lib/libpython2.5.so.1.0(PyEval_EvalFrameEx+0xa28)[0xb6ffd518]
/usr/lib/libpython2.5.so.1.0(PyEval_EvalFrameEx+0x5ed7)[0xb70029c7]
/usr/lib/libpython2.5.so.1.0(PyEval_EvalCodeEx+0x7c4)[0xb7003d34]
/usr/lib/libpython2.5.so.1.0(PyEval_EvalCode+0x63)[0xb7003db3]
/usr/lib/postgresql/8.1/lib/plpython.so[0xb70a0d3e]
/usr/lib/postgresql/8.1/lib/plpython.so[0xb70a2c87]
/usr/lib/postgresql/8.1/lib/plpython.so(plpython_call_handler+0xf6)[0xb70a2fb6]
postgres: barry template1 [local] SELECT(ExecMakeFunctionResult+0x12f)[0x815349f
]
postgres: barry template1 [local] SELECT[0x8156bec]
postgres: barry template1 [local] SELECT(ExecProject+0x1f8)[0x8152468]
postgres: barry template1 [local] SELECT(ExecResult+0x69)[0x8162779]
postgres: barry template1 [local] SELECT(ExecProcNode+0xf5)[0x8151b15]
postgres: barry template1 [local] SELECT(ExecutorRun+0x40b)[0x8150c9b]
postgres: barry template1 [local] SELECT[0x81e3945]
postgres: barry template1 [local] SELECT(PortalRun+0x2e9)[0x81e4749]
postgres: barry template1 [local] SELECT[0x81dfee1]
postgres: barry template1 [local] SELECT(PostgresMain+0x15c4)[0x81e1ca4]
postgres: barry template1 [local] SELECT[0x81b5faa]
postgres: barry template1 [local] SELECT(PostmasterMain+0xd21)[0x81b7281]
postgres: barry template1 [local] SELECT(main+0x274)[0x8174384]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb7ba1ebc]
postgres: barry template1 [local] SELECT[0x8082fc1]

and "make check" spews out this:

Traceback (most recent call last):
  File "../../utilities/pgmassacre.py", line 152, in ?
    sys.exit(main())
  File "../../utilities/pgmassacre.py", line 124, in main
    send_signal(database, SIGINT)
  File "../../utilities/pgmassacre.py", line 56, in send_signal
    cur.execute("SELECT _pgmassacre_killall(%(signal)s)", vars())
psycopg.ProgrammingError: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

SELECT _pgmassacre_killall(2)

That "unexpected" server close corresponds to the crash to this error. Sadly I haven't figured out how to get a usable traceback yet.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for the report. Jonathan, if you could create a minimal reproducer I would really appreciate that. postgresql-common has an extensive test suite which does check the basic operation of PL/Python (I would not upload a new version with any of the tests failing). I would like to add this test case to the test suite.

Did anyone of you already try the patch mentioned on http://archives.postgresql.org/pgsql-hackers/2006-11/msg00167.php?

Changed in postgresql-8.1:
status: Unconfirmed → Needs Info
assignee: nobody → pitti
Revision history for this message
Martin Pitt (pitti) wrote :

Oh, please also keep in mind that 8.1 is not supported any more in Feisty (on current edgy->feisty upgrades you will get an 'obsolete version' warning). Does 8.2 still have this bug?

Revision history for this message
Jonathan Lange (jml) wrote :

I've just set up postgresql-8.2 for Launchpad development on Feisty and do not get this bug. (Yay!)

Revision history for this message
Martin Pitt (pitti) wrote :

Will build against Python 2.4.

Changed in postgresql-8.1:
importance: Undecided → Medium
status: Needs Info → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

 postgresql-8.1 (8.1.8-1ubuntu2) feisty; urgency=low
 .
   * debian/control: Build PL/Python against Python 2.4 since it crashes with
     2.5 in some cases. (LP: #85647)
   * debian/control: Set Ubuntu maintainer.

Changed in postgresql-8.1:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.