[syslog-ng]Corruption in program destination

Andy Kirkpatrick syslog-ng@lists.balabit.hu
Tue, 27 Apr 2004 16:42:10 +1000


Hi everyone,

I have syslog-ng set up to accept syslog entries over UDP from remote
hosts:

source src { unix-dgram("/dev/log"); internal(); udp(); };

The log entries in question come from various machines, all arrive with
facility local6 and get written to /var/log/local6 nicely:

destination local6 { file("/var/log/local6" owner("root") group("adm")
perm("640")); };
filter local6 { facility(local6); };
log { source(src); filter(local6); destination(local6); };

However the same data when written to a program destination gets
corrupted:

destination logprocess { program("/usr/local/bin/logprocess.pl"); };
log { source(src); filter(local6); destination(logprocess); };

Whereas in /var/log/local6 I get each line whole and pristine, my
logprocess script gets lines that are occasionally overwritten, with one
log entry truncated and another starting halfway through it. The lines
are all under 120 bytes in length so its not a log_msg_size issue. This
only seems to occur when more than one remote host is sending to
syslog-ng at once.=20

Thinking it might be a buffer overrun when the server is busy I
increased log_fifo_size to 8000 but that made no difference.

Any ideas?
Thanks,
Andy Kirkpatrick