[syslog-ng] syslog-ng deadlock if /dev/console locks?

Balazs Scheidler bazsi at balabit.hu
Sat Feb 5 19:08:23 CET 2011


On Thu, 2011-01-27 at 08:17 -0800, Matthew Hall wrote:
> On Thu, Jan 27, 2011 at 11:04:01AM +0100, Sandor Geller wrote:
> > > I loudly disagree. Files are not "always writable". We continue to bump into the
> > > case where something generates tones of logs and fills the filesystem. The files
> > > are not writeable when this occurs, and syslog-ng can never recover from this even
> > > when space is made available again. The lame logic needs to be applied to files
> > > as is done for all other destinations.
> > 
> > I'm sorry but our opinion doesn't matter too much... If I read the
> > linux kernel code correctly then for regular files poll() isn't even
> > implemented at the VFS layer so files are always writeable.
> > syslog-ng's behaviour of not wasting time for calling poll() for
> > regular files is correct.
> > 
> > Of course I could be wrong so BalaBit folks are more than welcome to chime in :)
> > 
> > Regards,
> > Sandor
> 
> Could you not just call something which checks for space in the block device?
> 
> Imperfect but certainly better than doing nothing.

I can't remember when I implemented it, but syslog-ng now properly
reacts to ENOSPC errors, just like any other kind of I/O error returned
by write(). It suspends writing to the given destination for
time_reopen() time, and then tries again.

-- 
Bazsi




More information about the syslog-ng mailing list