CRITICAL: disk flooding bug - disabling of STATS seems to be broken in 1.5.19
Disabling STATS reporting with options "{ stats(0); }" doesn't work anymore! Instead syslog-ng gets busy reporting STATS all the time without pause - and succeeds in eating up all free disk space in a matter of minutes. If you don't have an extra mount for /var/log your whole system is rendered inoperatible... the upstream Changelog shows an entry from 2002-06-17 concerning STATS which most likely describes the change causing the bug. I didn't fully study the sources but on first sight it seems to me that the error is in main_loop() in src/main.c in the lines 188 and 204. I think it should be if (s.timeout > 0) instead of if (s.timeout <= 0) especially as the callback timers seem to get deleted in line 201. The way it is now STATS might be disabled by providing any positive config value??!! The problem might also be solved if one could use "stats(-1);" to deactivate STATS reporting but syslog-ng doesn't seem to accept negative values (which might be another bug on itself?). In the default installation the default value of 600 seconds is used, so this bug is not a problem if syslog-ng is used with unchanged config options. But whoever does want his/her disks tpo spin down at all will have tried to disable STATS... Cheers, Dominique. P.S.: also reported as Bug #156045 to the Debian BTS... P.P.S.: I'm not a member of the syslog-ng mainling list...
HI *, Why, when i try to active the option: compress(yes), i received this msg: warning: file compression not implemented yet Cheers, _/CaT\_
On Fri, Aug 09, 2002 at 01:04:02PM +0200, Dominique Kaiser wrote:
Disabling STATS reporting with options "{ stats(0); }" doesn't work anymore! Instead syslog-ng gets busy reporting STATS all the time without pause - and succeeds in eating up all free disk space in a matter of minutes. If you don't have an extra mount for /var/log your whole system is rendered inoperatible...
the upstream Changelog shows an entry from 2002-06-17 concerning STATS which most likely describes the change causing the bug.
I didn't fully study the sources but on first sight it seems to me that the error is in main_loop() in src/main.c in the lines 188 and 204. I think it should be if (s.timeout > 0) instead of if (s.timeout <= 0) especially as the callback timers seem to get deleted in line 201. The way it is now STATS might be disabled by providing any positive config value??!!
you are right, the condition should be like in the fixed patch: diff -u -r1.42 main.c --- main.c 17 Jun 2002 09:23:13 -0000 1.42 +++ main.c 9 Aug 2002 13:20:11 -0000 @@ -185,7 +185,7 @@ s.timeout = backend->configuration->stats_freq; s.backend = backend; r.backend = backend; - if (s.timeout <= 0) + if (s.timeout > 0) io_callout(&backend->super, s.timeout, &s.super); while (io_iter(&backend->super)) { @@ -201,7 +201,7 @@ io_callout_flush(&backend->super); s.timeout = backend->configuration->stats_freq; - if (s.timeout <= 0) + if (s.timeout > 0) io_callout(&backend->super, s.timeout, &s.super); r.state = 0; -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
participants (3)
-
_/CaT\_
-
Balazs Scheidler
-
Dominique Kaiser