Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 7CA98227494 for ; Tue, 20 Dec 2011 13:42:46 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rd3i6-0003td-CQ for pgsql-bugs@postgresql.org; Tue, 20 Dec 2011 17:42:46 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id pBKHgQ9J006411; Tue, 20 Dec 2011 12:42:27 -0500 (EST) To: "Andrea Grassi" cc: harrywr2@comcast.net, "'Craig Ringer'" , "'Pg Bugs'" , "'Alvaro Herrera'" Subject: Re: R: R: R: R: BUG #6342: libpq blocks forever in "poll" function In-reply-to: <002301ccbf3c$cc34b110$649e1330$@com> References: <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> Comments: In-reply-to "Andrea Grassi" message dated "Tue, 20 Dec 2011 18:28:31 +0100" Date: Tue, 20 Dec 2011 12:42:26 -0500 Message-ID: <6410.1324402946@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -4.5 (----) X-Archive-Number: 201112/173 X-Sequence-Number: 31984 "Andrea Grassi" writes: > This is the server side stack kept by gdb: > [ server is waiting to receive something from client ] > The netstat command on client and server connection has this output: > The first line should be the server, the second the client. > Proto Recv-Q Send-Q Local Address Foreign Address State > PID/Program name > tcp 0 0 127.0.0.1:5432 127.0.0.1:53129 > ESTABLISHED - > tcp 48 0 127.0.0.1:53129 127.0.0.1:5432 > ESTABLISHED 29802/g_mrprun.e 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. regards, tom lane