[syslog-ng]syslog-ng hanging bringing machine in trouble

Balazs Scheidler bazsi@balabit.hu
Wed, 12 Feb 2003 11:10:44 +0100


On Tue, Feb 11, 2003 at 11:10:02PM +0100, Roberto Nibali wrote:
> >BTW: is this ok, that if syslog-ng restarts, crond don't log anymore
> >until restarted?
> 
> I would say no but I'm not sure here, I would also suspect it depends on 
> the version of cron deployed on your machine.

it is. the syslog() function in libc clearly sucks. If the log connection is
broken (e.g. you restarted syslog-ng) it does not immediately reopen
the connection only _after_ the first error occurs.

Thus a message is dropped after a log connection breaks.

It becomes worse when a parent process opens the log connection, and each
child inherits the fd (this is what cron probably does), as the first log
message is dropped in every child. This becomes the worst when the child
sends only a single log message, when the program becomes absolutely silent.

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1