Re: Bug in libpq causes local clients to hang

From: "Jeffrey Baker" <jwbaker(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bug in libpq causes local clients to hang
Date: 2008-03-24 02:17:15
Message-ID: fd145f7d0803231917h3b2512f7yf40addc9f2d85975@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 23, 2008 at 7:12 PM, Jeffrey Baker <jwbaker(at)gmail(dot)com> wrote:
> Lately I've noticed that local (UNIX socket) clients using libpq4
> 8.1.9 (Debian 8.1.9-0etch1) and the same version of the server can
> hang forever waiting in poll(). The symptom is that the local client
> waits forever, using no CPU time, until it is interrupted by some
> event (such as attaching gdb or strace to it), after which it proceeds
> normally. From the server's perspective, such clients are in the
> state "<IDLE> in transaction" as reported via pg_stat_activity. I
> attached GDB to one such client, and the stack trace is as follows:
>
> #0 0x00002b4f2f914d7f in poll () from /lib/libc.so.6
> #1 0x00002b4f3038449f in PQmblen () from /usr/lib/libpq.so.4
> #2 0x00002b4f30384580 in pqWaitTimed () from /usr/lib/libpq.so.4
> #3 0x00002b4f30383e62 in PQgetResult () from /usr/lib/libpq.so.4
> #4 0x00002b4f30383f3e in PQgetResult () from /usr/lib/libpq.so.4
> #5 0x00002b4f3025f014 in dbd_st_execute () from
> /usr/lib/perl5/auto/DBD/Pg/Pg.so
> #6 0x00002b4f302548b6 in XS_DBD__Pg__db_do () from
> /usr/lib/perl5/auto/DBD/Pg/Pg.so
> #7 0x00002b4f2fd201f0 in XS_DBI_dispatch () from /usr/lib/perl5/auto/DBI/DBI.so
> #8 0x00002b4f2f310b95 in Perl_pp_entersub () from /usr/lib/libperl.so.5.8
> #9 0x00002b4f2f30f36e in Perl_runops_standard () from /usr/lib/libperl.so.5.8
> #10 0x00002b4f2f2ba7dc in perl_run () from /usr/lib/libperl.so.5.8
> #11 0x00000000004017ac in main ()

Following up to myself, I note that a very similar issue was reported,
with a very similar stack, only two days ago, with subject "ecpg
program getting stuck" archived at

http://groups.google.com/group/pgsql.general/browse_thread/thread/0b7ede57faad803e/9abfd7ab1b7e1d86

-jwb

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-03-24 03:30:03 Re: TODO Item: Consider allowing control of upper/lower case folding of unquoted, identifiers
Previous Message Jeffrey Baker 2008-03-24 02:12:34 Bug in libpq causes local clients to hang