pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrea Grassi <andreagrassi@sogeasoft.com>
Cc: harrywr2@comcast.net
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Subject: Re: R: R: R: R: BUG #6342: libpq blocks forever in "poll" function
Date: Wed, 21 Dec 2011 07:56:07 +0800
Message-ID: <4EF12097.5060907@ringerc.id.au> (raw)
In-Reply-To: <6410.1324402946@sss.pgh.pa.us>
References: <E1RbSUA-0003kd-Tb@wrigleys.postgresql.org>
	<4EEB0006.7080205@ringerc.id.au>
	<001201ccbbfc$82c987a0$885c96e0$@com>
	<4EEC3462.80702@ringerc.id.au>
	<000601ccbef6$060820d0$12186270$@com>
	<1324395708-sup-4443@alvh.no-ip.org>
	<001701ccbf34$72480970$56d81c50$@com>
	<20092.1324399103@sss.pgh.pa.us>
	<002301ccbf3c$cc34b110$649e1330$@com>
	<6410.1324402946@sss.pgh.pa.us>

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



view thread (3+ messages)

Message-ID: <4EF12097.5060907@ringerc.id.au>
Permalink:  ../4EF12097.5060907@ringerc.id.au/
Also on:    postgresql.org/message-id/4EF12097.5060907@ringerc.id.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: ringerc@ringerc.id.au, tgl@sss.pgh.pa.us, andreagrassi@sogeasoft.com, harrywr2@comcast.net, alvherre@commandprompt.com
  Subject: Re: R: R: R: R: BUG #6342: libpq blocks forever in "poll" function
  In-Reply-To: <4EF12097.5060907@ringerc.id.au>
  References: <E1RbSUA-0003kd-Tb@wrigleys.postgresql.org> <4EEB0006.7080205@ringerc.id.au> <001201ccbbfc$82c987a0$885c96e0$@com> <4EEC3462.80702@ringerc.id.au> <000601ccbef6$060820d0$12186270$@com> <1324395708-sup-4443@alvh.no-ip.org> <001701ccbf34$72480970$56d81c50$@com> <20092.1324399103@sss.pgh.pa.us> <002301ccbf3c$cc34b110$649e1330$@com> <6410.1324402946@sss.pgh.pa.us> <4EF12097.5060907@ringerc.id.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox