Hi,<br><br>Not sure if syslog-ng has a bug tracker, but I couldn&#39;t find one anyway, so posting this here.<br><br>Here is the problem: I have source file that is a log file that is been truncated periodically (by log rotate).<br>
When the truncation happens syslog-ng process starts taking 100% CPU, and not doing any logging. This behavior remains until source file receives a write.<br><br>To reproduce:<br><br>1. configure syslog-ng with following lines:<br>
<br> source s_logfiles {<br>        file(&quot;/var/log/applogs/mysql/mysqld.log&quot; flags(no-parse) program_override(&quot;mysqld.log&quot;));<br>        file(&quot;/var/log/applogs/mysql/mysql-slow.log&quot; flags(no-parse) program_override(&quot;mysql-slow.log&quot;));<br>
};<br><br>destination d_mysql_logall { file(&quot;/var/log/mysqlall.log&quot;); };<br><br>log { source(s_logfiles); destination(d_mysql_logall);};<br><br>2. start syslog-ng<br><br>3. output some text into source files:<br>
<br>for i in /var/log/applogs/mysql/mysqld.log /var/log/applogs/mysql/mysql-slow.log ; do echo &quot;some text&quot; &gt;&gt; $i; done<br><br>4. truncate source files:<br><br>for i in /var/log/applogs/mysql/mysqld.log /var/log/applogs/mysql/mysql-slow.log ; do &gt; $i; done<br>
<br>5. observe syslog-ng takes 100% CPU, doing nothing.<br><br>6. output some text into source files again:<br><br>for i in /var/log/applogs/mysql/mysqld.log /var/log/applogs/mysql/mysql-slow.log ; do echo &quot;some text, again&quot; &gt;&gt; $i; done<br>
<br>7. observe syslog-ng returned to normal operation.<br><br>comment: some times you&#39;ll need going through steps 3 - 5 a few times to trigger the bug.<br><br><br>My config: <br><br>syslog-ng 3.2.2<br>Installer-Version: 3.2.2<br>
Revision: ssh+git://bazsi@git.balabit//var/scm/git/syslog-ng/syslog-ng-ose--mainline--3.2#master#1d3f396485eb47b1ff6aa18ac4f1c4cd51c0ea4c<br>Compile-Date: Jan 20 2011 11:34:35<br>Enable-Threads: off<br>Enable-Debug: off<br>
Enable-GProf: off<br>Enable-Memtrace: off<br>Enable-Sun-STREAMS: off<br>Enable-IPv6: on<br>Enable-Spoof-Source: on<br>Enable-TCP-Wrapper: on<br>Enable-SSL: on<br>Enable-SQL: off<br>Enable-Linux-Caps: off<br>Enable-Pcre: on<br>
Enable-Pacct: off<br><br>Regards.<br><br>