[syslog-ng]Error compiling 1.6.4 on OpenBSD 3.5-stable

Steven S. syslog-ng@lists.balabit.hu
Wed, 19 May 2004 12:46:01 -0400


That worked.  Thanks!

Now syslog-ng dies without error when started (ktrace output way below).
Started with "-F" caused a core dump (see gdb output below).  Started =
with
"-d" seems to work but timestamps are off and hostnames for udp messages =
are
lost.

...running syslogd
May 19 11:36:53 172.16.10.20 May 19 2004 00:33:29: %PIX-4-106023: Deny =
udp
src o
utside:4.4.6.15/57112 dst inside:10.1.2.16/514 by access-group "outside
_access_in"
May 19 11:37:02 172.16.10.20 May 19 2004 00:33:39: %PIX-4-106023: Deny =
udp
src o
utside:210.12.158.85/1243 dst inside:10.1.2.15/1434 by access-group =
"outsid
e_access_in"
...running syslog-ng
May 19 00:35:29 logger01 %PIX-4-106023: Deny udp src =
outside:4.4.6.15/57112
dst inside:10.1.2.16/514 by access-group "outside_access_in"
May 19 00:36:29 logger01 %PIX-4-106023: Deny udp src =
outside:4.4.6.15/57112
dst inside:10.1.2.16/514 by access-group "outside_access_in"


