X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0A8789DC86B for ; Fri, 10 Mar 2006 10:47:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 79216-08 for ; Fri, 10 Mar 2006 10:47:26 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.digitalfairway.ca (ns.digitalfairway.ca [207.164.133.170]) by postgresql.org (Postfix) with ESMTP id 457209DC85F for ; Fri, 10 Mar 2006 10:47:19 -0400 (AST) Received: from toronto.toronto.digitalfairway.ca (unknown [192.168.100.10]) by mail.digitalfairway.ca (Postfix) with ESMTP id 077BAA068D for ; Fri, 10 Mar 2006 09:47:24 -0500 (EST) Received: from localhost (toronto.toronto.digitalfairway.ca [127.0.0.1]) by toronto.toronto.digitalfairway.ca (Postfix) with ESMTP id ED246124A31 for ; Fri, 10 Mar 2006 09:47:23 -0500 (EST) Received: from toronto.toronto.digitalfairway.ca ([127.0.0.1]) by localhost (toronto.toronto.digitalfairway.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 21190-01 for ; Fri, 10 Mar 2006 09:47:23 -0500 (EST) Received: from [192.168.100.50] (unknown [192.168.100.50]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by toronto.toronto.digitalfairway.ca (Postfix) with ESMTP id CA5FA12493D for ; Fri, 10 Mar 2006 09:47:23 -0500 (EST) From: Jan de Visser To: pgsql-performance@postgresql.org Subject: Re: Hanging queries on dual CPU windows Date: Fri, 10 Mar 2006 09:47:22 -0500 User-Agent: KMail/1.9.1 References: <6BCB9D8A16AC4241919521715F4D8BCEA35104@algol.sollentuna.se> <200603100903.14517.jdevisser@digitalfairway.com> <200603100933.00047.jdevisser@digitalfairway.com> In-Reply-To: <200603100933.00047.jdevisser@digitalfairway.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200603100947.22460.jdevisser@digitalfairway.com> X-Virus-Scanned: amavisd-new at digitalfairway.ca X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.092 required=5 tests=[AWL=0.092] X-Spam-Score: 0.092 X-Spam-Level: X-Archive-Number: 200603/127 X-Sequence-Number: 17564 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. > =A0Before 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. =A0Starting= in > Windows 2003 SP1, the EnterCriticalSection will wake up a random thread > from the waiting threads. =A0If 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=3D12071 It appears the mysql people ran into this and concluded it is a Windows bug= =20 they needed to work around. jan =2D-=20 =2D------------------------------------------------------------- Jan de Visser =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 jdevisser@digitalfair= way.com =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Baruk Khazad! Khazad ai-menu! =2D-------------------------------------------------------------