[syslog-ng] Syslog-ng-2.05 Segmentation Fault

Daniel Szmandiuk DSzmandi at imc.net.au
Thu Nov 8 13:34:03 CET 2007


Here's the backtrace:
GNU gdb Red Hat Linux (6.5-16.el5rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db library "/lib64/libthread_db.so.1".

Reading symbols from /lib64/libnsl.so.1...done.
Loaded symbols for /lib64/libnsl.so.1
Reading symbols from /lib64/librt.so.1...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/libpthread.so.0...done.
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Core was generated by `syslog-ng -d -d -v -e -F -f /etc/syslog-ng.conf'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000035eb071f6b in free () from /lib64/libc.so.6
(gdb) bt full
#0  0x00000035eb071f6b in free () from /lib64/libc.so.6
No symbol table info available.
#1  0x000000000040e140 in log_msg_clear_matches (self=0x14b0f8b0)
    at logmsg.c:512
	i = 0
#2  0x000000000040e1c2 in log_msg_free (self=0x14b0f8b0) at logmsg.c:532
No locals.
#3  0x000000000040e273 in log_msg_unref (self=0x14b0f8b0) at logmsg.c:562
	__PRETTY_FUNCTION__ = "log_msg_unref"
#4  0x0000000000410cce in log_writer_flush_log (self=0x14b0fb70, fd=0x14b0f820)
    at logwriter.c:324
	lm = (LogMessage *) 0x14b0f8b0
	path_flags = 1
	line = (GString *) 0x14b0f040
	rc = 1194600290
#5  0x00000000004106b4 in log_writer_fd_dispatch (source=0x14b0fbf0, 
    callback=0, user_data=0x0) at logwriter.c:144
	self = (LogWriterWatch *) 0x14b0fbf0
#6  0x000000000041ee09 in g_main_context_dispatch ()
No symbol table info available.
#7  0x0000000000421886 in g_main_context_iterate ()
No symbol table info available.
#8  0x0000000000421d0a in g_main_context_iteration ()
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#9  0x0000000000404aed in main_loop_run (cfg=0x7fffe3d3ac30) at main.c:164
	main_loop = (GMainLoop *) 0x14b0f600
	iters = 0
	stats_timer_id = 4
#10 0x0000000000405144 in main (argc=8, argv=0x7fffe3d3ad38) at main.c:426
	cfg = (GlobalConfig *) 0x14b01d40
	syslog_ng_options = {{name = 0x441583 "cfgfile", has_arg = 1, 
    flag = 0x0, val = 102}, {name = 0x44158b "pidfile", has_arg = 1, 
    flag = 0x0, val = 112}, {name = 0x441593 "debug", has_arg = 0, flag = 0x0, 
    val = 100}, {name = 0x441599 "syntax-only", has_arg = 0, flag = 0x0, 
    val = 115}, {name = 0x4415a5 "verbose", has_arg = 0, flag = 0x0, 
    val = 118}, {name = 0x4415ad "foreground", has_arg = 0, flag = 0x0, 
    val = 70}, {name = 0x4415b8 "help", has_arg = 0, flag = 0x0, val = 104}, {
    name = 0x441497 "version", has_arg = 0, flag = 0x0, val = 86}, {
    name = 0x4415bd "chroot", has_arg = 1, flag = 0x0, val = 67}, {
    name = 0x4415c4 "user", has_arg = 1, flag = 0x0, val = 117}, {
    name = 0x4415c9 "group", has_arg = 1, flag = 0x0, val = 103}, {
    name = 0x4415cf "stderr", has_arg = 0, flag = 0x0, val = 101}, {
    name = 0x4415d6 "yydebug", has_arg = 0, flag = 0x0, val = 121}, {
    name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
	syntax_only = 0
	log_to_stderr = 1
---Type <return> to continue, or q <return> to quit---
	persist = (PersistentConfig *) 0x14b071e0
	opt = -1
	rc = 0
(gdb) 
(gdb) 


Hope this helps.

Daniel



-----Original Message-----
From: syslog-ng-bounces at lists.balabit.hu on behalf of Balazs Scheidler
Sent: Thu 11/8/2007 6:29 PM
To: Syslog-ng users' and developers' mailing list
Subject: Re: [syslog-ng] Syslog-ng-2.05 Segmentation Fault
 

On Thu, 2007-11-08 at 13:32 +1100, Daniel Szmandiuk wrote:
> Syslog-ng experiences a segmentation fault whenever a message is
> processed:
>  
> <stop syslogd first>
> # syslog-ng -d -d -v -F -e
> syslog-ng starting up; version='2.0.5'
> Incoming log entry; line='<28>Nov  9 10:11:24 xinetd[12285]:
> Exiting...'
> Filter rule evaluation begins; filter_rule='f_emerg'
> Filter node evaluation result; filter_result='not-match',
> filter_type='level'
> Filter rule evaluation result; filter_result='not-match',
> filter_rule='f_emerg'
> Filter rule evaluation begins; filter_rule='f_secure'
> Filter node evaluation result; filter_result='not-match',
> filter_type='facility'
> Filter rule evaluation result; filter_result='not-match',
> filter_rule='f_secure'
> Filter rule evaluation begins; filter_rule='f_cron'
> Filter node evaluation result; filter_result='not-match',
> filter_type='facility'
> Filter rule evaluation result; filter_result='not-match',
> filter_rule='f_cron'
> Filter rule evaluation begins; filter_rule='f_spooler'
> Filter node evaluation result; filter_result='not-match',
> filter_type='facility'
> Filter node evaluation result; filter_result='not-match',
> filter_type='AND'
> Filter rule evaluation result; filter_result='not-match',
> filter_rule='f_spooler'
> Filter rule evaluation begins; filter_rule='f_local7'
> Filter node evaluation result; filter_result='not-match',
> filter_type='facility'
> Filter rule evaluation result; filter_result='not-match',
> filter_rule='f_local7'
> Filter rule evaluation begins; filter_rule='f_messages'
> Filter node evaluation result; filter_result='match',
> filter_type='level'
> Filter rule evaluation result; filter_result='match',
> filter_rule='f_messages'
> Initializing destination file writer; template='/var/log/messages',
> filename='/var/log/messages'
> Segmentation fault
> 
> Platform is VMware Guest running RHEL5 x86_64.
>  
> I used the following steps to build from source:
>  
> Download eventlog-0.2.5 source
> ./configure --prefix=/usr --sysconfdir=/etc
> make
> make install
>  
> export PKG_CONFIG_PATH="/usr/lib/pkgconfig"
>  
> Download syslog-ng-2.0.5 source.
> ./configure --sysconfdir=/etc
> make
> make install
> 
> I've basically used the supplied config file for Redhat in contrib
> folder. I'm uncommented the relevant lines in order to use syslog-ng
> in place of syslogd.
>  
> Syslog-ng runs OK but as soon as it tries to process a syslog message,
> it dies with a segmentation fault.
>  
> Any ideas anyone?
>  
> Daniel

Could you generate a backtrace, with debugging symbols enabled? E.g.
make sure that -g is present in the compiler options, enable core files
using "ulimit -c", wait while syslog-ng crashes and then:

gdb /usr/sbin/syslog-ng -c <path-to-core-file>
(gdb) bt full

and post the results.

-- 
Bazsi

_______________________________________________
syslog-ng maillist  -  syslog-ng at lists.balabit.hu
https://lists.balabit.hu/mailman/listinfo/syslog-ng
Frequently asked questions at http://www.campin.net/syslog-ng/faq.html



This email and any attachments transmitted with it are confidential and may contain legally privileged information.  If you are not the intended recipient you are prohibited from disclosing, copying or using the information contained in it.  If you have received this email in error, please notify the sender immediately by return email and then delete all copies of this transmission together with any attachments.

It is the addressee's/recipient's duty to virus scan and otherwise test the email before loading it onto any computer system.  IMC Communications does not accept liability in connection with any computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment in relation to this email.

For information about our privacy policy, visit the IMC Communications website at www.imc.net.au

This email has been checked by IMC's SMTP gateway.
-&-


More information about the syslog-ng mailing list