pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nikhil Sontakke <nikhil.sontakke@enterprisedb.com>
To: Luke Koops <luke.koops@entrust.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #4958: Stats collector hung on WaitForMultipleObjectsEx while attempting to recv a datagram
Date: Thu, 6 Aug 2009 12:06:25 +0530
Message-ID: <a301bfd90908052336w1423cbf4p56f05a9ec0c99cb@mail.gmail.com> (raw)
In-Reply-To: <A3144629B5AC714A8BF27806EBFA70575146229F@sottexch7.corp.ad.entrust.com>
References: <200907311459.n6VExuSa036743@wwwmaster.postgresql.org>
	<9837222c0908010828x7182494av3fd5909b64f4b2ad@mail.gmail.com>
	<a301bfd90908030647l350f6348ne1231bb9fd113280@mail.gmail.com>
	<9837222c0908030656m6ed69a26gc90a6c94b41a4c47@mail.gmail.com>
	<a301bfd90908030712h3668b135g16cce3a12c332a93@mail.gmail.com>
	<9837222c0908030716r416d789ewef3f77c65b39d916@mail.gmail.com>
	<a301bfd90908030720m564e2372j4ef5257be15cabaf@mail.gmail.com>
	<9837222c0908030730kd59b9c2v7583666c5716aead@mail.gmail.com>
	<a301bfd90908030737p6c1eba91u8bb413647ce18679@mail.gmail.com>
	<A3144629B5AC714A8BF27806EBFA70575146229F@sottexch7.corp.ad.entrust.com>

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



view thread (25+ messages)  latest in thread

Message-ID: <a301bfd90908052336w1423cbf4p56f05a9ec0c99cb@mail.gmail.com>
Permalink:  ../a301bfd90908052336w1423cbf4p56f05a9ec0c99cb@mail.gmail.com/
Also on:    postgresql.org/message-id/a301bfd90908052336w1423cbf4p56f05a9ec0c99cb@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: nikhil.sontakke@enterprisedb.com, luke.koops@entrust.com, magnus@hagander.net, alvherre@commandprompt.com
  Subject: Re: BUG #4958: Stats collector hung on WaitForMultipleObjectsEx while attempting to recv a datagram
  In-Reply-To: <a301bfd90908052336w1423cbf4p56f05a9ec0c99cb@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