Red Hat Bugzilla – Bug 455698
/sbin/badblocks segfaults on RHEL4 x86_64
Last modified: 2008-07-21 13:15:30 EDT
Description of problem:
Running e.g. '/sbin/badblocks -b 512 /dev/sda 780132465' segfaults. with strace
it ends like this:
mprotect(0x33e862c000, 12288, PROT_READ) = 0
mprotect(0x33e8314000, 4096, PROT_READ) = 0
arch_prctl(ARCH_SET_FS, 0x2a95569320) = 0
munmap(0x2a95557000, 66763) = 0
brk(0) = 0x505000
brk(0x526000) = 0x526000
open("/dev/sda", O_RDONLY) = 3
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Version-Release number of selected component (if applicable):
server# rpm -qf /sbin/badblocks
Every time. I've tested on two brand new Dell 2950's and one HP DL585 G5.
Steps to Reproduce:
1./sbin/badblocks -b 512 /dev/sda 780132465
server# /sbin/badblocks -b 512 /dev/sda 780132465
Not segfaulting. :)
Works fine on a RHEL5 x86_64 installation.
This is probably a dup of:
* Thu Mar 20 2008 Eric Sandeen <email@example.com> 1.35-12.15.EL4
- Fix aliasing violation causing dumpe2fs segfaults in ia64 (#433784)
see bug 433784 for more info; this should be part of the upcoming rhel4.7 update.
If you'd like, you can grab
http://people.redhat.com/esandeen/e2fsprogs-1.35-12.17.el4.src.rpm and rebuild
to verify that it's addressing your problem.
I'm not very familiar with building rpm-packages, but after running
rpmbuild --recompile e2fsprogs-1.35-12.17.el4.src.rpm
/var/tmp/e2fsprogs-root/sbin/badblocks -b 512 /dev/sda 780132465
Created attachment 312149 [details]
that badblocks probably still links with the older problematic libraries.
Here's a badblocks from e2fsprogs-1.35-12.17.el4, statically linked with all
the e2fsprogs libraries. Can you verify that it does not segfault?
The mostly-statically linked version does not segfault.
Thanks, I'll dup the bug, and the fix is in the update pipeline.
*** This bug has been marked as a duplicate of 433784 ***