Solved

fsck segmentation fault

Posted on 2003-11-11
12
3,075 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
  • +1
12 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 9723452
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 17

Author Comment

by:Chris Harte
ID: 9724270
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
ID: 9724744
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 24

Expert Comment

by:shivsa
ID: 9724825
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
ID: 9725089
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 17

Author Comment

by:Chris Harte
ID: 9726842
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
 
LVL 17

Author Comment

by:Chris Harte
ID: 9727125
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
ID: 9727209
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
ID: 9729048
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 17

Author Comment

by:Chris Harte
ID: 9731032
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 17

Author Comment

by:Chris Harte
ID: 9731617
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
ID: 9739467
Try to type following:

fsck LABEL=/



Hope that it can help!

Regards,
Peter
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

726 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