Re: BUG #4958: Stats collector hung on WaitForMultipleObjectsEx while attempting to recv a datagram

From: Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com>
To: Luke Koops <luke(dot)koops(at)entrust(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #4958: Stats collector hung on WaitForMultipleObjectsEx while attempting to recv a datagram
Date: 2009-08-06 06:36:25
Message-ID: a301bfd90908052336w1423cbf4p56f05a9ec0c99cb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

> Knowing that it is possible for WaitForMultipleObjectsEx to lock up means that it is not safe to call with an INFINITE timeout.  The workaround that's being discussed is beginning to look like the one at line 172 of socket.c.  It's bad enough that there is a WSASend in pgwin32_waitforsinglesocket().  I doubt you also want to add a WSARecv.  There should be a cleaner way to handle both of these situations.
>

The change at line 318 in socket.c and using an infinite loop there as
proposed by Magnus, makes much more sense IMO.

> I am planning to eventually kill the stats collector and see if that clears up the hanging issue, but I want to keep the system state in place for a bit longer in case there is some other diagnostic steps I should try.  I've exhausted everything I could think of.
>

Yeah it will be interesting to see if the collector starts functioning
fine after the restart. That might hint that the kernel object
representing the socket is maybe fine but would not prove conclusively
that the issue is with PG code because the layer used by
WaitForMultipleObjectsEx might have issues too.

Regards,
Nikhils
--
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Paul Matthews 2009-08-06 07:56:11 BUG #4967: polygon @> point incorrect for points close to shared borders
Previous Message Jaime Casanova 2009-08-06 06:14:51 Re: Fwd: [BUGS] fix: plpgsql: return query and dropped columns problem