Re: R: R: R: R: BUG #6342: libpq blocks forever in "poll" function

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrea Grassi <andreagrassi(at)sogeasoft(dot)com>, harrywr2(at)comcast(dot)net, 'Pg Bugs' <pgsql-bugs(at)postgresql(dot)org>, 'Alvaro Herrera' <alvherre(at)commandprompt(dot)com>
Subject: Re: R: R: R: R: BUG #6342: libpq blocks forever in "poll" function
Date: 2011-12-20 23:56:07
Message-ID: 4EF12097.5060907@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 21/12/2011 1:42 AM, Tom Lane wrote:
> Hrm. What's with the 48 bytes in the client's receive queue? Surely
> the kernel should be reporting that the socket is read-ready, if it's
> got some data. I think you've found an obscure kernel bug ---- somehow
> it's failing to wake the poll() caller.
>
I've been leaning that way too; that's why I was asking him for
/proc/$pid/stack and `wchan -C programname -o wchan:80=` output - to get
some idea of what function in the kernel it's sitting in.

Unfortunately the OP is on some enterprise distro that doesn't have
/proc/$pid/stack . wchan info would still be useful. I wonder how old
their kernel is? The bug could've already been fixed. /proc/pid/stack
has been around since 2008 so it must be pretty elderly.

OP: You can also get a kernel stack for a process by enabling the magic
SysRQ key (see Google) then using Alt-SysRq-T . This requires a physical
keyboard directly connected to the server. It emits the stack
information via dmesg. See:

http://en.wikipedia.org/wiki/Magic_SysRq_key

There's a "sysrqd" that apparently lets you use these features remotely,
but I've never tried it.

--
Craig Ringer

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Craig Ringer 2011-12-20 23:59:51 Re: R: R: BUG #6342: libpq blocks forever in "poll" function
Previous Message Kevin Grittner 2011-12-20 22:02:46 Re: Security definer "generated column" function used in index