Description of problem: # /sbin/dumpe2fs -f -h /dev/mapper/myvg-rootvol > /dev/null dumpe2fs 1.35 (28-Feb-2004) Segmentation fault backtrace: #0 ext2fs_u32_list_iterate_begin (bb=0x0, ret=0x60000fffffffb2f8) at badblocks.c:242 242 EXT2_CHECK_MAGIC(bb, EXT2_ET_MAGIC_BADBLOCKS_LIST); (gdb) bt #0 ext2fs_u32_list_iterate_begin (bb=0x0, ret=0x60000fffffffb2f8) at badblocks.c:242 #1 0x20000000000556c0 in ext2fs_badblocks_list_iterate_begin (bb=0x0, ret=0x60000fffffffb2f8) at badblocks.c:258 #2 0x4000000000001930 in list_bad_blocks (fs=0x6000000000009000, dump=0) at dumpe2fs.c:195 #3 0x4000000000002240 in main (argc=4, argv=0x60000fffffffba18) at dumpe2fs.c:353 #4 0x20000000000fd430 in __libc_start_main () from /lib/tls/libc.so.6.1 #5 0x4000000000001440 in _start () The macro is expanded to: #define EXT2_CHECK_MAGIC(struct, code) \ if ((struct)->magic != (code)) return (code) and the variable 'struct' in this case is a NULL pointer. Compiling with: # CFLAGS="-O2 -fno-inline" ./configure --enable-elf-shlibs --enable-nls does not reproduce anymore: [root@rx1620 e2fsprogs-1.35]# LD_PRELOAD=lib/libext2fs.so.2 misc/dumpe2fs -f -h /dev/mapper/myvg-rootvol > /dev/null dumpe2fs 1.35 (28-Feb-2004) # Version-Release number of selected component (if applicable): e2fsprogs-1.35-12.11.el4_6.1 How reproducible: Always Additional info: It's a known problem on ARM: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=397044 Although this is actually a gcc bug would be great if we workaround this problem while gcc is not fixed. Flavio
Created attachment 295505 [details] patch to workaround gcc inline bug
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Actually, it's a aliasing violation that causes dumpe2fs segfault and building with CFLAGS="-O2 -fno-strict-aliasing" does indeed fix the problem. Check the cloned bug that I've missed before at: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=398316
Upstream patch fixing the issue: http://git.kernel.org/?p=fs/ext2/e2fsprogs.git;a=commitdiff;h=2694f31946f0c168cc8d098f3970f0ae08d94e7b
Created attachment 295548 [details] backported upstream patch Attached backported patch from upstream. Flavio
Flavio, thanks for all the legwork on this one. :) -Eric
It looks like RHEL5 should have the same problem... can you confirm? Or, I'll go looking for an ia64 somewhere... :)
I have not tested but yes, it looks like rhel-5 should have the same problem and unfortunately, the test box is not mine so I can't respin with rhel5. Flavio
I've built this into 2fsprogs-1.35-12.15.el4 Mind giving it a test for verification? Thanks, -Eric
Reproducible on x86_64 as well: # uname -a Linux timmy.example.com 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux # dumpe2fs -f -h /dev/mapper/VolGroup00-LogVol00 > /dev/null dumpe2fs 1.35 (28-Feb-2004) Segmentation fault
*** Bug 455698 has been marked as a duplicate of this bug. ***
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0732.html