Skip site navigation (1) Skip section navigation (2)

Re: backtrace in 2.4.2

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: David Butler <dave(at)croepha(dot)com>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: backtrace in 2.4.2
Date: 2011-08-22 15:40:06
Message-ID: CA+mi_8ZgPmBZ0+PuA=TgFEqg=RAfk2g3=BmMOZ2TR2+Bx7ztvA@mail.gmail.com (view raw or flat)
Thread:
Lists: psycopg
On Mon, Aug 22, 2011 at 3:53 PM, David Butler <dave(at)croepha(dot)com> wrote:
> I have been trying to figure out why my program keeps crashing, It can take
> several hours before I can duplicate this problem.  The issue seems to have
> something to do with psycopg.... here is the stack trace I got with gdb:
> #0  0xb7f36a37 in PyErr_Occurred () from /usr/lib/libpython2.7.so.1.0
...
> This is purely speculation, but I think it has something to do with
> connecting again, after a connection dies because of a time out...
> Thanks, any ideas, questions or comments are welcome

Yes, I think we've already a patch for this bug: for a mistake we
query whether a Python error occurred without grabbing the GIL before
(which is Bad™). Trying to begin a transaction with a broken
connection is a possible way to trigger the bug.

The patch is already in the devel branch and is scheduled for release
in psycopg 2.4.3: you can grab it from
https://dndg.it/cgi-bin/gitweb.cgi?p=public/psycopg2.git;a=commit;h=de6f2ac387231fcd57c05031c82471ea57255e2b

It would be great if you could compile a copy of psycopg from the
devel branch (or just apply the patch over a checkout from head) and
test if it fixes the bug for you.

Sorry for the inconvenience.

-- Daniele

In response to

psycopg by date

Next:From: Massimo Di PierroDate: 2011-09-02 13:50:37
Subject: psycopg2.extensions.adap
Previous:From: David ButlerDate: 2011-08-22 14:53:03
Subject: backtrace in 2.4.2

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group