Bug 455698 - /sbin/badblocks segfaults on RHEL4 x86_64
/sbin/badblocks segfaults on RHEL4 x86_64
Status: CLOSED DUPLICATE of bug 433784
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: e2fsprogs (Show other bugs)
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: Eric Sandeen
Depends On:
  Show dependency treegraph
Reported: 2008-07-17 04:30 EDT by Morten Werner Forsbring
Modified: 2008-07-21 13:15 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-21 13:15:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
mostly-static badblocks (88.87 KB, application/octet-stream)
2008-07-18 11:23 EDT, Eric Sandeen
no flags Details

  None (edit)
Description Morten Werner Forsbring 2008-07-17 04:30:06 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 

How reproducible:

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

Actual results:

server# /sbin/badblocks -b 512 /dev/sda 780132465
Segmentation fault

Expected results:

Not segfaulting. :)

Additional info:


Works fine on a RHEL5 x86_64 installation.
Comment 1 Eric Sandeen 2008-07-17 10:39:52 EDT
This is probably a dup of:

* Thu Mar 20 2008 Eric Sandeen <esandeen@redhat.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.

Comment 2 Morten Werner Forsbring 2008-07-18 02:56:51 EDT
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

still segfaults.
Comment 3 Eric Sandeen 2008-07-18 11:23:54 EDT
Created attachment 312149 [details]
mostly-static badblocks

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?

Comment 4 Morten Werner Forsbring 2008-07-21 03:07:21 EDT
The mostly-statically linked version does not segfault.
Comment 5 Eric Sandeen 2008-07-21 13:15:30 EDT
Thanks, I'll dup the bug, and the fix is in the update pipeline.


*** This bug has been marked as a duplicate of 433784 ***

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