Re: psycopg2 2.0.8 - segmentation fault

James Henstridge <[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
On Wed, Mar 25, 2009 at 2:13 PM, Gangadharan S.A. <[email protected]> wrote:
>
> 2009/3/24 Federico Di Gregorio <fog-NGVKUo/i/[email protected]>
>>
>> It would really helpful if you could compile psycopg with debug symbols
>> and run it on a Python with debug symbols. Also please set PSYCOPG_DEBUG
>> in the environment and send me the log, a backtrace with symbols and
>> anything else you think would help to fix the problem.
>>
>
>
> We tried compiling python with "--with-pydebug" and psycopg with
> PSYCOPG_DEBUG set. We now get a new problem, with the application failing at
> this assertion:
>
> "python: Modules/gcmodule.c:260: update_refs: Assertion `gc->gc.gc_refs !=
> 0' failed."
>
> Googling the above issue did not prove very helpful.
>
> Avoiding "--with-pydebug" when compiling python seems to avoid this problem,
> but then backtrace output does not seem to have any additional information.
>
> Is there something we need to be doing differently?

Compiling with pydebug is not necessary.  If I'm debugging

Just make sure the code is compiled with the "-g" flag passed to the
compiler (this should happen automatically if you're using gcc and
haven't overridden CFLAGS), and don't strip the executables and
libraries when installing.

The same goes for compiling psycopg2.

If debug information is available, then we should get the actual
function names in stack traces.  And if you produce a stack trace with
gdb, we should also get information about the function arguments.

James.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.