Re: What is happening on buildfarm member crake?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: What is happening on buildfarm member crake?
Date: 2014-02-01 20:19:17
Message-ID: 9159.1391285957@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Sat, Jan 25, 2014 at 5:04 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Yeah. If Robert's diagnosis is correct, and it sounds pretty plausible,
>> then this is really just one instance of a bug that's probably pretty
>> widespread in our signal handlers. Somebody needs to go through 'em
>> all and look for touches of shared memory.

> I haven't made a comprehensive study of every signal handler we have,
> [ but here's how to fix procsignal_sigusr1_handler ]

I've trawled all the remaining signal handlers (or at least everything
declared with SIGNAL_ARGS, which hopefully is all of them). I find
the following bugs:

1. A couple of signal handlers do
if (MyWalSnd)
SetLatch(&MyWalSnd->latch);
which is fine as far as it goes, but the shutdown sequence in WalSndKill
has exactly the same bug you just fixed in ProcKill: it needs to clear
MyWalSnd before disowning the latch, not after.

2. WalRcvSigUsr1Handler and worker_spi_sighup fail to preserve errno.

Will fix, but the latter bug is a tad disappointing considering that
the coding rule about saving errno in signal handlers has been there
for a *long* time.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2014-02-01 20:22:45 Re: install libpq.dll in bin directory on Windows / Cygwin
Previous Message Gabriele Bartolini 2014-02-01 17:43:44 Re: [PATCH] Support for pg_stat_archiver view