pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Magnus Hagander <magnus@hagander.net>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Luke Koops <luke.koops@entrust.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #4958: Stats collector hung on WaitForMultipleObjectsEx while attempting to recv a datagram
Date: Sat, 1 Aug 2009 17:28:10 +0200
Message-ID: <9837222c0908010828x7182494av3fd5909b64f4b2ad@mail.gmail.com> (raw)
In-Reply-To: <20090731234901.GD11098@alvh.no-ip.org>
References: <200907311459.n6VExuSa036743@wwwmaster.postgresql.org>
	<20090731234901.GD11098@alvh.no-ip.org>

On Sat, Aug 1, 2009 at 01:49, Alvaro Herrera<alvherre@commandprompt.com> wrote:
> Luke Koops wrote:
>
>> Description:        Stats collector hung on WaitForMultipleObjectsEx while
>> attempting to recv a datagram
>> Details:
>>
>> While running a load test with 80 processes connected to postgres, of which
>> 62 were generating load, the stats collector got blocked on
>> WaitForMultipleObjectsEx which was called with INFINITE timeout.  The stack
>> trace for the hung thread follows:
>
>
>> ntdll.dll!NtWaitForMultipleObjects+0xc
>> kernel32.dll!WaitForMultipleObjectsEx+0x11a
>> postgres.exe!pgwin32_waitforsinglesocket+0x1ed
>> postgres.exe!pgwin32_recv+0x90
>> postgres.exe!PgstatCollectorMain+0x17f
>> postgres.exe!SubPostmasterMain+0x33a
>> postgres.exe!main+0x168
>> postgres.exe!__tmainCRTStartup+0x10f
>> kernel32.dll!BaseProcessStart+0x23
>
> I have seen this problem too.  The process seems stuck for no good
> reason.  I wondered at the time if it could be a kernel issue.  I
> remember trying to send some data to the collector to verify whether
> it'd wake up, but no luck.  (I mean I couldn't find a way to do it on
> Windows).

I have seen this as well, but only in cases where there has been
broken firewall software or such things involved. I have seen a couple
of reports from the field though.

Anyway, this really is a should-never-happen thing. As soon as a new
packet is sent in, WaitForMultipleObjectsEx() should return right
away. And given that backends regularly send packets over, it
shouldn't be an issue even if we miss one...

To generate packets, you should be able to use for example "nc" that
is available as a win32 binary as well.


-- 
 Magnus Hagander
 Self: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/



view thread (25+ messages)  latest in thread

Message-ID: <9837222c0908010828x7182494av3fd5909b64f4b2ad@mail.gmail.com>
Permalink:  ../9837222c0908010828x7182494av3fd5909b64f4b2ad@mail.gmail.com/
Also on:    postgresql.org/message-id/9837222c0908010828x7182494av3fd5909b64f4b2ad@mail.gmail.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: magnus@hagander.net, alvherre@commandprompt.com, luke.koops@entrust.com
  Subject: Re: BUG #4958: Stats collector hung on WaitForMultipleObjectsEx while attempting to recv a datagram
  In-Reply-To: <9837222c0908010828x7182494av3fd5909b64f4b2ad@mail.gmail.com>

* 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