[syslog-ng] syslog-ng 1.3.3 on FreeBSD 3-STABLE

Lowkrantz, Goran Goran.Lowkrantz@infologigruppen.se
Tue, 23 Nov 1999 20:25:26 +0100


Hi,

This is what I get when I run gdb on the core. It seems like the child dies,
the parent get a SIGCHLD but will continue to wait.

GNU gdb 4.18
Copyright 1998 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 "i386-unknown-freebsd"...
Core was generated by `syslog-ng'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libc.so.3...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  0x8050f50 in do_init_afinet_source_connection (c=0x8069188,
cfg=0x805f008, 
    persistent=0x0) at afinet.c:69
69              notice("AF_INET client connected from %S, port %i\n", 
(gdb) bt
#0  0x8050f50 in do_init_afinet_source_connection (c=0x8069188,
cfg=0x805f008, 
    persistent=0x0) at afinet.c:69
#1  0x805156e in do_init_afinet_source (c=0x805f108, cfg=0x805f008, 
    persistent=0x0) at afinet.c:270
#2  0x804a390 in do_init_group (c=0x805d2c8, cfg=0x805f008, persistent=0x0)
    at sources.c:222
#3  0x804bd30 in do_init_config (self=0x805f008, p=0x0) at cfgfile.c:149
#4  0x8049c28 in main (argc=1, argv=0xbfbfdabc) at main.c:268
#5  0x8049555 in _start ()

I will check further.

Cheers,
	GLZ

-----Original Message-----
From: Balazs Scheidler [mailto:bazsi@balabit.hu]
Sent: Tuesday, November 23, 1999 8:06 PM
To: syslog-ng@venus.terrasoft.hu
Subject: Re: [syslog-ng] syslog-ng 1.3.3 on FreeBSD 3-STABLE


On Tue, Nov 23, 1999 at 07:56:38PM +0100, Lowkrantz, Goran wrote:
> 
> There seems to be somthing wrong with the forking in the new version. It
> never goes deamon.
> 
> Here are the truss lists from 1.3.1 and 1.3.4 resp.

I'm currently downloading FreeBSD, so I can test this. Under Linux it works
o.k.

> Any ideas or pointers where to look?

syslog-ng goes to background the following way:

parent:
read configuration
if config syntactically correct then fork(); wait for SIGTERM signal

child:
initialize configuration (open sockets etc.)
if successful; close fds 0, 1, 2, become a session leader, send SIGTERM
signal to parent

You can find all of this in main.c

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
     url: http://www.balabit.hu/pgpkey.txt

_______________________________________________
syslog-ng maillist  -  syslog-ng@lists.balabit.hu
http://lists.balabit.hu/mailman/listinfo/syslog-ng