root@logger01 [/root]# gdb /usr/local/sbin/syslog-ng syslog-ng.core
GNU gdb 4.16.1
Copyright 1996 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 "sparc64-unknown-openbsd3.5"...
Core was generated by `syslog-ng'.
Program terminated with signal 11, Segmentation fault.
Couldn't read input and local registers from core file
Couldn't read input and local registers from core file
#0  0x114d48 in werror () at macros.c:104
104             return l;
(gdb)=20

And here is an obnoxiously long ktrace output when running with no =
flags...

 30343 syslog-ng GIO   fd 3 read 3503 bytes
       "# syslog-ng configuration file.
        #
        # This should behave pretty much like the original syslog on =
RedHat.
B\
        ut
        # it could be configured a lot smarter.
        #
        # See syslog-ng(8) and syslog-ng.conf(5) for more information.
        #
        # 20000925 gb@sysfive.com

        options { sync (0);
                  time_reopen (10);
                  log_fifo_size (1000);
                  keep_hostname (yes);
                  chain_hostnames (yes);
                  long_hostnames (off);
                  use_dns (no);
                  use_fqdn (no);
                  create_dirs (no);
                  keep_hostname (yes);
                };

        #source s_sys { unix-stream ("/dev/log"); internal(); file
("/dev/klog\
        ") };
        source s_sys { unix-dgram ("/dev/log"); internal(); file
("/dev/klog")\
        ; };
        source s_udp { udp (); };

        destination d_cons   { file("/dev/console"); };
        destination d_mesg   { file("/var/log/messages"); };
        destination d_auth   { file("/var/log/authlog"); };
        destination d_authp  { file("/var/log/secure"); };
        destination d_cron   { file("/var/cron/log"); };
        destination d_daem   { file("/var/log/daemon"); };
        destination d_ftp    { file("/var/log/xferlog"); };
        destination d_lpr    { file("/var/log/lpd-errs"); };
        destination d_mail   { file("/var/log/maillog"); };
        destination d_spol   { file("/var/log/uucp"); };
        destination d_mlal   { usertty("*"); };
        destination d_root   { usertty("root"); };
        destination d_trap   { file("/var/log/snmptraps"); };
        destination d_cisco { file("/var/log/cisco"
                        template("$FULLDATE $HOST $FACILITY.$PRIORITY
$MSG\\n"\
        )); };
        destination d_catchudp    { =
file("/var/log/systems/catchudp.log");
};
        destination d_catchsys    { file("/var/log/catchsys.log"); };
        #destination d_swatch { program("/usr/bin/swatch -c
/etc/swatch/swatch\
        rc -p \\"cat /dev/fd/0\\""); };

        filter f_kern      { facility(kern); };
        filter f_mesg      { level(info..emerg) and not
                                facility(mail, auth, authpriv, ftp,
lpr,local0\
        , local7) and not
                                filter(f_croner) and not
                                facility(daemon) and level(info); };
        filter f_auth      { facility(auth); };
        filter f_authp     { facility(authpriv); };
        filter f_cron      { facility(cron); };
        filter f_mail      { facility(mail); };
        filter f_daem      { facility(daemon); };
        filter f_ftp       { facility(ftp); };
        filter f_lpr       { facility(lpr); };
        filter f_mail      { facility(mail); };
        filter f_emerg     { level(emerg); };
        filter f_spol      { facility(uucp) or
                                (facility(news) and
                                level(crit)); };
        filter f_trap      { facility(local0); };
        filter f_cisco     { facility(local7); };
        filter f_swatch    { level(info..emerg); };

        #log { source(s_sys); filter(f_kern);  destination(d_cons); };
        log { source(s_sys); filter(f_kern);   destination(d_mesg); };
        log { source(s_sys); filter(f_mesg);   destination(d_mesg); };
        log { source(s_sys); filter(f_auth);   destination(d_auth); };
        log { source(s_sys); filter(f_mail);   destination(d_mail); };
        log { source(s_sys); filter(f_emerg);  destination(d_mlal); };
        log { source(s_sys); filter(f_spol);   destination(d_spol); };
        log { source(s_sys); filter(f_cron);   destination(d_cron); };
        log { source(s_sys); filter(f_trap);   destination(d_trap); };
        log { source(s_udp); filter(f_cisco);  destination(d_cisco); };
        log { source(s_sys); filter(f_swatch); destination(d_catchsys); =
};
        #log { source(s_ksy); filter(f_swatch); destination(d_catchsys); =
};
        #log { source(s_udp); filter(f_swatch); destination(d_swatch); =
};
        #log { source(s_udp); filter(f_swatch); destination(d_catchudp); =
};

       "
 30343 syslog-ng RET   read 3503/0xdaf
 30343 syslog-ng CALL  read(0x3,0x730000,0x4000)
 30343 syslog-ng RET   read 0
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x46cd8000,0x8000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x46cd8000,0x8000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x46cd8000,0x8000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x46cd8000,0x8000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  ioctl(0x3,TIOCGETA,0xfffffffffffee150)
 30343 syslog-ng RET   ioctl -1 errno 25 Inappropriate ioctl for device
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x46cd8000,0x8000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x46cd8000,0x8000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  close(0x3)
 30343 syslog-ng RET   close 0
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  pipe(0xfffffffffffeedf0)
 30343 syslog-ng RET   pipe 0
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  fork
 30343 syslog-ng RET   fork 24318/0x5efe
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  close(0x4)
 30343 syslog-ng RET   close 0
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  read(0x3,0xfffffffffffeedef,0x1)
 30343 syslog-ng GIO   fd 3 read 1 bytes
       "\0"
 30343 syslog-ng RET   read 1
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x41c000,0x2000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x46cd8000,0x8000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x46cd8000,0x8000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x46cd8000,0x8000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x46cd8000,0x8000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  munmap(0x473e8000,0x2000)
 30343 syslog-ng RET   munmap 0
 30343 syslog-ng CALL  sigprocmask(0x1,0xffffffff)
 30343 syslog-ng RET   sigprocmask 0
 30343 syslog-ng CALL  mprotect(0x46cd8000,0x8000,0x7)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  mprotect(0x46cd8000,0x8000,0x5)
 30343 syslog-ng RET   mprotect 0
 30343 syslog-ng CALL  sigprocmask(0x3,0)
 30343 syslog-ng RET   sigprocmask -65793/0xfffefeff
 30343 syslog-ng CALL  exit(0)
root@logger01 [/root]#


Balazs Scheidler wrote:
> 2004-05-19, sze keltez=E9ssel 03:54-kor Steven J. Surdock ezt =EDrta:
>=20
> thanks for the report, this patch should be the real solution:
>=20
> diff -u -r1.4.4.4 macros.c
...