pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ncm@zembu.com
To: pgsql-hackers@postgresql.org
Subject: Re: Re: [SQL] PostgreSQL crashes on me :(
Date: Sun, 17 Dec 2000 23:01:41 -0800
Message-ID: <20001217230141.A28714@store.zembu.com> (raw)
In-Reply-To: <21339.977111275@sss.pgh.pa.us>
References: <20001217215118.D64770@ilse.nl>
	<21339.977111275@sss.pgh.pa.us>

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@zembu.com




view thread (12+ messages)  latest in thread

Message-ID: <20001217230141.A28714@store.zembu.com>
Permalink:  ../20001217230141.A28714@store.zembu.com/
Also on:    postgresql.org/message-id/20001217230141.A28714@store.zembu.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: ncm@zembu.com, pgsql-hackers@postgresql.org
  Subject: Re: [SQL] PostgreSQL crashes on me :(
  In-Reply-To: <20001217230141.A28714@store.zembu.com>
  References: <20001217215118.D64770@ilse.nl> <21339.977111275@sss.pgh.pa.us> <20001217230141.A28714@store.zembu.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox