Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 455698 - /sbin/badblocks segfaults on RHEL4 x86_64
Summary: /sbin/badblocks segfaults on RHEL4 x86_64
Keywords:
Status: CLOSED DUPLICATE of bug 433784
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: e2fsprogs
Version: 4.6
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-17 08:30 UTC by Morten Werner Forsbring
Modified: 2008-07-21 17:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-21 17:15:30 UTC
Target Upstream Version:


Attachments (Terms of Use)
mostly-static badblocks (deleted)
2008-07-18 15:23 UTC, Eric Sandeen
no flags Details

Description Morten Werner Forsbring 2008-07-17 08:30:06 UTC
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 
e2fsprogs-1.35-12.11.el4_6.1
server#

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
server#

Expected results:

Not segfaulting. :)

Additional info:

http://bugs.centos.org/view.php?id=2631

Works fine on a RHEL5 x86_64 installation.

Comment 1 Eric Sandeen 2008-07-17 14:39:52 UTC
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.

Thanks,
-Eric

Comment 2 Morten Werner Forsbring 2008-07-18 06:56:51 UTC
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 15:23:54 UTC
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?

Thanks,
-Eric

Comment 4 Morten Werner Forsbring 2008-07-21 07:07:21 UTC
The mostly-statically linked version does not segfault.

Comment 5 Eric Sandeen 2008-07-21 17:15:30 UTC
Thanks, I'll dup the bug, and the fix is in the update pipeline.

-Eric

*** 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.