linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "attempt to access beyond end of device" on DVD
@ 2012-12-10  0:17 Jacek Poplawski
  2012-12-12  0:41 ` Bruno Prémont
  0 siblings, 1 reply; 9+ messages in thread
From: Jacek Poplawski @ 2012-12-10  0:17 UTC (permalink / raw)
  To: linux-kernel

hello,

few years ago I noticed annoying bug on Linux, when I was copying
photos from old DVDs I realized that not all files were copied
correctly, there were errors on last files on DVD, you could say "well
that happens, DVD are faulty", but that's not the real issue

when the problem appears it happens on each DVD I am trying to copy,
last files on each disk have errors....

...until I reboot Linux, then there are no errors at all and full DVD
is copied correctly.

Now I needed some files from DVDs and I realized the problem still
exists. After at least three years. I verified that reboot helps and I
also noticed the problem doesn't exist on Windows 7.

And looks like I wasn't only one who found this:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/404472

Problem was reported in 2009 on 2.6.28 and closed in 2012. But I
noticed it in last days.

my system is:

Linux version 3.6.8-1-ARCH (tobias@T-POWA-LX) (gcc version 4.7.2 (GCC)
) #1 SMP PREEMPT Mon Nov 26 22:10:40 CET 2012

dmesg:

[ 4017.384169] attempt to access beyond end of device
[ 4017.384171] sr0: rw=0, want=8511124, limit=8433216
[ 4017.384174] attempt to access beyond end of device
[ 4017.384175] sr0: rw=0, want=8510876, limit=8433216

I suspect that people just stopped using CDs and DVDs and that's why
nobody was looking on this problem, or maybe the first though was
always "that DVD is broken, trash it".

Is there more information I could give you about this issue? Or could
you point me to any ways I could debug it? It's fully reproducible on
my system.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: "attempt to access beyond end of device" on DVD
  2012-12-10  0:17 "attempt to access beyond end of device" on DVD Jacek Poplawski
@ 2012-12-12  0:41 ` Bruno Prémont
  2012-12-12  0:47   ` Jacek Poplawski
  0 siblings, 1 reply; 9+ messages in thread
From: Bruno Prémont @ 2012-12-12  0:41 UTC (permalink / raw)
  To: Jacek Poplawski; +Cc: linux-kernel

Hello,

On Mon, 10 December 2012 Jacek Poplawski <jacekpoplawski@gmail.com> wrote:
> few years ago I noticed annoying bug on Linux, when I was copying
> photos from old DVDs I realized that not all files were copied
> correctly, there were errors on last files on DVD, you could say "well
> that happens, DVD are faulty", but that's not the real issue
> 
> when the problem appears it happens on each DVD I am trying to copy,
> last files on each disk have errors....
> 
> ...until I reboot Linux, then there are no errors at all and full DVD
> is copied correctly.
> 
> Now I needed some files from DVDs and I realized the problem still
> exists. After at least three years. I verified that reboot helps and I
> also noticed the problem doesn't exist on Windows 7.
> 
> And looks like I wasn't only one who found this:
> 
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/404472
> 
> Problem was reported in 2009 on 2.6.28 and closed in 2012. But I
> noticed it in last days.
> 
> my system is:
> 
> Linux version 3.6.8-1-ARCH (tobias@T-POWA-LX) (gcc version 4.7.2 (GCC)
> ) #1 SMP PREEMPT Mon Nov 26 22:10:40 CET 2012
> 
> dmesg:
> 
> [ 4017.384169] attempt to access beyond end of device
> [ 4017.384171] sr0: rw=0, want=8511124, limit=8433216
> [ 4017.384174] attempt to access beyond end of device
> [ 4017.384175] sr0: rw=0, want=8510876, limit=8433216
> 
> I suspect that people just stopped using CDs and DVDs and that's why
> nobody was looking on this problem, or maybe the first though was
> always "that DVD is broken, trash it".
> 
> Is there more information I could give you about this issue? Or could
> you point me to any ways I could debug it? It's fully reproducible on
> my system.

Hm, could it be related to some kind of read-ahead? I vaguely remember
seeing mails about read-ahead and/or end-of-device. Could this be somehow
related?

See:
- https://lkml.org/lkml/2012/12/3/497
- https://lkml.org/lkml/2012/12/3/510

This applies to 3.7-rc but according to the thread it might still
have some interesting things that could be related to what you are seeing.

When it happens, does ejecting and re-inserting the CDs/DVDs also fix the
problem or is a full reboot mandatory?

Bruno

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: "attempt to access beyond end of device" on DVD
  2012-12-12  0:41 ` Bruno Prémont
