Re: Tracebacks with gevent and set_wait_callback go "missing"

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Oliver Beattie <oliver(at)obeattie(dot)com>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: Tracebacks with gevent and set_wait_callback go "missing"
Date: 2012-09-06 15:37:10
Message-ID: CA+mi_8b6Z1MUZ1RJ3wAenx24f1GjuufHBMVYtL4ueWh-fKhNew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Thu, Sep 6, 2012 at 4:09 PM, Oliver Beattie <oliver(at)obeattie(dot)com> wrote:
> Hi all,
>
> I'm trying to debug an issue I'm seeing in production, whereby
> traceback information about an exception is missing. This is
> incredibly frustrating as it makes it extremely difficult to track
> down errors.

And what is your exception?

> This has been observed before, as I found a ticket on the
> Gunicorn GitHub site relating to this:
>
> https://github.com/benoitc/gunicorn/issues/214
>
> Specifically, what happens is when an exception is raised, the
> traceback part of sys.exc_info() is None. To me, it seems the most
> likely suspect is psycopg2, since this is going into C-land (though
> obviously not the only possible explanation). I was wondering if
> anyone on this else knows of this issue, or anything that may cause
> it?

In the last years every I've spent quite some time debugging cases of
"there's a bug in my program, it uses psycopg, hence it's psycopg's
fault". Luckily, always more often, this has not been the case
anymore.

If you suspect psycopg is to be blamed, run your program with psycopg
debug enabled, capture stdout and wait for the neutrino to strike. If
anything weird has happened into psycopg that ended up clobbering the
exception it's likely you have a log for it, in which case we'd be
happy to assist and debug.

-- Daniele

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Oliver Beattie 2012-09-07 10:05:24 Re: Tracebacks with gevent and set_wait_callback go "missing"
Previous Message Oliver Beattie 2012-09-06 15:09:24 Tracebacks with gevent and set_wait_callback go "missing"