Re: stats collector dies in current

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jan Wieck <JanWieck(at)Yahoo(dot)com>, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: stats collector dies in current
Date: 2004-08-15 05:07:24
Message-ID: 411EEF8C.2030307@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
>
>>In that context, is SIGTSTP similar to SIGSTOP in that it cannot be
>>caught or ignored?
>
>
> Possibly. I've reproduced the problem here on an RHL 8 system
> (2.4.18 kernel) and I think it's a kernel bug. Points:

[...]

I can reproduce this on a 2.6.7 kernel.

I think pqsignal should be passing SA_NOCLDSTOP in sa_flags, or
alternatively that the stats buffer process should check that its child
really did die rather than receive a stop signal. The sigaction manpage
says:

> sa_flags specifies a set of flags which modify the behaviour of the signal handling process. It is formed by the bit-
> wise OR of zero or more of the following:
>
> SA_NOCLDSTOP
> If signum is SIGCHLD, do not receive notification when child processes stop (i.e., when child processes
> receive one of SIGSTOP, SIGTSTP, SIGTTIN or SIGTTOU).

signal(7) says that SIGCHLD is generated when a child is stopped or
terminated.

A bit of experimentation in the stats buffer process seems to confirm
this -- while it is receiving a SIGCHLD, calling waitpid() with WNOHANG
returns immediately with no dead processes.

-O

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-08-15 05:14:40 Re: stats collector dies in current
Previous Message Gavin Sherry 2004-08-15 05:02:28 Re: 8.0 beta status