Bug 429454

Summary: logrotate fails due to invalid pointer
Product: [Fedora] Fedora Reporter: Pat Gardner <pat>
Component: logrotateAssignee: Tomas Smetana <tsmetana>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8CC: davej, long, morgoth6
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 3.7.6-2.2.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-24 21:58:33 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:

Description Pat Gardner 2008-01-20 14:45:34 UTC
Description of problem: Logrotate fails to run either from cron.daily or when 
running manually.


Version-Release number of selected component (if applicable): logrotate-3.7.6-
2.1.fc8


How reproducible: Always


Steps to Reproduce:
1. Wait for cron.daily/lorotate to run or run /usr/sbin/logrotate /etc/
logrotate.conf
2.
3.
  
Actual results: 
** glibc detected *** /usr/sbin/logrotate: free(): invalid pointer: 0x094209e0 
***
======= Backtrace: =========
/lib/libc.so.6[0x435ac1]
/lib/libc.so.6(cfree+0x90)[0x4390f0]
/lib/libselinux.so.1(freecon+0x1d)[0x9769cd]
/usr/sbin/logrotate[0x804aa64]
/usr/sbin/logrotate[0x804ca01]
/usr/sbin/logrotate[0x804d2ca]
/lib/libc.so.6(__libc_start_main+0xe0)[0x3e2390]
/usr/sbin/logrotate[0x80497f1]
======= Memory map: ========
00110000-00111000 r-xp 00110000 00:00 0          [vdso]
00111000-0011b000 r-xp 00000000 fd:00 29524008   /lib/libnss_files-2.7.so
0011b000-0011c000 r-xp 00009000 fd:00 29524008   /lib/libnss_files-2.7.so
0011c000-0011d000 rwxp 0000a000 fd:00 29524008   /lib/libnss_files-2.7.so
003a9000-003c4000 r-xp 00000000 fd:00 29523976   /lib/ld-2.7.so
003c4000-003c5000 r-xp 0001a000 fd:00 29523976   /lib/ld-2.7.so
003c5000-003c6000 rwxp 0001b000 fd:00 29523976   /lib/ld-2.7.so
003cc000-0051f000 r-xp 00000000 fd:00 29523978   /lib/libc-2.7.so
0051f000-00521000 r-xp 00153000 fd:00 29523978   /lib/libc-2.7.so
00521000-00522000 rwxp 00155000 fd:00 29523978   /lib/libc-2.7.so
00522000-00525000 rwxp 00522000 00:00 0 
00552000-00555000 r-xp 00000000 fd:00 29523980   /lib/libdl-2.7.so
00555000-00556000 r-xp 00002000 fd:00 29523980   /lib/libdl-2.7.so
00556000-00557000 rwxp 00003000 fd:00 29523980   /lib/libdl-2.7.so
00944000-0094f000 r-xp 00000000 fd:00 29524329   /lib/libgcc_s-4.1.2-
20070925.so.1
0094f000-00950000 rwxp 0000a000 fd:00 29524329   /lib/libgcc_s-4.1.2-
20070925.so.1
0096d000-00986000 r-xp 00000000 fd:00 29524002   /lib/libselinux.so.1
00986000-00988000 rwxp 00018000 fd:00 29524002   /lib/libselinux.so.1
00aee000-00af6000 r-xp 00000000 fd:00 29524268   /lib/libpopt.so.0.0.0
00af6000-00af7000 rwxp 00007000 fd:00 29524268   /lib/libpopt.so.0.0.0
08048000-08054000 r-xp 00000000 fd:00 5672913    /usr/sbin/logrotate
08054000-08055000 rw-p 0000b000 fd:00 5672913    /usr/sbin/logrotate
09413000-09434000 rw-p 09413000 00:00 0 
b7e00000-b7e21000 rw-p b7e00000 00:00 0 
b7e21000-b7f00000 ---p b7e21000 00:00 0 
b7f0b000-b7f0d000 rw-p b7f0b000 00:00 0 
bfca8000-bfcbd000 rw-p bffea000 00:00 0          [stack]
/etc/cron.daily/logrotate: line 3:  1525 Aborted                 /usr/sbin/
logrotate /etc/logrotate.conf



Expected results: Logrotate should run without error


Additional info:

Comment 1 Tomas Smetana 2008-01-21 06:59:22 UTC
*** Bug 429467 has been marked as a duplicate of this bug. ***

Comment 2 Tomas Smetana 2008-01-21 07:47:46 UTC
I can't reproduce this but I think I found where the problem might be.  Just to
be sure: How do you have your SELinux set (output of /usr/sbin/getenforce)?

Comment 3 Tomas Smetana 2008-01-21 08:50:45 UTC
Here's a blind attempt to fix the error.  I would appreciate if you could help
me to test (one of) the following packages (never mind if you can't but it may
speed things up):

http://tsmetana.fedorapeople.org/logrotate/

I keep trying to reproduce the bug but I suspect it would require some more
SELinux gymnastic -- at least if the problem is where I think...

Comment 4 Marcin Kurek 2008-01-21 13:07:07 UTC
I was able to reproduce same problem here with current fc8 version of logrotate.
It segfaults on samba/old directory, but version from
http://tsmetana.fedorapeople.org/logrotate seems to be fine. To crash this time
after upgrading.


Comment 5 Marcin Kurek 2008-01-21 13:07:59 UTC
-To +No of coz. Sorry.

Comment 6 Tomas Smetana 2008-01-21 13:22:45 UTC
OK.  That's a good news.  I'll try to commit the new patch and build packages
for testing repositories as soon as possible.  Thanks.

Comment 7 Pat Gardner 2008-01-21 22:28:05 UTC
I can also confirm that logrotate-3.7.6-2.2.fc8.i386 from http://
tsmetana.fedorapeople.org/logrotate works ok.

To answer the earlier question, SELinux was set to enforcing.

Comment 8 Fedora Update System 2008-01-22 15:56:43 UTC
logrotate-3.7.6-2.2.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update logrotate'

Comment 9 Fedora Update System 2008-01-24 21:58:31 UTC
logrotate-3.7.6-2.2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.