Bug 214572

Summary: Segfault running logrotate
Product: [Fedora] Fedora Reporter: david.hagood
Component: logrotateAssignee: Peter Vrabec <pvrabec>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-11-17 01:19:55 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
valgrind output
none
GDB output, showing back trace and a couple of variable values. If there's anything else I can show, let me know
none
logrotate config files
none
ll -l /var/log output none

Description david.hagood 2006-11-08 13:04:23 UTC
Description of problem:
Logrotate segfaults when run.

Version-Release number of selected component (if applicable):
logrotate-3.7.4-7

How reproducible:
Every time

Steps to Reproduce:
1. /usr/sbin/logrotate /etc/logrotate.conf

  
Actual results:
Logrotate crashes.


Expected results:
Logrotate should rotate logs

Additional info:
This happen with any file in /etc/logrotate.d:

 gdb /usr/sbin/logrotate
GNU gdb Red Hat Linux (6.5-14.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb)  run  /etc/logrotate.conf
Starting program: /usr/sbin/logrotate /etc/logrotate.conf

Program received signal SIGSEGV, Segmentation fault.
0x0804df86 in readConfigFile (configFile=0x84bd720 "httpd", 
    defConfig=0xbfbe2658, logsPtr=0xbfbe2858, numLogsPtr=0xbfbe2860)
    at config.c:1042
1042                                if (!strcmp((*logsPtr)[j].files[k],

Comment 1 Peter Vrabec 2006-11-09 11:51:12 UTC
I can't reproduce it. :-(

Could you install debuginfo package and run it in valgrind.


Comment 2 david.hagood 2006-11-09 12:15:00 UTC
Created attachment 140758 [details]
valgrind output

Valgrind output attached.

This has been happening for quite some time prior to FC6 - I had just hoped
that FC6 would fix it.

Comment 3 david.hagood 2006-11-09 12:19:18 UTC
Created attachment 140759 [details]
GDB output, showing back trace and a couple of variable values. If there's anything else I can show, let me know

Comment 4 Peter Vrabec 2006-11-09 12:55:04 UTC
I need to reproduce it on same configuration as you have. Send me your 
logrotate configuration, please.

#tar cvzf logConfig.tgz /etc/logrotate.d /etc/logrotate.conf


Comment 5 david.hagood 2006-11-09 13:30:22 UTC
Created attachment 140764 [details]
logrotate config files

Per request, here are the config files

Comment 6 Peter Vrabec 2006-11-09 14:13:36 UTC
I still can't reproduce it.

Send me #ll -R /var/log/ output.


Comment 7 david.hagood 2006-11-09 15:12:22 UTC
Created attachment 140775 [details]
ll -l /var/log output

Per request, var log output

Comment 8 Peter Vrabec 2006-11-14 10:59:55 UTC
I can't reproduce it. 

Does it happend on clean FC6 installation?


Comment 9 david.hagood 2006-11-14 23:56:21 UTC
I'm not sure I understand - do you mean "A clean *update* from the FC6 release
disk onto the machine with the other files intact", or do you really mean "a
clean install from zero, preserving no data"?

If the latter, then I doubt very much it is happening since this bug would be
being flooded with "Me Too"'s.

I know *something* is screwy with this machine, as my other FC6 machine is not
showing this symptom - I just am at a loss to determine what would have gone wrong.

I'll see if I can step through with the debugger and see where things go wrong.


Comment 10 Peter Vrabec 2006-11-15 12:13:58 UTC
I meant clean installation from zero.

Comment 11 david.hagood 2006-11-17 01:19:55 UTC
Somehow the executable was corrupted, and that fact was not being detected.