Description of problem: logrotate-3.7.4-9.el5_5.1 aborts with the following error: *** glibc detected *** /usr/sbin/logrotate: free(): invalid pointer: 0x000000000f9cda10 *** when "compressoptions" is used in logrotate.conf. logrotate-3.7.4-9.el5 does not have this problem. How Reproducible: Always Steps to Reproduce: 1) Put the following line in /etc/logrotate.conf: compressoptions --best 2) logrotate -d /etc/logrotate.conf Actual Results: Crash Expected Result: No crash Version-Release number of selected component (if applicable): logrotate-3.7.4-9.el5_5.1 and later This is caused due to a mix-up of allocation and freeing of string arrays between popt and a hand-coded method written in logrotate. A test package containing the fix for this bug is available. Please contact Red Hat support if you are facing this bug.
Ever since the last update of logrotate I have been getting this error in the daily cron job mailings: /etc/cron.daily/logrotate: *** glibc detected *** /usr/sbin/logrotate: free(): invalid pointer: 0x092086e8 *** ======= Backtrace: ========= /lib/libc.so.6[0x1795a5] /lib/libc.so.6(cfree+0x59)[0x1799e9] /usr/sbin/logrotate[0x804d5f1] /usr/sbin/logrotate[0x8050afc] /usr/sbin/logrotate[0x804ca45] /lib/libc.so.6(__libc_start_main+0xdc)[0x125e9c] /usr/sbin/logrotate[0x80495c1] ======= Memory map: ======== 00110000-00263000 r-xp 00000000 03:02 4104 /lib/libc-2.5.so 00263000-00265000 r-xp 00152000 03:02 4104 /lib/libc-2.5.so 00265000-00266000 rwxp 00154000 03:02 4104 /lib/libc-2.5.so 00266000-00269000 rwxp 00266000 00:00 0 00415000-00430000 r-xp 00000000 03:02 4097 /lib/ld-2.5.so 00430000-00431000 r-xp 0001a000 03:02 4097 /lib/ld-2.5.so 00431000-00432000 rwxp 0001b000 03:02 4097 /lib/ld-2.5.so 00519000-0051a000 r-xp 00519000 00:00 0 [vdso] 0058f000-00592000 r-xp 00000000 03:02 4184 /lib/libdl-2.5.so 00592000-00593000 r-xp 00002000 03:02 4184 /lib/libdl-2.5.so 00593000-00594000 rwxp 00003000 03:02 4184 /lib/libdl-2.5.so 00596000-005ac000 r-xp 00000000 03:02 4199 /lib/libselinux.so.1 005ac000-005ae000 rwxp 00015000 03:02 4199 /lib/libselinux.so.1 005b0000-005eb000 r-xp 00000000 03:02 4190 /lib/libsepol.so.1 005eb000-005ec000 rwxp 0003b000 03:02 4190 /lib/libsepol.so.1 005ec000-005f6000 rwxp 005ec000 00:00 0 00692000-0069d000 r-xp 00000000 03:02 4212 /lib/libgcc_s-4.1.2-20080825.so.1 0069d000-0069e000 rwxp 0000a000 03:02 4212 /lib/libgcc_s-4.1.2-20080825.so.1 006a0000-006a7000 r-xp 00000000 03:09 90878 /usr/lib/libpopt.so.0.0.0 006a7000-006a8000 rwxp 00006000 03:09 90878 /usr/lib/libpopt.so.0.0.0 00b09000-00b13000 r-xp 00000000 03:02 4136 /lib/libnss_files-2.5.so 00b13000-00b14000 r-xp 00009000 03:02 4136 /lib/libnss_files-2.5.so 00b14000-00b15000 rwxp 0000a000 03:02 4136 /lib/libnss_files-2.5.so 08048000-08053000 r-xp 00000000 03:09 118081 /usr/sbin/logrotate 08053000-08055000 rw-p 0000a000 03:09 118081 /usr/sbin/logrotate 09208000-09229000 rw-p 09208000 00:00 0 [heap] b7f1f000-b7f22000 rw-p b7f1f000 00:00 0 bffa2000-bffb7000 rw-p bffe9000 00:00 0 [stack] /etc/cron.daily/logrotate: line 3: 5100 Aborted /usr/sbin/logrotate /etc/logrotate.conf
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Previously, using the "compressoptions" directive in the configuration file, /etc/logrotate.conf, caused logrotate to crash. With this update, the relevant part of the source code has been updated to use the popt library, and logrotate now works as expected.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0704.html