Subject: Segmentation faults from fsck

From: "Neil A. Carson" <[email-masked]>
Date: Sun, 21 Feb 1999 16:46:49 -0800

Hi,

Trying to fsck my hard disc, with both the Red Hat fsck and Jim's Debian
fsck, fsck itself segv's, ie:
	fsck /dev/hda
doesn't do a whole lot, gives a segmentation fault and dies.

Has anyone seen this, and are there any ideas out there as to how to fix
it? The machine locked up during some heavy disc thrashing, and I can't
restore the filesystem properly now :-(

	Thanks,

	Neil

-- 
Neil A. Carson
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: "Neil A. Carson" <[email-masked]>
Date: Sun, 21 Feb 1999 16:53:38 -0800

Well,

I've found if I use e2fsck rather than just fsck, I get away with it...
But then the system stiffs during the disc check :-( The keeps on
blinking fine, and the disc light stays on---doing nothing. If I then
press a key on the keyboard, the cursor goes solid too.

Time to start getting into the guts of the code and working out what's
what---if the machine will stay up long enough to build the kernel
(maybe I'll refrain from using a disc and just stick with the
network---this seems more stable). Any hints on how to start
fishing---do we have an in-kernel debugger or remote gdb?

	:-(

	Neil

---

From: Phil Norman <[email-masked]>
Date: Mon, 22 Feb 1999 10:01:22 +0000

> restore the filesystem properly now :-(

Is /dev/hda itself an ext2 filesystem?  Most systems use the hda1, hda2 etc
partitions, and you'll need to use the partition name rather than the
disc name as what you give to fsck.  If you can't find out which partition
you need to fsck from `mount` or `cat /etc/fstab`, partition names will
increase from hda1 if you have a disc with a DOS partition table, and
they'll start at hda3 if your disc has the extra linux partition table
stuck after a filecore partition.

Cheers,
Phil

---

From: "Neil A. Carson" <[email-masked]>
Date: Mon, 22 Feb 1999 10:04:40 +0000 (GMT)

> stuck after a filecore partition.

That's not the problem; I simply newfs'd the whole disc rather than
bothering with any partitions (my ext2f reader in the bootloader won't
recognise partitions yet). And I won't let a filecore FS anywhere near it
:-)

	Neil

---

From: Philip Blundell <[email-masked]>
Date: Mon, 22 Feb 1999 10:47:36 +0000

>press a key on the keyboard, the cursor goes solid too.

Cripes. :-(

It could be that the code to handle ISA irqs still isn't quite right.  That's 
been banged on rather less than most things and it's one of the few bits that 
is different between systems.  I'll go and stare at the source some more and 
see if I can spot anything wrong.

I take it this means you managed to solve your earlier problem (wrong IRQ 
settings) though.  What was the solution?

p.

---

From: Russell King <[email-masked]>
Date: Mon, 22 Feb 1999 12:37:43 +0000 (GMT)

> restore the filesystem properly now :-(

I'm not too surprised that it doesn't work.  /dev/hda is the whole
drive, not a specific partition, and hence does not contain a value
fsck-able filesystem.

--
Russell King ([email-masked])

---

From: "Neil A. Carson" <[email-masked]>
Date: Mon, 22 Feb 1999 12:42:44 -0800

> settings) though.  What was the solution?

Not sure---I just moved the hard disc to the other channel ;) It'll do.

	Neil

---

From: "Neil A. Carson" <[email-masked]>
Date: Mon, 22 Feb 1999 12:44:04 -0800

> drive, not a specific partition, and hence does not contain a value

But it did; I mke2fs'd the entire device, to avoid any partitioning
problems. Given the rest of Linux, and s2fsck was happy with it, why
wasn't fsck? In any case, it shouldn't segv... If I generate a patch,
can you feed backt hings like that or do I need to contact the fsck
author directly?

	Neil