Re: pgsql: Fix double-release of spinlock - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Fix double-release of spinlock
Date
Msg-id 2600757.1722267116@sss.pgh.pa.us
Whole thread Raw
In response to pgsql: Fix double-release of spinlock  (Heikki Linnakangas <heikki.linnakangas@iki.fi>)
Responses Re: pgsql: Fix double-release of spinlock
List pgsql-committers
Heikki Linnakangas <heikki.linnakangas@iki.fi> writes:
> Commit 9d9b9d46f3 added spinlocks to protect the fields in ProcSignal
> flags, but in EmitProcSignalBarrier(), the spinlock was released
> twice. With most spinlock implementations, releasing a lock that's not
> held is not easy to notice, because most of the time it does nothing,
> but if the spinlock was concurrently acquired by another process, it
> could lead to more serious issues. Fortunately, with the
> --disable-spinlocks emulation implementation, it caused more visible
> failures.

There was some recent discussion about getting rid of
--disable-spinlocks on the grounds that nobody would use
hardware that lacked native spinlocks.  But now I wonder
if there is a testing/debugging reason to keep it.

            regards, tom lane



pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: pgsql: Move cancel key generation to after forking the backend
Next
From: Tom Lane
Date:
Subject: pgsql: Count individual SQL commands in pg_restore's --transaction-size