Bug#427791: syslog-ng dies after cron.daily

2007-06-21 Thread Chris Taylor

Szalay Attila wrote:

Hi!

On Wed, 2007-06-06 at 11:34 +0100, Chris Taylor wrote:
When trying to reproduce it manually, sending kill -HUP causes syslog-ng 
to die shortly after it gets a new PID.

I am able to consistently reproduce this.
No data is written to the new logfile until I manually restart syslog-ng


Could you do it again and in the same time strace-ing the syslog-ng?
(strace -fo output -s 512 -p `pidof syslog-ng`) And after it please send
the output to me.

Thanks.




Sorry about the delay, things have been pretty busy.

Attached is the strace output.


Below is the process I used:



d350-berlin:~# cat /var/run/syslog-ng.pid; echo
24507
d350-berlin:~# kill -HUP `cat /var/run/syslog-ng.pid`
d350-berlin:~# cat /var/run/syslog-ng.pid; echo
24507
d350-berlin:~# ps ax | grep syslog-ng
24551 pts/2S+ 0:00 grep syslog-ng
d350-berlin:~# tail -f /var/log/messages
Jun 20 19:52:22 10.37.0.72 ports:  port 10 is now off-line
Jun 20 19:55:15 10.37.0.71 00077 ports:  port 17 is now off-line
Jun 20 20:16:52 10.37.0.71 00331 FFI:  port 24-High collision or drop 
rate. See help.

Jun 20 20:40:25 10.37.0.72 SNTP:  updated time by -4 seconds
Jun 20 21:09:53 10.37.0.71 00331 FFI:  port 24-High collision or drop 
rate. See help.
Jun 20 21:18:15 10.37.0.71 00331 FFI:  port 24-High collision or drop 
rate. See help.
Jun 20 21:23:50 10.37.0.71 00331 FFI:  port 24-High collision or drop 
rate. See help.

Jun 20 23:06:49 10.37.0.74 SNTP:  updated time by -4 seconds
Jun 21 00:49:56 10.37.0.64 SNTP:  updated time by -4 seconds
Jun 21 10:40:41 d350-berlin syslog-ng[24507]: syslog-ng starting up; 
version='2.0.0'





