fsck segmentation fault

On a reboot after a crash fsck ran and asked if I wanted to fix errors.
I said yes.
fsck stopped with signal 11 and gave me the prompt
Control d to reboot or root password for maintanence.
I enter maintanence mode and type init 5.
Everything seems to start up ok, I can even access the broken hard drive.

THE PROBLEM
I still can't fsck -fp /dev/hda5.
I've tried it unmounted and mounted readonly.
fsck returns signal 11, e2fsck returns segmentation fault.

Every time I boot up it asks if I want to fix the errors, then returns signal 11,
Control D to reboot or root pass.....

I'm using mandrake 8.2 on a pentium 4.
/dev/hda5 is dual boot with windows and linux
LVL 18
Chris Harte2015 Top Expert (Most Article Points)Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jlevieCommented:
A signal 11 or a segfault during an fsck can be due to bad memory (or an MB fault) or it can be the result of a file system with serious, non-repairable damage. You can rule out memory as being the problem by using the memory exerciser from http://www.memtest86.com/. If it (and the MB) tests out okay the odds are that the file system is question is damaged beyond e2fsck's ability to repair.
Chris Harte2015 Top Expert (Most Article Points)Author Commented:
I ran the memtest it didn't report any errors.
I've managed to fsck another partition, so I don't think it is a problem with fsck.
hda5 is ext2, the others are ext3 (I don't know if that makes a difference?)

I can still run programs, read and write to hda5.
How badly can it be damaged?

PS There is nothing on there that isn't backed up or replaceable.
shivsaCommented:
looks like fsck is corrupted.
fsck calls fsck.ext2 , but that fsck.ext2 was corrupt, and that /sbin/e2fsck is a link!

#strace fsck
and send us the output.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

shivsaCommented:
also u can try to download e2fsprogs  package from here. it has all the file system utilities.
http://e2fsprogs.sourceforge.net/

and then try to fsck filesystem, fsck and ex2fsck also may be part of this curruption.
jlevieCommented:
Since there's nmo evidence of memory errors and since fsck works as expected on other file systems, I'd say  that there's been serious damage to the file system on hda5. If, as you say, there's nothing on that file system that can't be replaced I'd just dismount it, make a new ext3 file system, and reload it from backups. Given what's happened it probably would be a good idea to do a bad block scan of the partition before running mke2fs.
Chris Harte2015 Top Expert (Most Article Points)Author Commented:
As requested, an strace output.
I reloaded e2fsprogs from the cd that came with the distrobution.

Cheers
Chris



[root@TheShed chris]# strace fsck
execve("/sbin/fsck", ["fsck"], [/* 49 vars */]) = 0
uname({sys="Linux", node="TheShed.Chris", ...}) = 0
brk(0)                                  = 0x804d820
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=64647, ...}) = 0
old_mmap(NULL, 64647, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
open("/lib/libext2fs.so.2", O_RDONLY)   = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260?\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=80744, ...}) = 0
old_mmap(NULL, 83824, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40026000
mprotect(0x4003a000, 1904, PROT_NONE)   = 0
old_mmap(0x4003a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x13000) = 0x4003a000
close(3)                                = 0
open("/lib/libcom_err.so.2", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\10"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=5140, ...}) = 0
old_mmap(NULL, 8256, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4003b000
mprotect(0x4003c000, 4160, PROT_NONE)   = 0
old_mmap(0x4003c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x4003c000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\203"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1275300, ...}) = 0
old_mmap(NULL, 1292000, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4003e000
mprotect(0x40170000, 38624, PROT_NONE)  = 0
old_mmap(0x40170000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x131000) = 0x40170000
old_mmap(0x40176000, 14048, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40176000
close(3)                                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4017a000
munmap(0x40016000, 64647)               = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000
write(1, "fsck 1.26 (3-Feb-2002)\n", 23fsck 1.26 (3-Feb-2002)
) = 23
brk(0)                                  = 0x804d820
brk(0x804d9a0)                          = 0x804d9a0
brk(0x804e000)                          = 0x804e000
open("/etc/fstab", O_RDONLY)            = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=563, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
read(3, "/dev/hdb1 / ext3 defaults 1 1\nno"..., 4096) = 563
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40017000, 4096)                = 0
write(2, "\nNo devices specified to be chec"..., 37
No devices specified to be checked!
) = 37
munmap(0x40016000, 4096)                = 0
_exit(8)                                = ?
[1]+  Done                    /etc/bastille-tmpdir-defense.sh 2700
[root@TheShed chris]#
Chris Harte2015 Top Expert (Most Article Points)Author Commented:
As an addition to the above.
I was using fsck V1.26.
I upgraded to V1.32
I now boot up with no problems, but when I try to run fsck I now get a library out of date error message, similar to this one:

[root@TheShed chris]# fsck -V
fsck 1.32 (09-Nov-2002)
Checking all file systems.
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 /dev/hdb1
Error: ext2fs library version out of date!
e2fsck 1.32 (09-Nov-2002)
        Using EXT2FS Library version 1.26, 3-Feb-2002
[/sbin/fsck.ext2 (1) -- /extra_usr] fsck.ext2 /dev/hda5
[/sbin/fsck.ext3 (2) -- /home] fsck.ext3 /dev/hdb6
Error: ext2fs library version out of date!
e2fsck 1.32 (09-Nov-2002)
        Using EXT2FS Library version 1.26, 3-Feb-2002
Error: ext2fs library version out of date!
e2fsck 1.32 (09-Nov-2002)
        Using EXT2FS Library version 1.26, 3-Feb-2002
[1]+  Done                    /etc/bastille-tmpdir-defense.sh 4030
[root@TheShed chris]#
jlevieCommented:
That sounds like you need to update the e2fsprogs package, which in turn will get you a later version of e2fsck.
shivsaCommented:
there is no problem here, it is just that u have 2 different kind of binaries.
please update the es2fsprog package with later version and get es2fck with the date (09-Nov-2002) while it is right now 3-Feb-2002.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Chris Harte2015 Top Expert (Most Article Points)Author Commented:
I use the mandrake package manager to update my binaries, that says I have V1.32 on my system.
(I did have to rebuild my rpm database before it would work though)
I also did a manual check of all the files that come with the e2fsprogs pacakge and they all have the same date.
Is there anything else I need to update?
Chris Harte2015 Top Expert (Most Article Points)Author Commented:
Yes there was.

libext2fs.so

fsck is now up and running.
All I have to do now is find out what was wrong with the partition in the first place.

Thanks everybody.

Chris
lungyingCommented:
Try to type following:

fsck LABEL=/



Hope that it can help!

Regards,
Peter
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.