2001-11-29 21:59:15

by M G Berberich

[permalink] [raw]
Subject: 2.4.16: hda9: attempt to access beyond end of device

Hello,

Partition boundary problem in 2.4.16 ?!

I just tried to make a mke2fs on my /dev/hda9 and mke2fs with kernel
2.4.16 and it failed with a partial write. /var/log/messages says:

kernel: 03:09: rw=0, want=289140, limit=289138
kernel: attempt to access beyond end of device

It works fine with 2.4.13 and it works with 2.4.16 if blocksize ist
set to 4k (fails with 1k blocks). Both kernel have reiserfs- and
ext3-support enabled and i2c- and lm_sensors-patches applied. mke2fs is
version 1.25 (20-Sep-2001), using EXT2FS Library 1.25. Partition table
is (fdisk -l /dev/hda):

Disk /dev/hda: 255 heads, 63 sectors, 5005 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 24 192748+ 83 Linux
/dev/hda2 25 48 192780 83 Linux
/dev/hda3 49 72 192780 83 Linux
/dev/hda4 73 1432 10924200 5 Extended
/dev/hda5 73 96 192748+ 82 Linux swap
/dev/hda6 97 120 192748+ 83 Linux
/dev/hda7 121 181 489951 83 Linux
/dev/hda8 182 667 3903763+ 83 Linux
/dev/hda9 668 703 289138+ 83 Linux
/dev/hda10 704 946 1951866 83 Linux
/dev/hda11 947 1432 3903763+ 83 Linux

Linux avaloon 2.4.16 SMP i686 unknown

Gnu C 2.95.2 Gnu make 3.79.1
binutils 2.9.5.0.37 util-linux 2.11m
mount 2.11m modutils 2.3.16
e2fsprogs 1.25 Linux C Library 2.1.3
ldd: version 1.9.11 Procps 2.0.6
Net-tools 1.54 Console-tools 0.2.3
Sh-utils 2.0

I'm not on linux-kernel mailinglist, so please mail me If you need
aditional information.

MfG
bmg

--
"Des is v?llig wurscht, was heut beschlos- | M G Berberich
sen wird: I bin sowieso dagegn!" | [email protected]
(SPD-Stadtrat Kurt Schindler; Regensburg) |


Attachments:
(No filename) (2.06 kB)
(No filename) (240.00 B)
Download all attachments

2001-11-29 22:13:09

by Kris Karas

[permalink] [raw]
Subject: Re: 2.4.16: hda9: attempt to access beyond end of device

On Thursday 29 November 2001 04:58 pm, M G Berberich wrote:
> Partition boundary problem in 2.4.16 ?!
> I just tried to make a mke2fs on my /dev/hda9 and mke2fs with kernel
> 2.4.16 and it failed with a partial write. /var/log/messages says:

I have a similar problem with /dev/sda9. Booting 2.4.11...16 results in a
partition not found error (as reported by fsck). Going back to 2.4.10ac10,
fdisk tells me that the partition ID for sda9 is 0x0000 which is corrupt, and
will be fixed on a write. I do the write, and sda9 is still invisible.

Delete and recreate the partition with the exact same cylinder values, and
the partition comes back, but is unmountable and un-fsck-able.

Examining raw hex data from other partitions, I find that the ext2 label
string (as set with the -L flag to mke2fs) occurs at offset 02160 (octal)
into the raw partition. But on /dev/sda9, it is occurring at 01160 instead -
off by one 512 byte sector. Foo. 2.4.16 has not made my day.

Kris

2001-11-30 08:43:13

by janne

[permalink] [raw]
Subject: Re: 2.4.16: hda9: attempt to access beyond end of device

> On Thursday 29 November 2001 04:58 pm, M G Berberich wrote:
> > Partition boundary problem in 2.4.16 ?!
> > I just tried to make a mke2fs on my /dev/hda9 and mke2fs with kernel
> > 2.4.16 and it failed with a partial write. /var/log/messages says:

i recently got some of these messages about "attempt to access beyond
end of device" when running badblocks on a partition, on 2.4.15-pre1.
i got two of them, and in the end badblocks said it found 2 bad blocks.
partitions were made with fdisk.
i don't know if it's normal or not, but bothers a little still. mke2fs
went through without errors and haven't noticed any corruption so far.


janne.

2001-11-30 20:08:42

by M G Berberich

[permalink] [raw]
Subject: Re: 2.4.16: hda9: attempt to access beyond end of device

Hello,

Am Thursday, den 29. November 2001 22:58:14 schrieb berberic:
> Partition boundary problem in 2.4.16 ?!
>
> I just tried to make a mke2fs on my /dev/hda9 and mke2fs with kernel
> 2.4.16 and it failed with a partial write. /var/log/messages says:
>
> kernel: 03:09: rw=0, want=289140, limit=289138
> kernel: attempt to access beyond end of device
>
> It works fine with 2.4.13 and it works with 2.4.16 if blocksize is
> set to 4k (fails with 1k blocks).

Now it failed with kernel 2.4.13 and mke2fs 1.25 on another partition,
but works with kernel 2.4.13 and mke2fs 1.18. 1k-blocks again.

I'm now longer sure if it is the kernel or mke2fs or both:(

MfG
bmg

--
"Des is v?llig wurscht, was heut beschlos- | M G Berberich
sen wird: I bin sowieso dagegn!" | [email protected]
(SPD-Stadtrat Kurt Schindler; Regensburg) |


Attachments:
(No filename) (857.00 B)
(No filename) (240.00 B)
Download all attachments

2001-11-30 22:23:08

by Andreas Dilger

[permalink] [raw]
Subject: Re: 2.4.16: hda9: attempt to access beyond end of device

On Nov 30, 2001 21:07 +0100, M G Berberich wrote:
> Am Thursday, den 29. November 2001 22:58:14 schrieb berberic:
> > Partition boundary problem in 2.4.16 ?!
> >
> > I just tried to make a mke2fs on my /dev/hda9 and mke2fs with kernel
> > 2.4.16 and it failed with a partial write. /var/log/messages says:
> >
> > kernel: 03:09: rw=0, want=289140, limit=289138
> > kernel: attempt to access beyond end of device
> >
> > It works fine with 2.4.13 and it works with 2.4.16 if blocksize is
> > set to 4k (fails with 1k blocks).
>
> Now it failed with kernel 2.4.13 and mke2fs 1.25 on another partition,
> but works with kernel 2.4.13 and mke2fs 1.18. 1k-blocks again.

To avoid issues with mke2fs, try "dd if=/dev/hda9 of=/dev/null bs=X"
where X=512,1k,2k,4k under both kernels and see if it still gives
errors. Also, mke2fs outputs the device size that it got via the
BLKGETSIZE ioctl, so that may be informative also. If you do an
strace of mke2fs, you should see that it is calling BLKGETSIZE (about
70 lines in, on my system). If that ioctl is failing, then it may be
a bug elsewhere in the mke2fs code (which is rarely used), although
it is unlikely.

The likely reason it is failing with 1kB blocks and not 4kB blocks is
that mke2fs will ignore up to 3kB at the end of the device if it is
not a full multiple of the block size (i.e. 4kB).

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/