RE: [syslog-ng] SIGHUP kills syslog-ng on FreeBSD 3-STABLE
Yes, this worked. Cheers, GLZ -----Original Message----- From: Balazs Scheidler [mailto:bazsi@balabit.hu] Sent: Thursday, December 09, 1999 7:01 PM To: syslog-ng@venus.terrasoft.hu Subject: Re: [syslog-ng] SIGHUP kills syslog-ng on FreeBSD 3-STABLE On Wed, Dec 08, 1999 at 03:38:42AM +0100, Lowkrantz, Goran wrote:
Hi,
No, it didn't help. Now it just dies silently, not even a work on the console.
The only thing I can see is that if I start the old syslogd immediately after syslog-ng died on HUP, I get the following on the console: syslogd: cannot create /var/run/log: Address already in use
I have yet another patch which should really fix your problems under BSD. Touch afinet.c.x and afunix.c.x before rebuilding, if you don't have scsh installed. diff -urN syslog-ng-1.3.6/src/afinet.c syslog-ng.bsd/src/afinet.c --- syslog-ng-1.3.6/src/afinet.c Tue Nov 23 20:45:45 1999 +++ syslog-ng.bsd/src/afinet.c Thu Dec 9 16:31:34 1999 @@ -269,11 +269,15 @@ case AFSOCKET_DGRAM: { struct afsocket_source_connection *conn; struct io_fd *client = make_io_fd(cfg->backend, fd); + int res; self->super.num_connections = 1; conn = make_afinet_source_connection(client, NULL, &self->super, self->super.super.super.next); - LOG_HANDLER_INIT(conn, cfg, NULL); - + res = LOG_HANDLER_INIT(conn, cfg, NULL); + if ((res & ST_FAIL) == 0) { + conn->queue_node = + object_queue_add_tail(self->super.connections, &conn->super.super.super); + } break; } default: diff -urN syslog-ng-1.3.6/src/afunix.c syslog-ng.bsd/src/afunix.c --- syslog-ng-1.3.6/src/afunix.c Tue Nov 23 20:32:37 1999 +++ syslog-ng.bsd/src/afunix.c Thu Dec 9 16:33:15 1999 @@ -241,11 +241,16 @@ case AFSOCKET_DGRAM: { struct afsocket_source_connection *conn; struct io_fd *client = make_io_fd(cfg->backend, fd); - + int res; + self->super.num_connections = 1; conn = make_afunix_source_connection(client, NULL, &self->super, self->super.super.super.next); - LOG_HANDLER_INIT(conn, cfg, NULL); - + res = LOG_HANDLER_INIT(conn, cfg, NULL); + + if ((res & ST_FAIL) == 0) { + conn->queue_node = + object_queue_add_tail(self->super.connections, &conn->super.super.super); + } break; } default: -- 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
i just restarted syslog-ng for the 3rd time in 2 weeks today. our setup is as follows, sol 2.6 log server, cluster machines running 2.7 which log remotely to the 2.6 box. ive successfully restarted syslog-ng on all the machines except for one. here is truss/core output root@s0-c2:~> adb core core file = core -- program ``syslog-ng'' on platform SUNW,Ultra-5_10 SIGABRT: Abort root@s0-c2:~> truss /etc/init.d/syslog start execve("/sbin/sh", 0xFFBEFD04, 0xFFBEFD14) argc = 3 getpid() = 13264 [13263] getpgid(13264) = 13263 getsid(13264) = 12488 brk(0x000629B0) = 0 sysconfig(_CONFIG_SIGRT_MIN) = 38 sysconfig(_CONFIG_SIGRT_MAX) = 45 sigaltstack(0xFFBEFBFC, 0x00000000) = 0 sigaction(SIGHUP, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGHUP, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGINT, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGINT, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGQUIT, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGQUIT, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGILL, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGILL, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGTRAP, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGTRAP, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGABRT, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGABRT, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGEMT, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGEMT, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGFPE, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGFPE, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGBUS, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGBUS, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGSEGV, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGSYS, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGSYS, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGPIPE, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGPIPE, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGALRM, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGALRM, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGTERM, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGTERM, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGUSR1, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGUSR1, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGUSR2, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGUSR2, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGPWR, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGPWR, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGURG, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGURG, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGPOLL, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGPOLL, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGVTALRM, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGVTALRM, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGPROF, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGPROF, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGXCPU, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGXCPU, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGXFSZ, 0x00000000, 0xFFBEFB78) = 0 sigaction(SIGXFSZ, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGRTMIN, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGRTMIN+1, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGRTMIN+2, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGRTMIN+3, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGRTMAX-3, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGRTMAX-2, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGRTMAX-1, 0xFFBEFAD8, 0xFFBEFB58) = 0 sigaction(SIGRTMAX, 0xFFBEFAD8, 0xFFBEFB58) = 0 brk(0x00062BB0) = 0 getuid() = 0 [0] getuid() = 0 [0] getgid() = 1 [1] getgid() = 1 [1] open64("/etc/init.d/syslog", O_RDONLY) = 3 close(19) Err#9 EBADF fcntl(3, F_DUPFD, 0x00000013) = 19 close(3) = 0 fcntl(19, F_SETFD, 0x00000001) = 0 ioctl(2, TCGETA, 0xFFBEFB24) = 0 ioctl(19, TCGETA, 0xFFBEFB24) Err#25 ENOTTY read(19, " # ! / s b i n / s h\n #".., 128) = 128 read(19, " S M I "\n\n D I R = /".., 128) = 128 read(19, " n g ] ; t h e n\n\t".., 128) = 128 brk(0x00062EB0) = 0 read(19, " h a t m e s s a g e s".., 128) = 128 read(19, " 1 &\n\t f i\n\t ; ;\n".., 128) = 128 read(19, " ] & & k i l l - 1".., 128) = 86 brk(0x000632B0) = 0 stat64("/logs/conf/nodes/syslog-ng.conf", 0xFFBEF6C0) = 0 stat64("/usr/local/sbin/syslog-ng", 0xFFBEF660) = 0 syslog service starting. write(1, " s y s l o g s e r v i".., 25) = 25 fork() = 13265 waitid(P_ALL, 0, 0xFFBEF810, WEXITED|WTRAPPED|WNOHANG) = 0 brk(0x000630B0) = 0 read(19, 0x00061978, 128) = 0 ioctl(19, TCGETA, 0xFFBEFABC) Err#25 ENOTTY ioctl(19, TCGETA, 0xFFBEFB1C) Err#25 ENOTTY close(19) = 0 llseek(0, 0, SEEK_CUR) = 45696 _exit(0) then it creates a new core file. * * * * * * * * * * * * * * * * * * Jacob Zehnder * * * * * * * * * Grill Master * * * * * * * * "The dude abides." * * * * 'The Big Lebowski' * * * * * * * * * * * * * *
On Thu, Dec 09, 1999 at 12:14:15PM -0800, Jacob Zehnder wrote:
i just restarted syslog-ng for the 3rd time in 2 weeks today. our setup is as follows, sol 2.6 log server, cluster machines running 2.7 which log remotely to the 2.6 box. ive successfully restarted syslog-ng on all the machines except for one. here is truss/core output
root@s0-c2:~> adb core core file = core -- program ``syslog-ng'' on platform SUNW,Ultra-5_10 SIGABRT: Abort
A backtrace would be a bit more useful.
root@s0-c2:~> truss /etc/init.d/syslog start execve("/sbin/sh", 0xFFBEFD04, 0xFFBEFD14) argc = 3
instead of truss-ing /etc/init.d/syslog, please truss syslog-ng directly. The one you sent me contains a /bin/sh truss :), and I can't do too much with it. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1 url: http://www.balabit.hu/pgpkey.txt
participants (3)
-
Balazs Scheidler
-
Jacob Zehnder
-
Lowkrantz, Goran