Re: LWLock deadlock and gdb advice - Mailing list pgsql-hackers

From Andres Freund
Subject Re: LWLock deadlock and gdb advice
Date
Msg-id 20150802150407.GC3161@alap3.anarazel.de
Whole thread Raw
In response to Re: LWLock deadlock and gdb advice  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: LWLock deadlock and gdb advice  (Andres Freund <andres@anarazel.de>)
Re: LWLock deadlock and gdb advice  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi Jeff, Heikki,

On 2015-07-31 09:48:28 -0700, Jeff Janes wrote:
> I had run it for 24 hours, while it usually took less than 8 hours to look
> up before.  I did see it within a few minutes one time when I checked out a
> new HEAD and then forgot to re-apply your or Heikki's patch.
> 
> But now I've got the same situation again, after 15 hours, with your
> patch.  This is probably all down to luck.  The only differences that I can
> think of is that I advanced the base to e8e86fbc8b3619da54c, and turned on
> JJ_vac and set log_autovacuum_min_duration=0.

It's quite possible that you hit the remaining race-condition that
Heikki was talking about. So that'd make it actually likely to be hit
slightly later - but as you say this is just a game of chance.

I've attached a version of the patch that should address Heikki's
concern. It imo also improves the API and increases debuggability by not
having stale variable values in the variables anymore. (also attached is
a minor optimization that Heikki has noticed)

I plan to commit the patch tomorrow, so it's included in alpha2.

Regards,

Andres



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: upgrade failure from 9.5 to head
Next
From: Andres Freund
Date:
Subject: Re: LWLock deadlock and gdb advice