Bug 139243 - HAL tries to read the disk too often, stops eject
HAL tries to read the disk too often, stops eject
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
3
All Linux
medium Severity high
: ---
: ---
Assigned To: John (J5) Palmieri
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-14 07:25 EST by Alan Cox
Modified: 2013-03-13 00:46 EDT (History)
5 users (show)

See Also:
Fixed In Version: FC5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-22 14:49:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alan Cox 2004-11-14 07:25:58 EST
Description of problem:

I put a scratched DVD into a fairly generic slot loading drive.  After
I tried to mount it which failed I couldn't eject it because HAL kept
trying to re-read it every few seconds and never let the drive stop. A
normal user would have been forced to reboot to get out of this situation.

How reproducible:
100%

Steps to Reproduce:
1. Feed very broken DVD or CD to drive
2. Observe
  
Actual results:
Continual spew of errors to log, can't eject

Expected results:
Eject

Additional info:

Perhaps if HAL sees media errors it should stop probing and not
reprobe that device in any way until it sees the device empty ?
Comment 1 David Zeuthen 2004-11-16 15:16:02 EST
Hi,

I agree we should make the user eject the disc, sure.

> Perhaps if HAL sees media errors it should stop probing and not
> reprobe that device in any way until it sees the device empty ?

Well, in order to see if the drive is empty we need to poll the drive
I suppose.

Perhaps HAL should slow down polling (say, every ten seconds) if
errors are encountered.

I'm not sure though where hal fails, e.g. whether it's in the fs
detection code or in polling the drive; what is the output of 'hald
--daemon=no --verbose=yes' when you start up with an empty drive and
then insert the broken disc? It might be useful to get a selected
strace to see what system calls fails.

I want to put some more brains into how hal detects media on optical
drives. E.g including whitelists/blacklists (for bug 130649) and
checks whether the drive shares an IDE channel with other drives (for
bug 138148). 

Any hints on how to damage an optical disc so I can reproduce this? :-)
Comment 2 Alan Cox 2004-11-16 18:06:56 EST
To get the eject to work I have to slow it down to 45 seconds. 

Hal fails because it polls the drive, each poll locks the drive, it
sees a disk in, it (or something triggered as a result tries to read
bits of the disk to identify it).

I did it buy burning a DVD+RW and putting in an old drive that cant
read them. 
Comment 3 Sitsofe Wheeler 2004-11-24 17:24:50 EST
Strange, I've seen this problem with a DVD+RW too. I had finished
burning it and mounted it correctly. However when I told the disk to
eject from the desktop (right mouse button eject) the DVD+RW was
unmounted but I was told that eject failed with some incorrect
parameter. The button on front of the drive did nothing.

Going to My Computer and double clicking the CD icon mounted it again
but as a regular user I could not get the disk to eject either from
GNOME or at the terminal by typing eject. The only way to get the disk
out was to become root and then type eject. I got the same warning
about parameters but the disk actually came out.

Is my experience the same as this bug or is it something different?
Comment 4 David Zeuthen 2004-12-01 08:35:49 EST
Comment #3: this sounds like a different bug
Comment 5 Luke Hutchison 2004-12-01 11:09:48 EST
This sounds related to Bug #138148.  (As pointed out by Sitsofe
Wheeler in that bug.)
Comment 6 Matthew Miller 2006-07-10 17:46:50 EDT
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!

Note You need to log in before you can comment on or make changes to this bug.