Re: "stuck spinlock" - Mailing list pgsql-hackers

From Tom Lane
Subject Re: "stuck spinlock"
Date
Msg-id 8048.1386946326@sss.pgh.pa.us
Whole thread Raw
In response to Re: "stuck spinlock"  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: "stuck spinlock"
Re: "stuck spinlock"
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> Tom, could this be caused by c357be2cd9434c70904d871d9b96828b31a50cc5?
> Specifically the added CHECK_FOR_INTERRUPTS() in handle_sig_alarm()?
> ISTM nothing is preventing us from jumping out of code holding a
> spinlock?

Hm ... what should stop it is that ImmediateInterruptOK wouldn't be
set while we're messing with any spinlocks.  Except that ProcessInterrupts
doesn't check that gating condition :-(.  I think you're probably right:
what should be in the interrupt handler is something like
"if (ImmediateInterruptOK) CHECK_FOR_INTERRUPTS();"
        regards, tom lane



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Logging WAL when updating hintbit
Next
From: Tom Lane
Date:
Subject: Re: ruleutils vs. empty targetlists