pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan de Visser <jdevisser@digitalfairway.com>
To: pgsql-performance@postgresql.org
Subject: Re: Hanging queries on dual CPU windows
Date: Fri, 10 Mar 2006 09:47:22 -0500
Message-ID: <200603100947.22460.jdevisser@digitalfairway.com> (raw)
In-Reply-To: <200603100933.00047.jdevisser@digitalfairway.com>
References: <6BCB9D8A16AC4241919521715F4D8BCEA35104@algol.sollentuna.se>
	<200603100903.14517.jdevisser@digitalfairway.com>
	<200603100933.00047.jdevisser@digitalfairway.com>

On Friday 10 March 2006 09:32, Jan de Visser wrote:
> > > Actually, stack2 looks very interesting. Does it "stay stuck" in
> > > pg_queue_signal? That's really not supposed to happen.
> >
> > Yes it does.
>
> An update on that: There is actually *two* processes in this state, both
> hanging in pg_queue_signal. I've looked at the source of that, and the
> obvious candidate for hanging is EnterCriticalSection. I also found this:
>
> http://blogs.msdn.com/larryosterman/archive/2005/03/02/383685.aspx
>
> where they say:
>
> "
> In addition, for Windows 2003, SP1, the EnterCriticalSection API has a
> subtle change that's intended tor resolve many of the lock convoy issues.
>  Before Win2003 SP1, if 10 threads were blocked on EnterCriticalSection and
> all 10 threads had the same priority, then EnterCriticalSection would
> service those threads in a FIFO (first -in, first-out) basis.  Starting in
> Windows 2003 SP1, the EnterCriticalSection will wake up a random thread
> from the waiting threads.  If all the threads are doing the same thing
> (like a thread pool) this won't make much of a difference, but if the
> different threads are doing different work (like the critical section
> protecting a widely accessed object), this will go a long way towards
> removing lock convoy semantics. "
>
> Could it be they broke it when they did that????

See also this:

http://bugs.mysql.com/bug.php?id=12071

It appears the mysql people ran into this and concluded it is a Windows bug 
they needed to work around.

jan

-- 
--------------------------------------------------------------
Jan de Visser                     jdevisser@digitalfairway.com

                Baruk Khazad! Khazad ai-menu!
--------------------------------------------------------------



view thread (15+ messages)  latest in thread

Message-ID: <200603100947.22460.jdevisser@digitalfairway.com>
Permalink:  ../200603100947.22460.jdevisser@digitalfairway.com/
Also on:    postgresql.org/message-id/200603100947.22460.jdevisser@digitalfairway.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-performance@postgresql.org
  Cc: jdevisser@digitalfairway.com
  Subject: Re: Hanging queries on dual CPU windows
  In-Reply-To: <200603100947.22460.jdevisser@digitalfairway.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