Skip site navigation (1) Skip section navigation (2)

Re: SIGFPE handler is naive

From: Noah Misch <noah(at)leadboat(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Greg Stark <stark(at)mit(dot)edu>, Nils Goroll <slink(at)schokola(dot)de>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: SIGFPE handler is naive
Date: 2012-08-14 20:02:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Tue, Aug 14, 2012 at 08:40:06AM -0400, Robert Haas wrote:
> On Tue, Aug 14, 2012 at 6:50 AM, Greg Stark <stark(at)mit(dot)edu> wrote:
> > It is possible to check if the signal was synchronous or was sent from
> > an external process. You can check siginfo->si_pid to see who sent you
> > the signal. I'm not sure checking that and handling it at
> > check_for_interrupts if it's asynchronous is the best solution or not
> > though.
> If that's portable it might be an option, but I doubt that it is.

I suspect it is portable.  Nonetheless, kill() is not the only SIGFPE source
that ought to produce a PANIC.  Library code might trigger the signal, at
which point we cannot assume that elog(ERROR) will leave an acceptable system
state.  To call this fixed, we need a whitelist of safe sources, not a
blacklist of bogus sources.

That said, I agree that the effort and risk may be out of proportion.

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2012-08-14 20:26:19
Subject: pgsql: Revert "commit_delay" change;just add comment that we don't hav
Previous:From: Bruce MomjianDate: 2012-08-14 19:24:53
Subject: Re: TRUE/FALSE vs true/false

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group