Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-04-2007, 07:46 AM   #1
LQ Newbie
Registered: Jun 2007
Posts: 2

Rep: Reputation: 0
application crashes at syslog logrotate

I have a really annoying problem and I'm running out of ideas!

I have an application that is quite noisy with syslog. Under heavy load, the application sometimes crashes during log rotation but very rarely. We are talking maybe once every two months. It restarts without any problems but its very important that this application does not crash. I don't seem to be able to recreate the problem in gdb so I'm not even entirely sure exactly what the application is doing at the time of crash.

There is nothing obvious in the logs, they look essentially exactly the same as a successful rotation.

CentOS 4.4
syslogd - 1.4.1
logrotate - 3.7.1

*.info;mail.none;authpriv.none;cron.none;local1.none -/var/log/messages
*.info;mail.none;authpriv.none;cron.none;local1.none |/tmp/stund_fifo
authpriv.* /var/log/secure
mail.* -/var/log/maillog
cron.* /var/log/cron
*.emerg *
uucp,news.crit /var/log/spooler
local7.* /var/log/boot.log
local1.* -/dev/null
*.=debug /var/log/debug
Old 06-04-2007, 11:50 AM   #2
LQ Newbie
Registered: Jun 2007
Location: Ontario, Canada
Distribution: Ubuntu, Debian, CentOS
Posts: 28

Rep: Reputation: 16
If you can't figure out what is causing the crashes, perhaps you can setup a monitoring script that will cleanup/restart the service if it goes down?
Old 06-05-2007, 06:06 AM   #3
LQ Newbie
Registered: Jun 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Yeah, I have done that but its not really an acceptable long term solution... this app needs to run and be reliable 24/7.
Old 06-17-2007, 05:47 AM   #4
LQ Newbie
Registered: Dec 2005
Distribution: RedHat, CentOS, Fedora, Ubuntu
Posts: 10

Rep: Reputation: 2
Are you getting a core file? If so, make sure you have not stripped symbols and have compiled with a -g option (e.g., -O2 -g or just -g). Then attack with gdb. I usually get burned (application crashing) due to syslog being called from signal level.
Old 06-17-2007, 05:47 AM   #5
LQ Newbie
Registered: Dec 2005
Distribution: RedHat, CentOS, Fedora, Ubuntu
Posts: 10

Rep: Reputation: 2
I you're not getting a core file, make sure the kernel is optioned to generate cores (/proc file setting). Remember syslog() has interwrite issues when called from signal level. Does logrotate signal syslogd to restart with a new logfile after rotation is complete; syslog() may also have interwrite issues for this case as well.

You might consider writing a test program that hammers on syslog() then in another window issue your logrotate command (just like cron does).

Last edited by gtparks; 06-17-2007 at 05:54 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using syslog-ng to for application logging nathan2225 Programming 1 05-21-2007 11:55 AM
logrotate, syslog-ng & cron hattori.hanzo Linux - Newbie 1 11-08-2006 01:08 PM
Pix logging on syslog... logrotate does not work logicalfuzz Linux - Software 0 03-06-2006 01:04 AM
LogRotate Webmin - Apache Crashes brooky Linux - Software 0 04-26-2004 03:16 AM
Linux Box crashes with no trace in syslog eDubster Linux - General 2 05-19-2003 04:43 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration