Chris Harte
asked on
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
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
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.
ASKER
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.
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.
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.
fsck calls fsck.ext2 , but that fsck.ext2 was corrupt, and that /sbin/e2fsck is a link!
#strace fsck
and send us the output.
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.
http://e2fsprogs.sourceforge.net/
and then try to fsck filesystem, fsck and ex2fsck also may be part of this curruption.
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.
ASKER
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-defen se.sh 2700
[root@TheShed chris]#
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",
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"
read(3, "\177ELF\1\1\1\0\0\0\0\0\0
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
read(3, "\177ELF\1\1\1\0\0\0\0\0\0
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
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_
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
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,
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,
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-defen
[root@TheShed chris]#
ASKER
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-defen se.sh 4030
[root@TheShed chris]#
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-defen
[root@TheShed chris]#
That sounds like you need to update the e2fsprogs package, which in turn will get you a later version of e2fsck.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
(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?
ASKER
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
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
Try to type following:
fsck LABEL=/
Hope that it can help!
Regards,
Peter
fsck LABEL=/
Hope that it can help!
Regards,
Peter