Solved

fsck segmentation fault

Posted on 2003-11-11
12
2,980 Views
Last Modified: 2012-06-21
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
0
Comment
Question by:Chris Harte
  • 5
  • 3
  • 3
  • +1
12 Comments
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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.
0
 
LVL 16

Author Comment

by:Chris Harte
Comment Utility
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.
0
 
LVL 24

Expert Comment

by:shivsa
Comment Utility
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.
0
 
LVL 24

Expert Comment

by:shivsa
Comment Utility
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.
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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.
0
 
LVL 16

Author Comment

by:Chris Harte
Comment Utility
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]#
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 16

Author Comment

by:Chris Harte
Comment Utility
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]#
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
That sounds like you need to update the e2fsprogs package, which in turn will get you a later version of e2fsck.
0
 
LVL 24

Accepted Solution

by:
shivsa earned 125 total points
Comment Utility
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.

0
 
LVL 16

Author Comment

by:Chris Harte
Comment Utility
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?
0
 
LVL 16

Author Comment

by:Chris Harte
Comment Utility
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
0
 

Expert Comment

by:lungying
Comment Utility
Try to type following:

fsck LABEL=/



Hope that it can help!

Regards,
Peter
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now