Bug 166832 - problem with CD-ROM eject immediately after unmount
problem with CD-ROM eject immediately after unmount
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: eject (Show other bugs)
4
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Zdenek Prikryl
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-26 06:18 EDT by Vlado Potisk
Modified: 2008-01-24 09:17 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-24 09:17:21 EST
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 Vlado Potisk 2005-08-26 06:18:22 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc3 Firefox/1.0.6

Description of problem:
I was preparing a catalogue of my backups on CD-ROMs and realized that eject often fails when invoked immediately after un-mount.

Version-Release number of selected component (if applicable):
eject-2.1.1-0.fc3.2

How reproducible:
Sometimes

Steps to Reproduce:
1. run this command in the /media directory:
mount cdrecorder ; ls cdrecorder ; umount cdrecorder ; eject cdrecorder
  

Actual Results:  In some cases (approx. 50% probability):
eject: unable to eject, last error: Invalid argument

Expected Results:  eject should always normally eject the CD-ROM medium

Additional info:

It is probably a timing issue. One second sleep before the eject command helps.
 
Hardware info: hdc: ATAPI 48X CD-ROM CD-R/RW drive, 8192kB Cache, UDMA(33); type ASUS CD-W540E

strace (success):
open("/dev/hdc", O_RDONLY|O_NONBLOCK)   = 4
ioctl(4, CDROMEJECT, 0x804b5f6)         = 0
close(4)                                = 0

strace (failure):
open("/dev/hdc", O_RDONLY|O_NONBLOCK)   = 4
ioctl(4, CDROMEJECT, 0x804b5f6)         = -1 EIO (Input/output error)
ioctl(4, SG_GET_VERSION_NUM, 0xbfb8a08c) = 0
ioctl(4, SG_IO, 0xbfb8a100)             = -1 EPERM (Operation not permitted)
ioctl(4, FDEJECT, 0xbfb8a100)           = -1 EINVAL (Invalid argument)
ioctl(4, MGSL_IOCGPARAMS or MTIOCTOP or SNDCTL_MIDI_MPUMODE, 0xbfb8a080) = -1 EINVAL (Invalid argument)
write(2, "eject: unable to eject, last err"..., 53eject: unable to eject, last error: Invalid argument
) = 53
Comment 1 Matthew Miller 2006-07-10 17:15:45 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!
Comment 2 Vlado Potisk 2006-07-18 03:32:22 EDT
I have tried it again on FC4 with latest updates. The CD drive is different than
the one in the report. In 1 of 5 tries I got:
    eject: unable to eject, last error: Function not implemented
I'm changing the version from FC3 to FC4.

I have reported this issue in order to give feedback to the developers and help
them to improve their code, but if you prefer, you may close this bug with
resolution "nobody cares".
Comment 3 Zdenek Prikryl 2008-01-24 09:16:49 EST
I've tried your sequence "mount cdrecorder ; ls cdrecorder ; umount cdrecorder ;
eject cdrecorder" for at least ten times. But without any error messages. So I'm
closing this bug.

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