Jakub Jankowski <shasta@toxcorp.com> writes:
I'm pretty sure this particular memory leak was fixed in 3.3.2, but then got reintroduced in this commit: http://git.balabit.hu/?p=bazsi/syslog-ng-3.3.git;a=commitdiff;h=c7070e2a6f1c... which was done to fix tcp() destination related crash after 3.3.2 was released.
So, Bazsi, yes - it does reintroduce the leak :) (in reply to your comment in https://lists.balabit.hu/pipermail/syslog-ng/2011-November/017697.html )
I think I found the solution: the reason for the crash in afsocket, which Bazsi fixed with killing the log_queue_unref in lib/driver.h was that it was missing a log_queue_ref. We didn't unref more than we should, we reffed less! While I don't entirely understand the call chain, comparing how affile and afsocket did their queue magic, I prepared a patch that does not crash afsocket on reload, and stops the leak aswell. It also looks sane-ish to me, so I'm reasonably sure it's fine. The patch is attached, I tested it as much as I could: no crash, no leak, no empty files. If you could test it too, it would be most appreciated! -- |8]