2001-02-17 09:53:25

by Nate Eldredge

[permalink] [raw]
Subject: 2.4.1ac17 hang on mounting loopback fs

This one should be easy to track down, it's reproducible (2 for 2 so
far).

Kernel 2.4.1ac17 compiled by gcc 2.95.2.

Scenario: In single-user mode; only user process running is /bin/bash
(pid 1). Only fs'es mounted are / (ro), /spare (rw) (both ext2),
/proc.

# mount -t ext2 -o loop /spare/i486-linuxaout.img /spare/mnt
loop: enabling 8 loop devices

then it hangs. No ctrl-C etc.

I did Ctrl+ScrollLock. The entry for mount had the following (copied
manually):

mount D C7E33E78 5012 23 1 (NOTLB)
Call trace: c012f17a c0130167 c0151dc1 c01267af c0133102 c013331c
c0108e84 c0133e65 c0133c9c [maybe 3cac] c013401c c0108d43

Appropriate lines of System.map, in order:

c012f110 T __wait_on_buffer
c0130124 T bread
c0151d0c T ext2_read_super
c0126740 T kmalloc
c0132ffc t read_super
c01331d0 t get_sb_bdev
c0108e50 t error_code
c0133cec T do_mount
c0133c4c t copy_mount_options [in either case]
c0133fa0 T sys_mount
c0108d10 T system_call

The image file in question is ext2, about 20 MB, 1K blocksize. loop.o
is compiled as a module.

Incidentally this also happened under more normal circumstances, when
it tried to mount the fs from fstab. I haven't yet booted without
mounting that fs.

Btw, this machine has a FIC PA-2013 motherboard with VIA chipset, and
I have CONFIG_IDEDMA_PCI_AUTO enabled. But this doesn't seem like the
other trouble such machines were having.

I'm happy to provide more info, test patches, etc. Please CC me
directly if convenient as I can only read the list through a web
gateway, which is slow.

--

Nate Eldredge
[email protected]


2001-02-17 20:31:16

by Alan

[permalink] [raw]
Subject: Re: 2.4.1ac17 hang on mounting loopback fs

> # mount -t ext2 -o loop /spare/i486-linuxaout.img /spare/mnt
> loop: enabling 8 loop devices

Loop does not currently work in 2.4. It might partly work by luck but thats it.
This will change as and when the new loop patches go in. Until then if you need
loop use 2.2

2001-02-17 20:42:56

by Nate Eldredge

[permalink] [raw]
Subject: Re: 2.4.1ac17 hang on mounting loopback fs

Alan Cox writes:
> > # mount -t ext2 -o loop /spare/i486-linuxaout.img /spare/mnt
> > loop: enabling 8 loop devices
>
> Loop does not currently work in 2.4. It might partly work by luck
> but thats it. This will change as and when the new loop patches go
> in. Until then if you need loop use 2.2

I see. Thank you. I can live without it until then.

Btw, I applied Jens Axboe's loop-3 patch as suggested by Ville Herva.
It applied with some fuzz and offset. However, when I booted it, the
kernel oopsed when I tried to mount the first ordinary ext2 partition
(no loopback involved). I can post the oops if anyone cares, but I
presume that loop-3 and 2.4.1ac17 are just incompatible.

--

Nate Eldredge
[email protected]

2001-02-18 00:02:26

by Ville Herva

[permalink] [raw]
Subject: Re: 2.4.1ac17 hang on mounting loopback fs

On Sat, Feb 17, 2001 at 12:42:42PM -0800, you [Nate Eldredge] claimed:
> Alan Cox writes:
> > > # mount -t ext2 -o loop /spare/i486-linuxaout.img /spare/mnt
> > > loop: enabling 8 loop devices
> >
> > Loop does not currently work in 2.4. It might partly work by luck
> > but thats it. This will change as and when the new loop patches go
> > in. Until then if you need loop use 2.2
>
> I see. Thank you. I can live without it until then.
>
> Btw, I applied Jens Axboe's loop-3 patch as suggested by Ville Herva.
> It applied with some fuzz and offset. However, when I booted it, the
> kernel oopsed when I tried to mount the first ordinary ext2 partition
> (no loopback involved). I can post the oops if anyone cares, but I
> presume that loop-3 and 2.4.1ac17 are just incompatible.