As you can see, -HUP is causing syslog-ng to die (in fact the strace 
says it's segfaulting.. always fun), thus leaving us without any logging 
of any kind.


Let me know if you need any more information.


Thanks,
Chris
24507 gettimeofday({1182418884, 445078}, NULL) = 0
24507 gettimeofday({1182418884, 445188}, NULL) = 0
24507 poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN, revents=POLLIN}, 
{fd=5, events=POLLIN}, {fd=6, events=POLLIN}], 4, 137026) = 1
24507 gettimeofday({1182418898, 162028}, NULL) = 0
24507 accept(4, {sa_family=AF_FILE, [EMAIL PROTECTED], [2]) = 11
24507 fcntl64(11, F_GETFL)  = 0x2 (flags O_RDWR)
24507 fcntl64(11, F_SETFL, O_RDWR|O_NONBLOCK) = 0
24507 fcntl64(11, F_GETFD)  = 0
24507 fcntl64(11, F_SETFD, FD_CLOEXEC)  = 0
24507 gettimeofday({1182418898, 162615}, NULL) = 0
24507 poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, 
events=POLLIN}, {fd=11, events=POLLIN, revents=POLLIN|POLLHUP}, {fd=4, 
events=POLLIN}], 5, 123309) = 1
24507 gettimeofday({1182418898, 162780}, NULL) = 0
24507 read(11, 38Jun 21 10:41:38 sshd[24538]: Accepted password for root 
from 193.203.82.100 port 22449 ssh2\0, 8192) = 96
24507 gettimeofday({1182418898, 162996}, NULL) = 0
24507 time(NULL)= 1182418898
24507 stat64(/etc/localtime, {st_mode=S_IFREG|0644, st_size=1323, ...}) = 0
24507 gettimeofday({1182418898, 163355}, NULL) = 0
24507 time(NULL)= 1182418898
24507 open(/var/log/auth.log, 
O_WRONLY|O_NONBLOCK|O_APPEND|O_CREAT|O_NOCTTY|O_LARGEFILE, 0640) = 12
24507 fcntl64(12, F_GETFD)  = 0
24507 fcntl64(12, F_SETFD, FD_CLOEXEC)  = 0
24507 fchown32(12, 0, -1)   = 0
24507 fchown32(12, -1, 4)   = 0
24507 fchmod(12, 0640)  = 0
24507 time(NULL)= 1182418898
24507 time(NULL)= 1182418898
24507 read(11, , 8192)= 0
24507 close(11) = 0
24507 gettimeofday({1182418898, 164271}, NULL) = 0
24507 poll([{fd=7, events=POLLOUT, revents=POLLOUT}, {fd=10, events=POLLOUT, 
revents=POLLOUT}, {fd=12, events=POLLOUT, revents=POLLOUT}, {fd=3, 
events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=4, 
events=POLLIN}], 7, 123307) = 3
24507 stat64(/etc/localtime, {st_mode=S_IFREG|0644, st_size=1323, ...}) = 0
24507 write(7, 38Jun 21 10:41:38 d350-berlin sshd[24538]: Accepted password 
for root from 193.203.82.100 port 22449 ssh2\n, 108) = 108
24507 stat64(/etc/localtime, {st_mode=S_IFREG|0644, st_size=1323, ...}) = 0
24507 write(10, Jun 21 10:41:38 d350-berlin sshd[24538]: Accepted password for 
root from 193.203.82.100 port 22449 ssh2\n, 104) = 104
24507 stat64(/etc/localtime, {st_mode=S_IFREG|0644, st_size=1323, ...}) = 0
24507 write(12, Jun 21 10:41:38 d350-berlin sshd[24538]: Accepted password for 
root from 193.203.82.100 port 22449 ssh2\n, 104) = 104
24507 gettimeofday({1182418898, 165322}, NULL) = 0
24507 poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, 
events=POLLIN}, {fd=4, events=POLLIN, revents=POLLIN}], 4, 123306) = 1
24507 gettimeofday({1182418898, 242930}, NULL) = 0
24507 accept(4, {sa_family=AF_FILE, [EMAIL PROTECTED], [2]) = 11
24507 fcntl64(11, F_GETFL)  = 0x2 (flags O_RDWR)
24507 fcntl64(11, F_SETFL, O_RDWR|O_NONBLOCK) = 0
24507 fcntl64(11, F_GETFD)  = 0

Bug#427791: syslog-ng dies after cron.daily

2007-06-13 Thread Szalay Attila
Hi!

On Wed, 2007-06-06 at 11:34 +0100, Chris Taylor wrote:
 
 When trying to reproduce it manually, sending kill -HUP causes syslog-ng 
 to die shortly after it gets a new PID.
 I am able to consistently reproduce this.
 No data is written to the new logfile until I manually restart syslog-ng

Could you do it again and in the same time strace-ing the syslog-ng?
(strace -fo output -s 512 -p `pidof syslog-ng`) And after it please send
the output to me.

Thanks.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#427791: syslog-ng dies after cron.daily

2007-06-06 Thread Chris Taylor

Package: syslog-ng
Version: 2.0.0-1
Severity: grave


Syslog-ng is dying repeatedly after logrotate runs.
I believe that in most cases it continues to log to the original file, 
despite it having been rotated, though I am not 100% sure of this.
Where it does continue running, it dies when the 2nd rotate occurs, 
where the logfile is gzipped.


When trying to reproduce it manually, sending kill -HUP causes syslog-ng 
to die shortly after it gets a new PID.

I am able to consistently reproduce this.
No data is written to the new logfile until I manually restart syslog-ng

For now, as a workaround, I have altered the post-rotate command to 
restart syslog-ng rather than reload.




Chris


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]