Re: Quite strange crash - Mailing list pgsql-hackers

From ncm@zembu.com (Nathan Myers)
Subject Re: Quite strange crash
Date
Msg-id 20010109120152.F571@store.zembu.com
Whole thread Raw
In response to Re: Quite strange crash  (Denis Perchine <dyp@perchine.com>)
Responses Re: Quite strange crash  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Jan 10, 2001 at 12:46:50AM +0600, Denis Perchine wrote:
> > > Didn't you get my mail with a piece of Linux kernel code? I think all is
> > > clear there.
> >
> > That was implementing CPU-time-exceeded kill, which is a different
> > issue.
> 
> Opps.. You are talking about OOM killer.
> 
> /* This process has hardware access, be more careful. */
> if (cap_t(p->cap_effective) & CAP_TO_MASK(CAP_SYS_RAWIO)) {
>   force_sig(SIGTERM, p);
> } else {
>   force_sig(SIGKILL, p);
> }
> 
> You will get SIGKILL in most cases.

... on Linux, anyhow.  There's no standard for this behavior.
Probably others try a SIGTERM first (on several processes) and 
then a SIGKILL if none die.

If a backend dies while holding a lock, doesn't that imply that
the shared memory may be in an inconsistent state?  Surely a death
while holding a lock should shut down the whole database, without
writing anything to disk.

Nathan Myers
ncm@zembu.com


pgsql-hackers by date:

Previous
From: Karel Zak
Date:
Subject: Re: How to print explain using PHP
Next
From: Tom Lane
Date:
Subject: Re: Quite strange crash