linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: 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 16:23:47 +0100	[thread overview]
Message-ID: <3EAFEA83.9030301@superbug.demon.co.uk> (raw)
In-Reply-To: <1051704438.19573.20.camel@dhcp22.swansea.linux.org.uk>

Alan Cox wrote:

>On Mer, 2003-04-30 at 13:10, Denis Vlasenko wrote:
>  
>
>>>Having the kernel not use 100% CPU?
>>>      
>>>
>>I suspect IDE error recovery path was never audited for that
>>    
>>
>
>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.
printf("About to seek\n");
result seek();
printf("Seek done.\n");
BigLoop:
printf("About to read\n");
result = read(fd,buffer, x_bytes);
printf("read done.\n");
If (result != x_types) assert(0);
else loop back to BigLoop:

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.

To me, this is somewhat strange behaviour, a bug even.

Is there some other user space parts between the kernel and the "read 
done" message that I don't know about?

So, from the logs, it looks like the kernel tries to keep reading the 
DVD, but it is not the user application requesting that!
Is there some sort of caching code between read() and the kernel, and if 
so, how do I turn it off.

Cheers
James



  reply	other threads:[~2003-04-30 15:11 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 [this message]
2003-04-30 14:32           ` Alan Cox
2003-04-30 16:46           ` Elladan
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=3EAFEA83.9030301@superbug.demon.co.uk \
    --to=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;
as well as URLs for NNTP newsgroup(s).