@ 2012-12-12  0:47   ` Jacek Poplawski
  2012-12-12  1:03     ` Bruno Prémont
  0 siblings, 1 reply; 9+ messages in thread
From: Jacek Poplawski @ 2012-12-12  0:47 UTC (permalink / raw)
  To: Bruno Prémont; +Cc: linux-kernel

On 12/12/12, Bruno Prémont <bonbons@linux-vserver.org> wrote:
> When it happens, does ejecting and re-inserting the CDs/DVDs also fix the
> problem or is a full reboot mandatory?

The re-inserting doesn't fix the problem.
Even worse. When it starts - each next DVD is also affected (until reboot).

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: "attempt to access beyond end of device" on DVD
  2012-12-12  0:47   ` Jacek Poplawski
@ 2012-12-12  1:03     ` Bruno Prémont
  2012-12-12  1:38       ` Jacek Poplawski
  0 siblings, 1 reply; 9+ messages in thread
From: Bruno Prémont @ 2012-12-12  1:03 UTC (permalink / raw)
  To: Jacek Poplawski; +Cc: linux-kernel

On Wed, 12 December 2012 Jacek Poplawski wrote:
> On 12/12/12, Bruno Prémont wrote:
> > When it happens, does ejecting and re-inserting the CDs/DVDs also fix the
> > problem or is a full reboot mandatory?
> 
> The re-inserting doesn't fix the problem.
> Even worse. When it starts - each next DVD is also affected (until reboot).

Did you check if unbinding drivers or unloading their modules has the
same effect as rebooting? That might help narrowing the area of code to
look at.

Does it also affect loop-mounted ISOs or is it specific to the CD/DVD
drive?
As a related test, does it affect CD/DVD drives connected through a
different interface? (USB storage, ATA over Ethernet, iSCSI, ...)

While at it, please tell us how your CD/DVD drive is connected and which
controller it's connected to (relevant dmesg parts).

Bruno

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: "attempt to access beyond end of device" on DVD
  2012-12-12  1:03     ` Bruno Prémont
@ 2012-12-12  1:38       ` Jacek Poplawski
  2012-12-12  2:40         ` Jacek Poplawski
  0 siblings, 1 reply; 9+ messages in thread
From: Jacek Poplawski @ 2012-12-12  1:38 UTC (permalink / raw)
  To: Bruno Prémont; +Cc: linux-kernel

> Did you check if unbinding drivers or unloading their modules has the
> same effect as rebooting? That might help narrowing the area of code to
> look at.

You were right.
I unmounted the DVD, then removed module sr_mod, reloaded it, inserted
DVD again and copied missing files, now they are OK.


> While at it, please tell us how your CD/DVD drive is connected and which
> controller it's connected to (relevant dmesg parts).

[    0.893465] ata5.00: ATAPI: Optiarc DVD RW AD-7203S, 1.05, max UDMA/100
[    0.906796] ata5.00: configured for UDMA/100
(...)
[    1.232096] scsi 4:0:0:0: CD-ROM            Optiarc  DVD RW
AD-7203S  1.05 PQ: 0 ANSI: 5
(...)
[  897.871546] sr0: scsi3-mmc drive: 125x/125x writer dvd-ram cd/rw
xa/form2 cdda tray
[  897.871726] sr 4:0:0:0: Attached scsi CD-ROM sr0

