* attempt to access beyond end of device
@ 2000-12-07 15:56 Jan Niehusmann
2000-12-07 16:34 ` Andries Brouwer
0 siblings, 1 reply; 6+ messages in thread
From: Jan Niehusmann @ 2000-12-07 15:56 UTC (permalink / raw)
To: linux-kernel
ll_rw_blk.c: generic_make_request() contains the following code:
if (maxsector < count || maxsector - count < sector) {
bh->b_state &= (1 << BH_Lock) | (1 << BH_Mapped);
if (blk_size[major][MINOR(bh->b_rdev)]) {
/* This may well happen - the kernel calls bread()
without checking the size of the device, e.g.,
when mounting a device. */
printk(KERN_INFO
"attempt to access beyond end of device\n");
printk(KERN_INFO "%s: rw=%d, want=%d, limit=%d\n",
kdevname(bh->b_rdev), rw,
(sector + count)>>1,
blk_size[major][MINOR(bh->b_rdev)]);
}
bh->b_end_io(bh, 0);
return;
}
That means that if blk_size[major][MINOR(bh->b_rdev)] == 0, the request
is canceled but no message is printed. Shouldn't there be a warning message?
Jan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: attempt to access beyond end of device
2000-12-07 15:56 attempt to access beyond end of device Jan Niehusmann
@ 2000-12-07 16:34 ` Andries Brouwer
2000-12-07 17:10 ` John Kennedy
0 siblings, 1 reply; 6+ messages in thread
From: Andries Brouwer @ 2000-12-07 16:34 UTC (permalink / raw)
To: Jan Niehusmann; +Cc: linux-kernel
On Thu, Dec 07, 2000 at 04:56:59PM +0100, Jan Niehusmann wrote:
> ll_rw_blk.c: generic_make_request() contains the following code:
>
> if (maxsector < count || maxsector - count < sector) {
> bh->b_state &= (1 << BH_Lock) | (1 << BH_Mapped);
> if (blk_size[major][MINOR(bh->b_rdev)]) {
>
> /* This may well happen - the kernel calls bread()
> without checking the size of the device, e.g.,
> when mounting a device. */
> printk(KERN_INFO
> "attempt to access beyond end of device\n");
> printk(KERN_INFO "%s: rw=%d, want=%d, limit=%d\n",
> kdevname(bh->b_rdev), rw,
> (sector + count)>>1,
> blk_size[major][MINOR(bh->b_rdev)]);
> }
> bh->b_end_io(bh, 0);
> return;
> }
>
>
> That means that if blk_size[major][MINOR(bh->b_rdev)] == 0, the request
> is canceled but no message is printed. Shouldn't there be a warning message?
Maybe that code fragment is mine. If so, then at some point
in time I decided that the answer to your question is no.
Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: attempt to access beyond end of device
2000-12-07 16:34 ` Andries Brouwer
@ 2000-12-07 17:10 ` John Kennedy
0 siblings, 0 replies; 6+ messages in thread
From: John Kennedy @ 2000-12-07 17:10 UTC (permalink / raw)
To: linux-kernel
On Thu, Dec 07, 2000 at 05:34:28PM +0100, Andries Brouwer wrote:
> On Thu, Dec 07, 2000 at 04:56:59PM +0100, Jan Niehusmann wrote:
> > That means that if blk_size[major][MINOR(bh->b_rdev)] == 0, the request
> > is canceled but no message is printed. Shouldn't there be a warning message?
>
> Maybe that code fragment is mine. If so, then at some point
> in time I decided that the answer to your question is no.
As a potential real-world case (but possibly unrelated), I had an
interesting situation crop-up while I was playing with the loopback
filesystems.
If you just use the program-tools, you end up with a situation like:
losetup <blah> [close all] dd <blah> [close all] losetup -d [blah]
In my case, I was making a standalone program that did it all in one
program and I messed up in the ordering of the close() and the LOOP_CLR_FD.
I'm pretty sure that (with my small 10K test dataset) the I/O between
the loopback device and the looped file was never hitting the disk.
If I LOOP_CLR_FD before I closed, I ended up with bad data in the looped
file and kernel errors syslogged:
kernel: attempt to access beyond end of device
kernel: 07:00: rw=1, want=1, limit=0
kernel: dev 07:00 blksize=0 blocknr=0 sector=0 size=1024 count=1
I tended to get 10 of those, one for each of the 10 1K blocks in
my test dataset.
Doing the close() then the LOOP_CLR_FD got rid of the errors.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: attempt to access beyond end of device
@ 2002-12-06 5:21 Justin Pryzby
0 siblings, 0 replies; 6+ messages in thread
From: Justin Pryzby @ 2002-12-06 5:21 UTC (permalink / raw)
To: linux-kernel
Before anyone asks, no my disk is not full:
pryzbyj@perseus:/usr/src/penguin$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 3.7G 1.1G 2.5G 31% /
/dev/hda3 19G 349M 18G 2% /home
/dev/hda4 14G 1.5G 12G 12% /usr/src
Sizes shouldn't have changed by more than 01% since I got the error.
Interesting: rerunning `updatedb --localuser=nobody 2>/dev/null` fails to
reproduce the error.
Is the error possibly the result of filesystem corruption? I imagine that
each directory has a pointer to the disk location of each of its member
files; if that pointer were larger than the disk size, would this error
be the result?
If this is the result of filesystem corruption, it is not necessarily a
problem with ext3 or some othersuch, as I have done some *hard* shutdowns
recently (read: control-alt-backspace on a sis motherboard).
Justin
^ permalink raw reply [flat|nested] 6+ messages in thread
* attempt to access beyond end of device
@ 2002-12-05 18:54 Justin Pryzby
0 siblings, 0 replies; 6+ messages in thread
From: Justin Pryzby @ 2002-12-05 18:54 UTC (permalink / raw)
To: linux-kernel
2.4.20-ac1, Debian testing.
While running `updatedb --localuser=nobody 2>/dev/null`, I receive several pages of the following message:
Dec 5 13:43:25 perseus kernel: Directory sread (sector 0x18) failed
Dec 5 13:43:25 perseus kernel: attempt to access beyond end of device
Dec 5 13:43:25 perseus kernel: 02:00: rw=0, want=12, limit=4
Some of the numbers are different sometimes. I can post my syslog if anyone is interested, but I'm not even sure if this is a kernel issue.
Disk configuration is as follows:
pryzbyj@perseus:~$ mount
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
/dev/hda3 on /home type ext3 (rw)
/dev/hda4 on /usr/src type ext3 (rw)
Justin
^ permalink raw reply [flat|nested] 6+ messages in thread
* attempt to access beyond end of device
@ 2000-11-24 9:02 Janek
0 siblings, 0 replies; 6+ messages in thread
From: Janek @ 2000-11-24 9:02 UTC (permalink / raw)
To: linux-kernel
Hi,
I have dual P III 665 with 512 MB ram and IBM ServeRAID controller.
It has been running for 40 days without problems but yesterday during
system backup it gave me the following error to syslog:
kernel: attempt to access beyond end of device
kernel: 08:03: rw=0, want=631625768, limit=7912989
kernel: dev 08:03 blksize=4096 blocknr=1768519177 sector=1263251528 size=4096 count=1
with different want numbers.
After a while thise lines changed to :
kernel: EXT2-fs error (device sd(8,3)): ext2_free_blocks: Freeing blocks not in datazone - block = 1869575229, count = 1
After backup nothing else was printed. Machine did not crash or anything.
Only MySQL server hanged...
Is this serious ? What chould I do ?
Also I'm using RedHat 6.2 with kernel 2.2.16. MySQL 3.22.32
Thanks,
Janek Hiis
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-12-06 5:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-07 15:56 attempt to access beyond end of device Jan Niehusmann
2000-12-07 16:34 ` Andries Brouwer
2000-12-07 17:10 ` John Kennedy
-- strict thread matches above, loose matches on Subject: below --
2002-12-06 5:21 Justin Pryzby
2002-12-05 18:54 Justin Pryzby
2000-11-24 9:02 Janek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®