pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/41003: gated exits due to syslog to console when tracing is enabled



The following reply was made to PR pkg/41003; it has been noted by GNATS.

From: David Holland <dholland-pbugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/41003: gated exits due to syslog to console when tracing
        is enabled
Date: Mon, 16 Mar 2009 05:31:19 +0000

 On Fri, Mar 13, 2009 at 07:55:00AM +0000, 
Wolfgang.Stukenbrock%nagler-company.com@localhost wrote:
  > >Description:
  >     gated seems to analyse errno in an outer loop to see if
  >     something has failed in the procesing before. (I haven't
  >     search where it is in the source ...)  When tracing is enabled
  >     some output will be send to a tracefile and to syslog().  If
  >     syslog is routed to the console too, the syslog() call will
  >     open /dev/console and try to write to it. If the console is
  >     slow (e.g. a serial line), then the write() will fail with
  >     EAGAIN.  You can see this if you start gated with ktruss -
  >     e.g. "ktruss gated -N -f /etc/gated.conf".  The error writing
  >     to /dev/console is in general no problem - a message is lost
  >     on the console. This is OK for the syslog stuff itself.  But
  >     the failed write has set errno to EAGAIN and the check for
  >     some errors in gated detect the EAGAIN, forcing gated to exit.
  >     This is a strange behaviour for a routing daemon and makes it
  >     impossible to trace configuration problems by using the trace
  >     feature of gated.
 
 This code is broken; it should not be checking errno until/unless
 something has reported failure.
 
 although I'm not sure that's anything particularly unexpected with
 gated. :-/
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index