public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Elladan <elladan@eskimo.com>
To: James Courtier-Dutton <James@superbug.demon.co.uk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	vda@port.imtp.ilyichevsk.odessa.ua,
	Nick Piggin <piggin@cyberone.com.au>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Bug in linux kernel when playing DVDs.
Date: Wed, 30 Apr 2003 09:46:41 -0700	[thread overview]
Message-ID: <20030430164641.GA8731@eskimo.com> (raw)
In-Reply-To: <3EAFEA83.9030301@superbug.demon.co.uk>

On Wed, Apr 30, 2003 at 04:23:47PM +0100, James Courtier-Dutton wrote:
> Alan Cox wrote:
> >
> >NOTABUG
> >
> >User space keeps asking it to read so it keeps using CPU, fix the user
> >space
> 
> The application does an initial seek() command, which succeeds.
> It then just does read() commands for then on.
> For bug tracking, I have put printf statements in my application.
> I.e.
>
> [...]
> 
> When an error occurs on the DVD, "read done" message is never printed on 
> the console and all applications fail to respond to user input. This is 
> why I thought that the kernel hogs CPU 100% and the application never 
> receives the error message.
> If I force a different error "tray open", by using a pin in the manual 
> eject hole on the front of the dvd rom device, I then see the "read 
> done" message and everything comes back to life.

Are you sure it never returns, ever?

The behavior most people seem to see here 90% of the time seems to be
that the IDE layer retries the request a few dozen times before
returning an error result.  This usually takes 1-5 minutes.

So, does it return if you, say, go to lunch and then come back?

Of course, the other 10% of the time, things do seem to become
completely broken.  I've certainly observed this sort of behavior
before.

Not to mention, blocking for 1-5 minutes even on a CD-ROM read is
broken, and is certainly very unwanted for the task of playing a DVD.  I
think there needs to be a documented call to tell the kernel that the
application prefers to get I/O errors immediately instead of retries,
and it should always use a lot fewer retries on removable devices where
damaged media is common.

The other bug here is that the IDE layer seems uninterruptible in
software while it's doing this.  The tasks go into uninterruptible sleep
for up to 5 minutes at a time (sometimes forever), and can't be stopped
except by forcing a hardware exception eg. with eject.  You really need
to be able to kill a task and interrupt the file operation somehow when
it's in some sort of long-term CD error recovery situation.

-J

  parent reply	other threads:[~2003-04-30 16:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-27 10:47 Bug in linux kernel when playing DVDs James Courtier-Dutton
2003-04-29  5:46 ` Denis Vlasenko
2003-04-29  6:56   ` Nick Piggin
2003-04-30 12:10     ` Denis Vlasenko
2003-04-30 12:07       ` Alan Cox
2003-04-30 15:23         ` James Courtier-Dutton
2003-04-30 14:32           ` Alan Cox
2003-04-30 16:46           ` Elladan [this message]
2003-04-30 17:16             ` Jan Knutar
2003-04-29 11:11   ` James Courtier-Dutton
2003-04-30 12:08     ` Denis Vlasenko
2003-04-30 12:29       ` Richard B. Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030430164641.GA8731@eskimo.com \
    --to=elladan@eskimo.com \
    --cc=James@superbug.demon.co.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=piggin@cyberone.com.au \
    --cc=vda@port.imtp.ilyichevsk.odessa.ua \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox