LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-04-2007, 06:46 AM   #1
siege618
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.

Versions:
CentOS 4.4
syslogd - 1.4.1
logrotate - 3.7.1

Syslog.conf:
*.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, 10:50 AM   #2
mvidberg
LQ Newbie
 
Registered: Jun 2007
Location: Ontario, Canada
Distribution: Ubuntu, Debian, CentOS
Posts: 27

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, 05:06 AM   #3
siege618
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, 04:47 AM   #4
gtparks
LQ Newbie
 
Registered: Dec 2005
Posts: 9

Rep: Reputation: 1
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, 04:47 AM   #5
gtparks
LQ Newbie
 
Registered: Dec 2005
Posts: 9

Rep: Reputation: 1
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 04:54 AM.
 
  


Reply


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 10:55 AM
logrotate, syslog-ng & cron hattori.hanzo Linux - Newbie 1 11-08-2006 12:08 PM
Pix logging on syslog... logrotate does not work logicalfuzz Linux - Software 0 03-06-2006 12:04 AM
LogRotate Webmin - Apache Crashes brooky Linux - Software 0 04-26-2004 02:16 AM
Linux Box crashes with no trace in syslog eDubster Linux - General 2 05-19-2003 03:43 PM


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

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