syslog-ng-2.1beta1 on NetBSD 3.0, duplicate suppression docs?
I encountered two problems building syslog-ng-2.1beta1 on NetBSD 3.0: 1) I needed to patch loggen.c (stole this patch from a FreeBSD site, apparently it happens on that OS too) --- tests/loggen/loggen.c.orig 2008-01-13 00:04:22.000000000 -0800 +++ tests/loggen/loggen.c 2008-03-26 08:27:43.000000000 -0700 @@ -226,7 +226,9 @@ memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = sock_type; +#ifdef AI_ADDRCONFIG hints.ai_flags = AI_ADDRCONFIG; +#endif hints.ai_protocol = 0; if (getaddrinfo(argv[optind], argv[optind + 1], &hints, &res) != 0) { ------------------------------------- 2) I built syslog-ng with --enable-tcp-wrappers, which needlessly put "-lwrap" on the LIBS line in the Makefiles for programs that did not actually use TCP wrappers. This causes link-time errors, since libwrap requires you to declare two symbols in your program. The fix was to run this in the source directory: find tests/ -name Makefile -exec perl -p -i -e 's/-lwrap//' {} ";" ------------------------------------- I also have a couple of observations/questions: 3) It turns out I really wanted syslog-ng2.1beta2, but although that was announced as released, only the beta1 tarball is actually on the source download site. I had to go to the snapshots. The above fixes were also needed for the beta2 sources. ------------------------------------- 4) I'm looking for info on how to use the duplicate suppression option - it doesn't seem to be in the docs included in the source. Can someone give me a quick summary? This was (IMHO) the only extant flaw in syslog-ng and I'm looking forward to trying it out! Thanks, -- Ed
On Tue, 2008-07-01 at 18:19 -0400, Ed Ravin wrote:
I encountered two problems building syslog-ng-2.1beta1 on NetBSD 3.0:
1) I needed to patch loggen.c (stole this patch from a FreeBSD site, apparently it happens on that OS too)
--- tests/loggen/loggen.c.orig 2008-01-13 00:04:22.000000000 -0800 +++ tests/loggen/loggen.c 2008-03-26 08:27:43.000000000 -0700 @@ -226,7 +226,9 @@ memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = sock_type; +#ifdef AI_ADDRCONFIG hints.ai_flags = AI_ADDRCONFIG; +#endif hints.ai_protocol = 0; if (getaddrinfo(argv[optind], argv[optind + 1], &hints, &res) != 0) {
Thanks. I've committed a fix for this issue.
-------------------------------------
2) I built syslog-ng with --enable-tcp-wrappers, which needlessly put "-lwrap" on the LIBS line in the Makefiles for programs that did not actually use TCP wrappers. This causes link-time errors, since libwrap requires you to declare two symbols in your program. The fix was to run this in the source directory:
find tests/ -name Makefile -exec perl -p -i -e 's/-lwrap//' {} ";"
Hmm, all test programs link against ../../src/libsyslog-ng.a which define these two symbols. I guess those symbols are not resolved from the .a file, presumably because it is at an earlier position in the link command line.
-------------------------------------
I also have a couple of observations/questions:
3) It turns out I really wanted syslog-ng2.1beta2, but although that was announced as released, only the beta1 tarball is actually on the source download site. I had to go to the snapshots. The above fixes were also needed for the beta2 sources.
You are right. I've prepared the binary release (for those who have binary subscription) and then forgot to actually do the source release. I did that now. Sorry for the confusion.
-------------------------------------
4) I'm looking for info on how to use the duplicate suppression option - it doesn't seem to be in the docs included in the source. Can someone give me a quick summary? This was (IMHO) the only extant flaw in syslog-ng and I'm looking forward to trying it out!
You already got that from Chris, the original author of the feature. -- Bazsi
Hi Bazsi, >>> On Wed, Jul 2, 2008 at 11:04 PM, in message <1214996675.7936.44.camel@bzorp.balabit>, Balazs Scheidler <bazsi@balabit.hu> >> 4) I'm looking for info on how to use the duplicate suppression >> option - it doesn't seem to be in the docs included in the source. >> Can someone give me a quick summary? This was (IMHO) the only >> extant flaw in syslog-ng and I'm looking forward to trying it out! > > You already got that from Chris, the original author of the feature. Did you want me to submit a patch for the documentation as well? I thought about including it in the original submission but I got lost in some XML and wasn't sure where to start. If you can point me in the right direction I could add a description of how to use the suppression feature.
On Thu, 2008-07-03 at 09:06 +1200, chris packham wrote: > Hi Bazsi, > > >>> On Wed, Jul 2, 2008 at 11:04 PM, in message > <1214996675.7936.44.camel@bzorp.balabit>, Balazs Scheidler <bazsi@balabit.hu> > >> 4) I'm looking for info on how to use the duplicate suppression > >> option - it doesn't seem to be in the docs included in the source. > >> Can someone give me a quick summary? This was (IMHO) the only > >> extant flaw in syslog-ng and I'm looking forward to trying it out! > > > > You already got that from Chris, the original author of the feature. > > Did you want me to submit a patch for the documentation as well? I thought about including it in the original submission but I got lost in some XML and wasn't sure where to start. If you can point me in the right direction I could add a description of how to use the suppression feature. Not really, the version of the documentation in the tarball is not the same as on our website. The current one is maintained internally by our tech writers. The information they have about the feature is enough, we just didn't get there yet. -- Bazsi
Using syslog-ng-2.1beta2-snapshot-20080701 on NetBSD 3.0. Left it running on a host that doesn't do much, and after a few hours we got a core dump: Program terminated with signal 11, Segmentation fault. #0 0xbbb4b2ca in evt_rec_add_tag (e=0x8084140, tag=0x0) at evtrec.c:48 (gdb) bt #0 0xbbb4b2ca in evt_rec_add_tag (e=0x8084140, tag=0x0) at evtrec.c:48 #1 0x0805867a in stats_generate_log () at stats.c:229 #2 0x0804b44f in stats_timer (st=0x0) at main.c:131 #3 0xbbb7f423 in g_main_context_is_owner () from /usr/local/lib/libglib-2.0.so.1200 #4 0xbbb7cea3 in g_source_is_destroyed () from /usr/local/lib/libglib-2.0.so.1200 #5 0xbbb7dead in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.1200 #6 0xbbb7e1d2 in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.1200 #7 0xbbb7e400 in g_main_context_iteration () from /usr/local/lib/libglib-2.0.so.1200 #8 0x0804b556 in main_loop_run (cfg=0xbfbfed44) at main.c:159 #9 0x0804bb1c in main (argc=5, argv=0xbfbfeeb4) at main.c:428 Here's some of the config info: compiler options : -g -O2 -Wall -I/pkg/glib-2.12.3-p1/include/glib -2.0 -I/pkg/glib-2.12.3-p1/lib/glib-2.0/include -I/pkg/eventlog-0.2.5/include/ eventlog -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 linker flags : -lresolv -lrt -lfl -L/pkg/glib-2.12.3-p1/lib - lglib-2.0 -lintl -L/pkg/eventlog-0.2.5/lib -levtlog -lwrap prefix : /pkg/syslog-ng-2.1beta2+20080701 Features: Sun STREAMS support : no Sun Door support : no Debug symbols : no Memtrace : no IPV6 support : yes spoof-source support : no tcp-wrapper support : yes SQL support : no
On Thu, 2008-07-17 at 14:45 -0400, Ed Ravin wrote:
Using syslog-ng-2.1beta2-snapshot-20080701 on NetBSD 3.0. Left it running on a host that doesn't do much, and after a few hours we got a core dump:
Program terminated with signal 11, Segmentation fault. #0 0xbbb4b2ca in evt_rec_add_tag (e=0x8084140, tag=0x0) at evtrec.c:48
(gdb) bt #0 0xbbb4b2ca in evt_rec_add_tag (e=0x8084140, tag=0x0) at evtrec.c:48 #1 0x0805867a in stats_generate_log () at stats.c:229 #2 0x0804b44f in stats_timer (st=0x0) at main.c:131 #3 0xbbb7f423 in g_main_context_is_owner () from /usr/local/lib/libglib-2.0.so.1200 #4 0xbbb7cea3 in g_source_is_destroyed () from /usr/local/lib/libglib-2.0.so.1200 #5 0xbbb7dead in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.1200 #6 0xbbb7e1d2 in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.1200 #7 0xbbb7e400 in g_main_context_iteration () from /usr/local/lib/libglib-2.0.so.1200 #8 0x0804b556 in main_loop_run (cfg=0xbfbfed44) at main.c:159 #9 0x0804bb1c in main (argc=5, argv=0xbfbfeeb4) at main.c:428
Thanks for the report. This patch should fix the issue: commit 49416f5e605cc8778ed5ba0c2ec5945198e763e8 Author: Balazs Scheidler <bazsi@balabit.hu> Date: Sun Jul 20 20:37:09 2008 +0200 added "suppressed" type to stats_generate_log() diff --git a/src/stats.c b/src/stats.c index 69f9f51..0db46df 100644 --- a/src/stats.c +++ b/src/stats.c @@ -217,6 +217,7 @@ stats_generate_log(void) { /* [SC_TYPE_DROPPED] = */ "dropped", /* [SC_TYPE_PROCESSED] = */ "processed", + /* [SC_TYPE_SUPPRESSED] = */ "suppressed" }; e = msg_event_create(EVT_PRI_INFO, "Log statistics", NULL); -- Bazsi
participants (3)
-
Balazs Scheidler
-
chris packham
-
Ed Ravin