[syslog-ng] [Bug 278] Many memory leak problems happen when do configuration reloading

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Wed May 14 04:15:21 CEST 2014


https://bugzilla.balabit.com/show_bug.cgi?id=278





--- Comment #13 from Xufeng Zhang <xufeng.zhang at windriver.com>  2014-05-14 04:15:17 ---
Hi Tusa!

After running a long-time testing, it is much better than previous, but
there are still some memory leaks:
1).
==888== 371 bytes in 1 blocks are definitely lost in loss record 553 of 607
==888==    at 0x4A05F58: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==888==    by 0x3AE26478F4: g_malloc (in /lib64/libglib-2.0.so.0.2600.0)
==888==    by 0x52397D3: log_proto_file_writer_flush (logproto-file-writer.c:98)
==888==    by 0x3AE1E41780: log_writer_flush (logproto-client.h:91)
==888==    by 0x3AE1E418EC: log_writer_work_perform (logwriter.c:129)
==888==    by 0x3AE1E41957: log_writer_io_flush_output (logwriter.c:209)
==888==    by 0x3AE1E5EC29: iv_run_tasks (iv_task.c:48)
==888==    by 0x3AE1E60E7B: iv_main (iv_main_posix.c:106)
==888==    by 0x3AE1E41E16: main_loop_run (mainloop.c:737)
==888==    by 0x4017A0: main (main.c:267)
logproto-file-writer.c:98
self->partial = (guchar *)g_malloc(self->partial_len);

2).
==888== 3,105 (1,484 direct, 1,621 indirect) bytes in 1 blocks are definitely lost in loss record 600 of 607
==888==    at 0x4A05F58: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==888==    by 0x3AE26478F4: g_malloc (in /lib64/libglib-2.0.so.0.2600.0)
==888==    by 0x3AE1E3565E: log_msg_new (logmsg.c:1041)
==888==    by 0x3AE1E3B61C: log_reader_work_perform (logreader.c:534)
==888==    by 0x3AE1E3B867: log_reader_io_process_input (logreader.c:225)
==888==    by 0x3AE1E606F1: iv_fd_poll_and_run (iv_fd.c:163)
==888==    by 0x3AE1E60E73: iv_main (iv_main_posix.c:117)
==888==    by 0x3AE1E41E16: main_loop_run (mainloop.c:737)
==888==    by 0x4017A0: main (main.c:267)
logreader.c:534
/* use the current time to get the time zone offset */
  m = log_msg_new((gchar *) line, length,
                  saddr,
                  &self->options->parse_options);
3).
==888== 77,312 bytes in 151 blocks are definitely lost in loss record 607 of 607
==888==    at 0x4A05F58: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==888==    by 0x3AE26478F4: g_malloc (in /lib64/libglib-2.0.so.0.2600.0)
==888==    by 0x3AE1E41838: log_writer_flush (logwriter.c:949)
==888==    by 0x3AE1E418EC: log_writer_work_perform (logwriter.c:129)
==888==    by 0x3AE1E41957: log_writer_io_flush_output (logwriter.c:209)
==888==    by 0x3AE1E5EC29: iv_run_tasks (iv_task.c:48)
==888==    by 0x3AE1E60E7B: iv_main (iv_main_posix.c:106)
==888==    by 0x3AE1E41E16: main_loop_run (mainloop.c:737)
==888==    by 0x4017A0: main (main.c:267)
logwriter.c:949
self->line_buffer->str = g_malloc(self->line_buffer->allocated_len);

This is test for syslog-ng-3.4.2, if you need, I can run the test again for syslog-ng_3.5.4.1,
but I don't think it will make much difference.
I think all these memory leaks are new ones because this time my test is a little tighter(stop
and restart the syslog-ng service on remote host continuously), so if you need me to close this
bug and open a new one, please let me know!
Thanks a lot for all your help!


-- 
Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the syslog-ng mailing list