Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id A885643CEB8 for ; Thu, 19 Jan 2012 11:20:33 -0400 (AST) Received: from fw.sogeasoft.biz ([151.9.34.199]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rntmu-0007Tx-FC for pgsql-bugs@postgresql.org; Thu, 19 Jan 2012 15:20:33 +0000 Received: from localhost (localhost [127.0.0.1]) by fw.sogeasoft.biz (Postfix) with ESMTP id C3048340826B7; Thu, 19 Jan 2012 16:22:05 +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 5tl8siCnAE21; Thu, 19 Jan 2012 16:22:03 +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 C272934081295; Thu, 19 Jan 2012 16:22:03 +0100 (CET) From: "Andrea Grassi" To: "'Tom Lane'" Cc: "'Craig Ringer'" , , "'Pg Bugs'" , "'Alvaro Herrera'" 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> <6410.1324402946@sss.pgh.pa.us> <4EF12097.5060907@ringerc.id.au> <000c01ccbfd6$1d5a5e70$580f1b50$@com> <5744.1324483234@sss.pgh.pa.us> In-Reply-To: <5744.1324483234@sss.pgh.pa.us> Subject: R: R: R: R: R: R: BUG #6342: libpq blocks forever in "poll" function Date: Thu, 19 Jan 2012 16:20:10 +0100 Message-ID: <000901ccd6bd$d5e9bcd0$81bd3670$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acy/+bpIw8i7O7WdSfC73DcfNJk7mAWwnMEA Content-Language: it X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/140 X-Sequence-Number: 32207 To try to solve this problem my colleague (the systems engineer that = takes care of the machine) did: 1. Disable drivers HP : NOT SOLVED 2. Disable Hyperthreading: NOT SOLVED 3. Reduced the phisical CPU (enabled on boot) from 32 to 16: THIS = SOLVED THE PROBLEM. Now 2 weeks passed without blocking and the problem seems temporary = solved. We have made an accurate test on the hardware but it's seems to be ok. It's seems to be a kernel bug, so I posted the problem to Novell = support. Thanks for the help. Regards=20 Andrea Grassi =20 -----Messaggio originale----- Da: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20 Inviato: mercoled=EC 21 dicembre 2011 17.01 A: Andrea Grassi Cc: 'Craig Ringer'; harrywr2@comcast.net; 'Pg Bugs'; 'Alvaro Herrera' Oggetto: Re: R: R: R: R: R: [BUGS] BUG #6342: libpq blocks forever in = "poll" function=20 "Andrea Grassi" writes: > In internet I searched for detailed specifications of poll/select = system > functions but I didn't understand one thing, that is which one of the = 2 > statement is true: > 1) poll/select wait only for FUTURE modifications of ready-read state = of > sockets > 2) poll/select check if there is something to read at the moment of = the call > and otherwise wait for FUTURE modifications of ready-read state #1 is nonsense. If poll worked like that, it would be impossible for anyone to use it without suffering from race conditions. But if you don't see where exactly the poll() specification says so, I observe that it says first that poll sets the bit(s) if the requested condition is true, and second that *if* none of the events have occurred yet, poll should wait. See for instance http://pubs.opengroup.org/onlinepubs/007908799/xsh/poll.html regards, tom lane