Subject: Re: very strange error message from ntpd upon running cvs (?)
To: matthew sporleder <msporleder@gmail.com>
From: Frank Kardel <kardel@netbsd.org>
List: current-users
Date: 02/17/2007 20:47:33
Unless the issue was resolved in the mean time see my remarks below:

matthew sporleder wrote:

> On 2/13/07, Blair Sadewitz <blair.sadewitz@gmail.com> wrote:
>
>> I am running amd64 -current from right before the CVS server went
>> down, i.e. post newlock2-merge.
>>
>> After I start the system and login for the first time, if I run cvs
>> update, ntpd produces this error message:
>>
>> Feb 13 22:33:22 dexamyl ntpd[1243]: sigio_handler: 
>> sigio_handler_active != 1
>> Feb 13 22:33:22 dexamyl ntpd[1243]: select(28, 
>> ########--------------------, 0L,
>>  0L, &0.0) error: Bad file descriptor
>> Feb 13 22:33:22 dexamyl ntpd[1243]: Bad file descriptor 27
>> Feb 13 22:33:22 dexamyl ntpd[1243]: sigio_handler: 
>> sigio_handler_active != 0
>> Feb 13 22:33:34 dexamyl ntpd[1243]: time reset +0.714964 s
>> Feb 13 22:33:34 dexamyl ntpd[1243]: kernel time sync status change 2001
>
When ntpd logs this message, then ntpd's assumption that the SIGIO 
handler is not called
again while SIGIO is being handled is violated. This situation will 
definitely cause
confusion within ntpd io engine. If this occurs it is definitely a 
violation of signal semantics.

To quote sigaction(2):
     Signal routines execute with the signal that caused their invocation
     blocked, but other signals may yet occur.

Thus recursive signal handler invocations must not occur while a signal 
is handled
(unless something fiddles with the signal mask which ntpd doesn't in 
that code path).

It needs to be checked whether -current signal semantics are still 
matching the documentation.

Regards,
  Frank