Bug 430847

Summary: Logrotate cronjob hangs on iptraf file
Product: [Fedora] Fedora Reporter: Egon Kastelijn <redhat2>
Component: logrotateAssignee: Tomas Smetana <tsmetana>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-11 08:10:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The original logrotate config file
none
The new logrotate config file (rpmnew)
none
The output of the requested logrotate command none

Description Egon Kastelijn 2008-01-30 04:43:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.10) Gecko/20071213 Fedora/2.0.0.10-3.fc8 Firefox/2.0.0.10

Description of problem:
Logrotate hangs (daily) if iptraf is installed and prevents other cron-jobs from starting.

It seems to have problems with the file /var/log/iptraf/rvnamed.log
This is what I see in /var/lib/logrotate.status

=======================================================
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.1.2.gz.2.gz.1.1.1.1.1.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.1.2.gz.2.gz.1.1.1.1.2.gz.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.1.2.gz.2.gz.1.1.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.1.2.gz.2.gz.1.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.1.2.gz.2.gz.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.1.2.gz.2.gz.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.1.1.1.1.1.1.1.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.1.1.1.1.1.1.2.gz.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.1.1.1.1.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.1.1.1.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.1.1.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.1.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.2.gz.1.1.1.1.1.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.2.gz.1.1.1.1.2.gz.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.2.gz.1.1.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.2.gz.1.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.2.gz.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.2.gz.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.1.1.1.1.1.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.1.1.1.1.2.gz.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.1.1.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.1.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.2.gz.4.gz" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.2.gz.2.gz.2.gz.4.gz.1.1.1.1.1.1.1.1.1" 2008-1-7
"/var/log/iptraf/rvnamed.log.2.gz.2.gz.3.gz.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1" 2008-1-7
=======================================================
# cat /etc/logrotate.d/iptraf
# Logrotate file for iptraf
/var/log/iptraf/*.log {
        compress
        delaycompress
        missingok
        notifempty
        rotate 4
        create 0600 root root
}
#

Version-Release number of selected component (if applicable):
logrotate-3.7.6-1.3.fc8  iptraf-3.0.0-7.fc8  kernel-2.6.21-2952.fc8xen

How reproducible:
Always


Steps to Reproduce:
1. Install Fedora 8 (x86_64)
2. Install logrotate & iptraf
3. Wait one night (for cron.daily to start)


Actual Results:
Logrotate hangs with high cpu load and blocks the other cron jobs.


Expected Results:
Logrotate should exit with an error and return its exit-code to cron.

Additional info:
When I uninstall iptraf then the problem disappears.
When I reinstall iptraf then the problem is back.

Comment 1 Egon Kastelijn 2008-01-30 04:45:08 UTC
# cat /var/log/iptraf/rvnamed.log
Tue Jan 29 21:35:45 2008: ******** rvnamed started ********
Tue Jan 29 21:35:45 2008: Clearing socket names
Tue Jan 29 21:35:45 2008: Opening sockets
Tue Jan 29 21:37:00 2008: Received quit instruction
Tue Jan 29 21:37:00 2008: Closing sockets
Tue Jan 29 21:37:00 2008: Clearing socket names
Tue Jan 29 21:37:00 2008: rvnamed terminating: max processes spawned: 23
Tue Jan 29 21:37:00 2008: ******** rvnamed terminated ********
#

Comment 2 Tomas Smetana 2008-01-30 10:26:29 UTC
I'm trying to reproduce the problem right now but everything seems to be working
OK.  However I use logrotate-3.7.6-2.2.fc8 and iptraf-3.0.0-8.fc8.

There are several strange things in your report: the '.1.1.1'-like suffixes show
evidence of a bug in the logrotate config for iptraf (there must have been
/var/log/iptraf/* pattern).  Also note that the default configuration for
logrotate uses dateext.  Did you upgrade your Fedora from any previous version?

Could you please tell me how do you have your SELinux set (output of
/usr/sbin/getenforce)?  Could you please also post the contents of
/var/log/iptraf/ directory?

Thanks.



Comment 3 Egon Kastelijn 2008-01-31 22:15:44 UTC
To answer your first question:
* Yes, I did upgrade this system from FC7 to Fedora 8 using Yum.

I am sorry to tell you that I removed all the entries in /var/log/iptraf/ when I
noticed the problem the first time. But removing the files did not stop the
problem from occurring.
At the moment there is only 1 file there, but as far as I can see logrotate
seems to hang on that file too.

I have SE-Linux disabled:
# /usr/sbin/getenforce
Disabled
#

And the contents of the directory:
# ls -al /var/log/iptraf/
total 12
drwxr-xr-x  2 root root 4096 2008-01-31 06:40 .
drwxr-xr-x 31 root root 4096 2008-01-31 06:47 ..
-rw-------  1 root root    0 2008-01-31 06:40 rvnamed.log
-rw-r--r--  1 root root  428 2008-01-29 21:37 rvnamed.log.1
#

# cat /var/log/iptraf/rvnamed.log.1
Tue Jan 29 21:35:45 2008: ******** rvnamed started ********
Tue Jan 29 21:35:45 2008: Clearing socket names
Tue Jan 29 21:35:45 2008: Opening sockets
Tue Jan 29 21:37:00 2008: Received quit instruction
Tue Jan 29 21:37:00 2008: Closing sockets
Tue Jan 29 21:37:00 2008: Clearing socket names
Tue Jan 29 21:37:00 2008: rvnamed terminating: max processes spawned: 23
Tue Jan 29 21:37:00 2008: ******** rvnamed terminated ********
#

Hope this helps.

Comment 4 Tomas Smetana 2008-02-01 07:08:27 UTC
I have iptraf installed, but logrotate seems to run OK.

Please try to upgrade logrotate and iptraf to the latest versions and then try
to run (as root) 'logrotate -d -f /etc/logrotate.conf' .  This should only print
the debugging information but change no files.  Also -- due to the upgrade you
have a different /etc/logrotate.conf.  Could you please attach output of the
command and your config file?

I'm sorry to bother you but since I can't reproduce the problem myself I have no
other options.

Thanks.

Comment 5 Egon Kastelijn 2008-02-01 13:43:48 UTC
Just to set things straight: You absolutely don't bother me by asking me to
reproduce the problem. This is my way of doing something back for the community.
;)

Attached you will find the output of the logrotate command, and my
/etc/logrotate.conf
The script process at this point with 100% cpu usage.

After killing the process I replaced the config file with the .rpmnew file.
But that gave the same results.

Comment 6 Egon Kastelijn 2008-02-01 13:44:55 UTC
Created attachment 293722 [details]
The original logrotate config file

Comment 7 Egon Kastelijn 2008-02-01 13:45:30 UTC
Created attachment 293723 [details]
The new logrotate config file (rpmnew)

Comment 8 Egon Kastelijn 2008-02-01 13:46:22 UTC
Created attachment 293724 [details]
The output of the requested logrotate command

Comment 9 Egon Kastelijn 2008-02-01 13:48:59 UTC
I noticed a typo in my text, I meant to say:
"The process hangs at this point with 100% cpu usage".

Comment 10 Tomas Smetana 2008-02-06 09:10:50 UTC
I'm sorry but I really can't reproduce the behaviour.  Could you create a core
file of the hanged process (with the logrotate-debuginfo package installed)?

Comment 11 Egon Kastelijn 2008-02-07 12:35:29 UTC
Sorry for my late response..
I have been trying to reproduce the problem the last few days.
But believe it or not, I am unable to reproduce the problem myself.. 
;(

The only thing that is different is the fact that I did a reboot my machine (for
other reasons) and I used the .rpmnew file for the logrotate config.

I think it is wise to close this bug-report.

Comment 12 Tomas Smetana 2008-02-11 08:10:20 UTC
OK. I'll close this with WORKSFORME.  If the problem reappears please open the
bug again or file new one.  Thanks.