Re: Re: [SQL] PostgreSQL crashes on me :(

From: ncm(at)zembu(dot)com (Nathan Myers)
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [SQL] PostgreSQL crashes on me :(
Date: 2000-12-18 07:01:41
Message-ID: 20001217230141.A28714@store.zembu.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

On Sun, Dec 17, 2000 at 10:47:55PM -0500, Tom Lane wrote:
>
> A quick-and-dirty workaround would be to save and restore errno in
> reaper() and the other postmaster signal handlers. It might be
> a better idea in the long run to avoid doing system calls in the
> signal handlers --- but that would take a more substantial rewrite.
>
> I seem to recall previous pghackers discussions in which
> saving/restoring errno looked like a good idea. Not sure why
> it hasn't been done already.

Syscalls in signal handlers open doors for lots of mischief, not least
because it's impractical to test all the combinations of half-run mainline
syscalls with all the other syscalls that may occur in signal handlers.
(select() and wait(), by themselves, get exercised enough, but bugs in
other pairs may be too hard to reproduce ever to be identified.) Maybe
somebody noted that patching errno handling would only close one hole,
and make it less likely the real fix would be done.

That the signal handler got an error on its syscall might be cause for
concern as well.

Sounds like a TODO list item: eliminate syscalls from signal handlers.

Nathan Myers
ncm(at)zembu(dot)com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Karel Zak 2000-12-18 07:37:21 Re: [HACKERS] Trigger
Previous Message vs 2000-12-18 04:43:23 LM devel GLIB2_2

Browse pgsql-sql by date

  From Date Subject
Next Message Trewern, Ben 2000-12-18 09:32:45 RE: readline ??
Previous Message Tom Lane 2000-12-18 03:47:55 Re: [SQL] PostgreSQL crashes on me :(