Bug 214572 - Segfault running logrotate
Segfault running logrotate
Product: Fedora
Classification: Fedora
Component: logrotate (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
Depends On:
  Show dependency treegraph
Reported: 2006-11-08 08:04 EST by david.hagood
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-11-16 20:19:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
valgrind output (2.10 KB, text/plain)
2006-11-09 07:15 EST, david.hagood
no flags Details
GDB output, showing back trace and a couple of variable values. If there's anything else I can show, let me know (2.69 KB, text/plain)
2006-11-09 07:19 EST, david.hagood
no flags Details
logrotate config files (1.64 KB, application/octet-stream)
2006-11-09 08:30 EST, david.hagood
no flags Details
ll -l /var/log output (4.76 KB, text/plain)
2006-11-09 10:12 EST, david.hagood
no flags Details

  None (edit)
Description david.hagood 2006-11-08 08:04:23 EST
Description of problem:
Logrotate segfaults when run.

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

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 06:51:12 EST
I can't reproduce it. :-(

Could you install debuginfo package and run it in valgrind.
Comment 2 david.hagood 2006-11-09 07:15:00 EST
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 07:19:18 EST
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 07:55:04 EST
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 08:30:22 EST
Created attachment 140764 [details]
logrotate config files

Per request, here are the config files
Comment 6 Peter Vrabec 2006-11-09 09:13:36 EST
I still can't reproduce it.

Send me #ll -R /var/log/ output.
Comment 7 david.hagood 2006-11-09 10:12:22 EST
Created attachment 140775 [details]
ll -l /var/log output

Per request, var log output
Comment 8 Peter Vrabec 2006-11-14 05:59:55 EST
I can't reproduce it. 

Does it happend on clean FC6 installation?
Comment 9 david.hagood 2006-11-14 18:56:21 EST
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 07:13:58 EST
I meant clean installation from zero.
Comment 11 david.hagood 2006-11-16 20:19:55 EST
Somehow the executable was corrupted, and that fact was not being detected.

Note You need to log in before you can comment on or make changes to this bug.