Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 466F42BF84 for ; Fri, 16 Dec 2011 10:11:06 -0400 (AST) Received: from fw.sogeasoft.biz ([151.9.34.199]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RbYV5-0002Pg-DN for pgsql-bugs@postgresql.org; Fri, 16 Dec 2011 14:11:05 +0000 Received: from localhost (localhost [127.0.0.1]) by fw.sogeasoft.biz (Postfix) with ESMTP id C3F0F340826B1; Fri, 16 Dec 2011 15:10:49 +0100 (CET) X-Virus-Scanned: amavisd-new at fw.sogeasoft.biz Received: from fw.sogeasoft.biz ([127.0.0.1]) by localhost (fw.sogeasoft.biz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w-cttitIIWoj; Fri, 16 Dec 2011 15:10:48 +0100 (CET) Received: from andreagrassi (123-2-1-233.core.dodo.com.au [123.2.1.233]) by fw.sogeasoft.biz (Postfix) with ESMTP id 8FF863408128C; Fri, 16 Dec 2011 15:10:48 +0100 (CET) From: "Andrea Grassi" To: "'Craig Ringer'" Cc: References: <4EEB0006.7080205@ringerc.id.au> In-Reply-To: <4EEB0006.7080205@ringerc.id.au> Subject: R: BUG #6342: libpq blocks forever in "poll" function Date: Fri, 16 Dec 2011 15:10:47 +0100 Message-ID: <001201ccbbfc$82c987a0$885c96e0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acy7zAiqs8axA2GaSb6unA3+PiGUIQALkTww Content-Language: it X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201112/131 X-Sequence-Number: 31942 The client program and the postgres server are on the same host, client = connects to 127.0.0.1. In the meantime, my original program blocks (not my example but very = probably the reasons are the same).=20 I typed "ps -C testprogramname -o wchan:80=3D" and the output was only a = single dash ( "-" ). I searched for the complete stack in /proc/$pid/stack (where $pid) was = the pid of my process but this file doesn't exists !! Why ?=20 I'm waiting for my example to block in order to send you what you = request me about the test program (even if the output almost surely will = be the same). Regards,=20 Andrea Grassi -----Messaggio originale----- Da: Craig Ringer [mailto:ringerc@ringerc.id.au]=20 Inviato: venerd=C3=AC 16 dicembre 2011 9.24 A: andreagrassi@sogeasoft.com Cc: pgsql-bugs@postgresql.org Oggetto: Re: [BUGS] BUG #6342: libpq blocks forever in "poll" function On 12/16/2011 03:45 PM, andreagrassi@sogeasoft.com wrote: > The following bug has been logged on the website: > > Bug reference: 6342 > Logged by: Andrea Grassi > Email address: andreagrassi@sogeasoft.com > PostgreSQL version: 8.4.8 > Operating system: SUSE SLES 10 SP4 64 BIT > Description: > > Hi, > I have a big and strange problem. Sometimes, libpq remains blocked in = =E2=80=9Cpoll=E2=80=9D > function even if the server has already answered to the query. If I = attach > to the process using kdbg I found this stack: > > __kernel_vsyscall() > poll() from /lib/libc.so.6 Given all you described (thanks for all the detail!) then if client and=20 server are on different hosts this could easily be a NIC driver or HW=20 issue. It'd be interesting to see the output of: ps -C testprogramname -o wchan:80=3D -- Craig Ringer