I don't have other devices to test (and haven't tried loop device).

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: "attempt to access beyond end of device" on DVD
  2012-12-12  1:38       ` Jacek Poplawski
@ 2012-12-12  2:40         ` Jacek Poplawski
  2012-12-12 20:04           ` Bruno Prémont
  0 siblings, 1 reply; 9+ messages in thread
From: Jacek Poplawski @ 2012-12-12  2:40 UTC (permalink / raw)
  To: Bruno Prémont; +Cc: linux-kernel

OK, I was wrong previously.

I don't need to reload sr_mod, I only need to remount DVD.

The reason I was wrong is I was suspecting that DVD remounts itself
after eject, but looks like it doesn't. Also it means that the problem
is different than 3 years ago, because I am sure I was remounting DVD
by hand and now I use some automount feature of Arch Linux / GNOME3.






On 12/12/12, Jacek Poplawski <jacekpoplawski@gmail.com> wrote:
>> Did you check if unbinding drivers or unloading their modules has the
>> same effect as rebooting? That might help narrowing the area of code to
>> look at.
>
> You were right.
> I unmounted the DVD, then removed module sr_mod, reloaded it, inserted
> DVD again and copied missing files, now they are OK.
>
>
>> While at it, please tell us how your CD/DVD drive is connected and which
>> controller it's connected to (relevant dmesg parts).
>
> [    0.893465] ata5.00: ATAPI: Optiarc DVD RW AD-7203S, 1.05, max UDMA/100
> [    0.906796] ata5.00: configured for UDMA/100
> (...)
> [    1.232096] scsi 4:0:0:0: CD-ROM            Optiarc  DVD RW
> AD-7203S  1.05 PQ: 0 ANSI: 5
> (...)
> [  897.871546] sr0: scsi3-mmc drive: 125x/125x writer dvd-ram cd/rw
> xa/form2 cdda tray
> [  897.871726] sr 4:0:0:0: Attached scsi CD-ROM sr0
>
> I don't have other devices to test (and haven't tried loop device).
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: "attempt to access beyond end of device" on DVD
  2012-12-12  2:40         ` Jacek Poplawski
@ 2012-12-12 20:04           ` Bruno Prémont
  2012-12-12 20:23             ` Jacek Poplawski
  0 siblings, 1 reply; 9+ messages in thread
From: Bruno Prémont @ 2012-12-12 20:04 UTC (permalink / raw)
  To: Jacek Poplawski; +Cc: linux-kernel, linux-fsdevel

On Wed, 12 December 2012 Jacek Poplawski <jacekpoplawski@gmail.com> wrote:
> OK, I was wrong previously.
> 
> I don't need to reload sr_mod, I only need to remount DVD.
> 
> The reason I was wrong is I was suspecting that DVD remounts itself
> after eject, but looks like it doesn't. Also it means that the problem
> is different than 3 years ago, because I am sure I was remounting DVD
> by hand and now I use some automount feature of Arch Linux / GNOME3.

What kind of filesystem do you have on your CD/DVDs?

[CCing linux-fsdevel as it seems like it may be a isofs or udf issue]

Bruno