I'm not sure if it'll apply any more cleanly (and work), but the newest is
loop-4 at

ftp://ftp.kernel.org/pub/linux/kernel/people/axboe/patches/2.4.2-pre1

(It should work with 2.4.1pre1, at least).


-- v --

[email protected]

2001-02-18 00:19:48

by Pete Toscano

[permalink] [raw]
Subject: Re: 2.4.1ac17 hang on mounting loopback fs

hmmm... I've been trying to play with GRUB on my 2.4.2-pre4 system. For
safety's sake, I wanted to make a bookdisk with mkbootdisk. After
reading this, I see now why mkbootdisk was locking in the D state with
the loop mounted... Would this also explain not being able to seek
forward while writing a floppy?

I was trying to make the GRUB boot disk by writing the stage 1 and 2
loaders to the floppy (as per the GRUB docs) with dd:

[root@bubba grub]# dd of=/dev/fd0 if=stage1 bs=512 count=1
1+0 records in
1+0 records out
[root@bubba grub]# dd of=/dev/fd0 if=stage2 bs=512 seek=1
dd: advancing past 1 blocks in output file `/dev/fd0': Permission denied

With 2.4.1, I get a different error message, but, AFAICT, the same
result.

pete


Alan Cox writes:
> > # mount -t ext2 -o loop /spare/i486-linuxaout.img /spare/mnt
> > loop: enabling 8 loop devices
>
> Loop does not currently work in 2.4. It might partly work by luck
> but thats it. This will change as and when the new loop patches go
> in. Until then if you need loop use 2.2


Attachments:
(No filename) (1.02 kB)
(No filename) (232.00 B)
Download all attachments

2001-02-18 03:29:22

by Thomas Molina

[permalink] [raw]
Subject: Re: 2.4.1ac17 hang on mounting loopback fs

On Sat, 17 Feb 2001, Pete Toscano wrote:

> reading this, I see now why mkbootdisk was locking in the D state with
> the loop mounted... Would this also explain not being able to seek
> forward while writing a floppy?
>
> I was trying to make the GRUB boot disk by writing the stage 1 and 2
> loaders to the floppy (as per the GRUB docs) with dd:
>
> [root@bubba grub]# dd of=/dev/fd0 if=stage1 bs=512 count=1
> 1+0 records in
> 1+0 records out
> [root@bubba grub]# dd of=/dev/fd0 if=stage2 bs=512 seek=1
> dd: advancing past 1 blocks in output file `/dev/fd0': Permission denied

Different problem. Add conv=notrunc to the dd command to make it work.

2001-02-18 05:15:48

by Pete Toscano

[permalink] [raw]
Subject: Re: 2.4.1ac17 hang on mounting loopback fs

Excellent! Thanks, that worked.

pete

On Sat, 17 Feb 2001, Thomas Molina wrote:

> On Sat, 17 Feb 2001, Pete Toscano wrote:
>
> > reading this, I see now why mkbootdisk was locking in the D state with
> > the loop mounted... Would this also explain not being able to seek
> > forward while writing a floppy?
> >
> > I was trying to make the GRUB boot disk by writing the stage 1 and 2
> > loaders to the floppy (as per the GRUB docs) with dd:
> >
> > [root@bubba grub]# dd of=/dev/fd0 if=stage1 bs=512 count=1
> > 1+0 records in
> > 1+0 records out
> > [root@bubba grub]# dd of=/dev/fd0 if=stage2 bs=512 seek=1
> > dd: advancing past 1 blocks in output file `/dev/fd0': Permission denied
>
> Different problem. Add conv=notrunc to the dd command to make it work.
>


Attachments:
(No filename) (771.00 B)
(No filename) (232.00 B)
Download all attachments