Wow! That was quick! I'm running the new code now, but it will take a few hours to see if the memory grows too large. Thanks for the quick commit.<br><br>--Martin<br><br><div class="gmail_quote">On Fri, Apr 24, 2009 at 12:29 PM, ILLES, Marton <span dir="ltr"><<a href="mailto:illes.marton@balabit.hu">illes.marton@balabit.hu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Fri, 2009-04-24 at 18:28 +0200, ILLES, Marton wrote:<br>
> On Fri, 2009-04-24 at 10:29 -0500, Martin Holste wrote:<br>
> > I'm running tests with the db-parser() parser module and finding that<br>
> > the memory grows exponentially until the program finally dies with:<br>
> ><br>
> > ***MEMORY-ERROR***: syslog-ng[2769]: GSlice: failed to allocate 248<br>
> > bytes (alignment: 256): Cannot allocate memory<br>
> ><br>
><br>
> snip<br>
><br>
> > Should I recompile with memtrace on?<br>
> ><br>
><br>
> Running it in valgrind would be even more useful also enabling core<br>
> might help as well.<br>
><br>
> M<br>
<br>
</div>I think I have got it:<br>
<br>
commit 778cb9b27366425153a6141d4966a1a464e97e79<br>
Author: Marton Illes <<a href="mailto:marci@balabit.hu">marci@balabit.hu</a>><br>
Date: Fri Apr 24 19:24:40 2009 +0200<br>
<br>
fixed a memory leak in db-parser() dynamic value handling<br>
<br>
Reported by: Martin Holste<br>
<br>
diff --git a/src/logpatterns.c b/src/logpatterns.c<br>
index f1012eb..fda9088 100644<br>
--- a/src/logpatterns.c<br>
+++ b/src/logpatterns.c<br>
@@ -312,6 +312,7 @@ log_pattern_database_lookup(LogPatternDatabase<br>
*self, LogMessage *msg)<br>
*/<br>
<br>
g_ptr_array_free(match_names, TRUE);<br>
+ g_array_free(matches, FALSE);<br>
return ((LogDBResult *) msg_node->value);<br>
}<br>
g_ptr_array_free(match_names, TRUE);<br>
<br>
Also in my git tree, please give it a try.<br>
<a href="http://git.balabit.hu/?p=marci/syslog-ng-3.0.git;a=commit;h=778cb9b27366425153a6141d4966a1a464e97e79" target="_blank">http://git.balabit.hu/?p=marci/syslog-ng-3.0.git;a=commit;h=778cb9b27366425153a6141d4966a1a464e97e79</a><br>
<br>
<br>
best,<br>
<font color="#888888"><br>
Marton<br>
</font><div><div></div><div class="h5">--<br>
Key fingerprint = F78C 25CA 5F88 6FAF EA21 779D 3279 9F9E 1155 670D<br>
<br>
<br>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.campin.net/syslog-ng/faq.html" target="_blank">http://www.campin.net/syslog-ng/faq.html</a><br>
<br>
</div></div></blockquote></div><br>