> On 12/12/12, Jacek Poplawski <jacekpoplawski@gmail.com> wrote:
> >> Did you check if unbinding drivers or unloading their modules has the
> >> same effect as rebooting? That might help narrowing the area of code to
> >> look at.
> >
> > You were right.
> > I unmounted the DVD, then removed module sr_mod, reloaded it, inserted
> > DVD again and copied missing files, now they are OK.
> >
> >
> >> While at it, please tell us how your CD/DVD drive is connected and which
> >> controller it's connected to (relevant dmesg parts).
> >
> > [    0.893465] ata5.00: ATAPI: Optiarc DVD RW AD-7203S, 1.05, max UDMA/100
> > [    0.906796] ata5.00: configured for UDMA/100
> > (...)
> > [    1.232096] scsi 4:0:0:0: CD-ROM            Optiarc  DVD RW
> > AD-7203S  1.05 PQ: 0 ANSI: 5
> > (...)
> > [  897.871546] sr0: scsi3-mmc drive: 125x/125x writer dvd-ram cd/rw
> > xa/form2 cdda tray
> > [  897.871726] sr 4:0:0:0: Attached scsi CD-ROM sr0
> >
> > I don't have other devices to test (and haven't tried loop device).
> >

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: "attempt to access beyond end of device" on DVD
  2012-12-12 20:04           ` Bruno Prémont
@ 2012-12-12 20:23             ` Jacek Poplawski
  2012-12-12 20:39               ` Bruno Prémont
  0 siblings, 1 reply; 9+ messages in thread
From: Jacek Poplawski @ 2012-12-12 20:23 UTC (permalink / raw)
  To: Bruno Prémont; +Cc: linux-kernel, linux-fsdevel

On 12/12/12, Bruno Prémont <bonbons@linux-vserver.org> wrote:
> On Wed, 12 December 2012 Jacek Poplawski <jacekpoplawski@gmail.com> wrote:
>> OK, I was wrong previously.
>>
>> I don't need to reload sr_mod, I only need to remount DVD.
>>
>> The reason I was wrong is I was suspecting that DVD remounts itself
>> after eject, but looks like it doesn't. Also it means that the problem
>> is different than 3 years ago, because I am sure I was remounting DVD
>> by hand and now I use some automount feature of Arch Linux / GNOME3.
>
> What kind of filesystem do you have on your CD/DVDs?

I backup files with k3b with default settings, so it is iso9660.

However I don't fully understand how this automount works, I am afraid
this problem it may be related to this mechanism. When I insert first
DVD it's mounted and when I remove DVD and put another one it's still
mounted as before, so maybe driver is confused and still thinks the
size of the DVD is like the first one.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: "attempt to access beyond end of device" on DVD
  2012-12-12 20:23             ` Jacek Poplawski
@ 2012-12-12 20:39               ` Bruno Prémont
  0 siblings, 0 replies; 9+ messages in thread
From: Bruno Prémont @ 2012-12-12 20:39 UTC (permalink / raw)
  To: Jacek Poplawski; +Cc: linux-kernel, linux-fsdevel

On Wed, 12 December 2012 Jacek Poplawski wrote:
> On 12/12/12, Bruno Prémont wrote:
> > On Wed, 12 December 2012 Jacek Poplawski wrote:
> >> OK, I was wrong previously.
> >>
> >> I don't need to reload sr_mod, I only need to remount DVD.
> >>
> >> The reason I was wrong is I was suspecting that DVD remounts itself
> >> after eject, but looks like it doesn't. Also it means that the problem
> >> is different than 3 years ago, because I am sure I was remounting DVD
> >> by hand and now I use some automount feature of Arch Linux / GNOME3.
> >
> > What kind of filesystem do you have on your CD/DVDs?
> 
> I backup files with k3b with default settings, so it is iso9660.
> 
> However I don't fully understand how this automount works, I am afraid
> this problem it may be related to this mechanism. When I insert first
> DVD it's mounted and when I remove DVD and put another one it's still
> mounted as before, so maybe driver is confused and still thinks the
> size of the DVD is like the first one.

Usually you have to unmount CD/DVD to be able to eject it (otherwise tray
is locked).
I never used automount myself so I can't tell, tough I would expect it to
catch "eject" request, unmount and then eject the disc.

Bruno

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-12-12 20:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-10  0:17 "attempt to access beyond end of device" on DVD Jacek Poplawski
2012-12-12  0:41 ` Bruno Prémont
2012-12-12  0:47   ` Jacek Poplawski
2012-12-12  1:03     ` Bruno Prémont
2012-12-12  1:38       ` Jacek Poplawski
2012-12-12  2:40         ` Jacek Poplawski
2012-12-12 20:04           ` Bruno Prémont
2012-12-12 20:23             ` Jacek Poplawski
2012-12-12 20:39               ` Bruno Prémont

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).