[syslog-ng] Re: RE: Re: syslog-ng 2.0rc1 memory usage

Martin, David M David.Martin at anheuser-busch.com
Wed Aug 9 15:18:32 CEST 2006


here are the definitely lost record results.
short duration (start valgrind, send hup, wait, send hup, kill)

==7989== 70 bytes in 1 blocks are definitely lost in loss record 15 of 43
==7989==    at 0x1B904984: malloc (vg_replace_malloc.c:131)
==7989==    by 0x12AB72: g_malloc (in /usr/lib/libglib-2.0.so.0.400.7)
==7989==    by 0x1394F5: g_strdup (in /usr/lib/libglib-2.0.so.0.400.7)
==7989==    by 0x80559B6: log_writer_options_init (logwriter.c:507)

==7989== 1080 bytes in 10 blocks are definitely lost in loss record 35 of 43
==7989==    at 0x1B905301: calloc (vg_replace_malloc.c:176)
==7989==    by 0x12ABDF: g_malloc0 (in /usr/lib/libglib-2.0.so.0.400.7)
==7989==    by 0x80530FD: log_msg_new (logmsg.c:545)
==7989==    by 0x805BE42: log_reader_handle_line (logreader.c:178)

==7989== LEAK SUMMARY:
==7989==    definitely lost: 1150 bytes in 11 blocks.
==7989==    possibly lost:   0 bytes in 0 blocks.
==7989==    still reachable: 113453 bytes in 1157 blocks.
==7989==         suppressed: 200 bytes in 1 blocks.



 


------------------------------

Message: 2
Date: Wed, 09 Aug 2006 10:00:02 +0200
From: Balazs Scheidler <bazsi at balabit.hu>
Subject: Re: [syslog-ng] RE: Re: syslog-ng 2.0rc1 memory usage (Balazs
	Scheidler)
To: Syslog-ng users' and developers' mailing list
	<syslog-ng at lists.balabit.hu>
Message-ID: <1155110402.6312.14.camel at bzorp.balabit>
Content-Type: text/plain

On Tue, 2006-08-08 at 15:56 -0500, Martin, David M wrote:
> applied the patch and resident size increased only marginally over a 
> 10 minute period.  much better.
> ran through valgrind another 10 minutes, here's the report.

Only one definitely lost record was present, which should be fixed by the patch
below. Some of the remaining leaks seem to be part of buffered messages not yet
sent to destinations, but they were still reachable.

Some reload tests would be appreciated (e.g. run syslog-ng and reload it a
couple of times with your configuration and load), that might reveal some real
leaks.

--- orig/src/messages.c
+++ mod/src/messages.c
@@ -53,10 +53,12 @@ msg_send_internal_message(int prio, cons
     {
       LogMessage *m;

-      g_snprintf(buf, sizeof(buf), "<%d> syslog-ng[%d]: %s\n", prio, getpid(),
msg);
-      m = log_msg_new(buf, strlen(buf), NULL, LP_INTERNAL | LP_LOCAL, NULL);
       if (G_LIKELY(internal_msg_queue))
-        g_queue_push_tail(internal_msg_queue, m);
+        {
+          g_snprintf(buf, sizeof(buf), "<%d> syslog-ng[%d]: %s\n", prio,
getpid(), msg);
+          m = log_msg_new(buf, strlen(buf), NULL, LP_INTERNAL | LP_LOCAL,
NULL);
+          g_queue_push_tail(internal_msg_queue, m);
+        }
     }
 }





--
Bazsi



------------------------------

_______________________________________________
syslog-ng maillist  -  syslog-ng at lists.balabit.hu
https://lists.balabit.hu/mailman/listinfo/syslog-ng


End of syslog-ng Digest, Vol 16, Issue 9
****************************************

The information transmitted (including attachments) is
covered by the Electronic Communications Privacy Act,
18 U.S.C. 2510-2521, is intended only for the person(s) or
entity/entities to which it is addressed and may contain
confidential and/or privileged material. Any review,
retransmission, dissemination or other use of, or taking
of any action in reliance upon, this information by persons
or entities other than the intended recipient(s) is prohibited.
If you received this in error, please contact the sender and
delete the material from any computer.



More information about the syslog-ng mailing list