Bug 539928 - CDROM drive reloads the CD just after ejection
CDROM drive reloads the CD just after ejection
Status: CLOSED DUPLICATE of bug 453095
Product: Fedora
Classification: Fedora
Component: eject (Show other bugs)
12
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Kamil Dudka
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-21 11:51 EST by Benjamin Bellec
Modified: 2009-11-22 15:49 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-11-22 15:49: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)
Video (119.04 KB, video/ogg)
2009-11-22 10:40 EST, Benjamin Bellec
no flags Details

  None (edit)
Description Benjamin Bellec 2009-11-21 11:51:03 EST
Description of problem:
My 2 CDROM drives (one CD burner and one DVD writer) was unable to correctly eject CD. With the eject command or within Gnome contextual menu, the ejection was done but just after ejection the drives reload the CD !
When pressing the ejection button directly on the CDROM drives, the CD stay in (no ejection at all).
The only manner to retrieve my CD is to eject (software) and when ejection is complete, during CD reloading : press the button on the CDROM drive.

Version-Release number of selected component (if applicable):
eject 2.1.5 15.fc12
gnome-desktop 2.28.1 5.fc12
kernel 2.6.31.6 134.fc12
Comment 1 Kamil Dudka 2009-11-21 12:02:24 EST
Thanks for the report! Now please some (preferably gnome independent) steps to reproduce...
Comment 2 Benjamin Bellec 2009-11-21 12:24:20 EST
Steps to Reproduce:
1. Insert a CD/DVD in a CD/DVD-ROM drive
2. When fully detected by system, eject it.
  
Actual results:
The CD is ejected but is reloaded automatically.

Expected results:
The CD must be accessible and not be reloaded.
Comment 3 Kamil Dudka 2009-11-21 12:39:47 EST
It looks to me like this is not behavior of the eject utility itself. Are you able to reproduce this using eject only? The best way to exclude other possibilities is to switch system to lower runlevel.

What does 'eject -v' say?
Comment 4 Benjamin Bellec 2009-11-21 12:49:09 EST
I don't really know from which software this behavior can come. But when I do only the command "eject", I have this behavior.

"eject -v" without CD previously loaded :
eject: utiliser le périphérique par défaut `cdrom'
eject: le nom du périphérique est `cdrom'
eject: le nom étendu est `/dev/cdrom'
eject: `/dev/cdrom' est un lien de `/dev/sr1'
eject: `/dev/sr1' n'est pas monté
eject: `/dev/sr1' n'est pas un point de montage
eject: checking if device "/dev/sr1" has a removable or hotpluggable flag
eject: `/dev/sr1' n'est pas un périphérique partitionné
eject: tentative d'éjection `/dev/sr1' avec la commande d'éjection du CD-ROM
eject: la commande d'éjection du CD-ROM a réussi

Without CD loaded the behavior is correct.

Now "eject -v" with CD :
eject -v
eject: utiliser le périphérique par défaut `cdrom'
eject: le nom du périphérique est `cdrom'
eject: le nom étendu est `/dev/cdrom'
eject: `/dev/cdrom' est un lien de `/dev/sr1'
eject: `/dev/sr1' est monté à `/media/Fedora-12-i686-Live'
eject: checking if device "/dev/sr1" has a removable or hotpluggable flag
eject: unmounting device `/dev/sr1' from `/media/Fedora-12-i686-Live'
eject: `/dev/sr1' n'est pas un périphérique partitionné
eject: tentative d'éjection `/dev/sr1' avec la commande d'éjection du CD-ROM
eject: la commande d'éjection du CD-ROM a réussi

Seems to have no problem, but the CD is reloaded.

=> "The best way to exclude other possibilities is to switch system to lower runlevel."
Trying "eject" in init 3 for instance ?
Comment 5 Benjamin Bellec 2009-11-21 12:50:38 EST
ls -lah /dev/sr1
brw-rw----+ 1 root cdrom 11, 1 nov.  21 17:57 /dev/sr1

I don't know if it's useful for you.
Comment 6 Kamil Dudka 2009-11-21 12:57:30 EST
(In reply to comment #4)
> I don't really know from which software this behavior can come. But when I do
> only the command "eject", I have this behavior.

Oops, 'LC_ALL=C eject -v' would be much better :-)

> Trying "eject" in init 3 for instance ?

Yep, it sounds like a good idea. Please go ahead.
Comment 7 Benjamin Bellec 2009-11-21 13:10:51 EST
"LC_ALL=C eject -v" without CD in drive
eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/sr1'
eject: `/dev/sr1' is not mounted
eject: `/dev/sr1' is not a mount point
eject: checking if device "/dev/sr1" has a removable or hotpluggable flag
eject: `/dev/sr1' is not a multipartition device
eject: trying to eject `/dev/sr1' using CD-ROM eject command
eject: CD-ROM eject command succeeded


"LC_ALL=C eject -v" with CD in drive
eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/sr1'
eject: `/dev/sr1' is mounted at `/media/Fedora-12-i686-Live'
eject: checking if device "/dev/sr1" has a removable or hotpluggable flag
eject: unmounting device `/dev/sr1' from `/media/Fedora-12-i686-Live'
eject: `/dev/sr1' is not a multipartition device
eject: trying to eject `/dev/sr1' using CD-ROM eject command
eject: CD-ROM eject command succeeded

In init 3 it's equals.
Comment 8 Kamil Dudka 2009-11-21 15:02:43 EST
Could you please try to unmount the device manually before invocation of eject?
Comment 9 Benjamin Bellec 2009-11-21 21:59:06 EST
(In reply to comment #8)
> Could you please try to unmount the device manually before invocation of eject?  

Done, same behavior.

But is it possible that this could be only a configuration a problem ? (not a software problem ?)
Comment 10 Benjamin Bellec 2009-11-21 22:05:09 EST
[so sorry for my roughly English]
Comment 11 Kamil Dudka 2009-11-22 05:43:44 EST
(In reply to comment #9)
> Done, same behavior.

What does exactly mean 'same behavior'? Is it possible to unmount the device? If so, the output of 'eject -v' should also change accordingly.

Who does actually perform the mount? There should be nothing mounting it automatically in runlevel 3. Do you use automount? Then maybe worth to stop the automount service as well.

> But is it possible that this could be only a configuration a problem ? (not a
> software problem ?)

Sure. It's merely impossible for me to tell since I am not able to reproduce it myself.

Could you please have a look at /var/log/messages if anything relevant appears there?

Another possibility is to elaborate on various eject's options and see what happens.
Comment 12 Benjamin Bellec 2009-11-22 06:57:33 EST
(In reply to comment #11)
> What does exactly mean 'same behavior'? Is it possible to unmount the device?
> If so, the output of 'eject -v' should also change accordingly.
This means that doing a "umount" before "eject" doesn't change anything.

> Who does actually perform the mount? There should be nothing mounting it
> automatically in runlevel 3. Do you use automount? Then maybe worth to stop the
> automount service as well.
In init 5, it's Gnome (I suppose).
In init 3, I do the mount manually "su -c 'mount -t iso9660 -o loop /dev/cdrom /media/Fedora-12-i686-Live/'"
Doing a "umount" (or not) before "eject -v" doesn't change anything. The "bug" is still present. But logs are quite different in this 2 cases :

- with umount before ejection :
eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/sr1'
eject: `/dev/sr1' is not mounted
eject: `/dev/sr1' is not a mount point
eject: checking if device "/dev/sr1" has a removable or hotpluggable flag
eject: `/dev/sr1' is not a multipartition device
eject: trying to eject `/dev/sr1' using CD-ROM eject command
eject: CD-ROM eject command succeeded

- without umount before ejection :
eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/sr1'
eject: `/dev/sr1' is not mounted
eject: `/dev/sr1' is not a mount point
eject: checking if device "/dev/sr1" has a removable or hotpluggable flag
eject: `/dev/sr1' is not a multipartition device
eject: trying to eject `/dev/sr1' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/sr1' using SCSI commands
eject: SCSI eject succeeded

> Could you please have a look at /var/log/messages if anything relevant appears
> there?
From init 5 (Gnome) :
Nov 22 12:19:28 localhost gnome-keyring-daemon[1382]: removing removable location: /media/Fedora-12-i686-Live
Nov 22 12:19:28 localhost gnome-keyring-daemon[1382]: no volume registered at: /media/Fedora-12-i686-Live
Nov 22 12:19:43 localhost kernel: cdrom: sr1: mrw address space DMA selected
Nov 22 12:19:43 localhost kernel: cdrom open: mrw_status 'not mrw'

> Another possibility is to elaborate on various eject's options and see what
> happens.  
I will try
Comment 13 Kamil Dudka 2009-11-22 08:19:45 EST
(In reply to comment #12)
> In init 3, I do the mount manually "su -c 'mount -t iso9660 -o loop /dev/cdrom
> /media/Fedora-12-i686-Live/'"

So you need to mount the device first to trigger the bug, right?

The option '-o loop' is misleading here - it probably confuses eject and prevents the device from being properly unmounted before ejection.

Do you have a record for /dev/sr1 in /etc/fstab?
Comment 14 Benjamin Bellec 2009-11-22 09:33:46 EST
(In reply to comment #13)
> So you need to mount the device first to trigger the bug, right?
I all the cases this doesn't change nothing. The CDROM tray is closed automatically after ejection.

> The option '-o loop' is misleading here - it probably confuses eject and
> prevents the device from being properly unmounted before ejection.
Even without -o loop, this doesn't change nothing.

> Do you have a record for /dev/sr1 in /etc/fstab?  
No.
But in /etc/mtab there is :
(when a CD is inserted from Gnome) : /dev/sr1 /media/Fedora-12-i686-Live iso9660 ro,nosuid,nodev,uhelper=devkit,uid=500,gid=500,iocharset=utf8,mode=0400,dmode=0500 0 0
(when a CD is inserted and mounted manually in init3 with mount -t iso9660 /dev/sr1 /media/Fedora-12-i686-Live) : /dev/sr1 /media/Fedora-12-i686-Live iso9660 ro 0 0
Comment 15 Kamil Dudka 2009-11-22 09:55:41 EST
(In reply to comment #14)
> > So you need to mount the device first to trigger the bug, right?
> I all the cases this doesn't change nothing. The CDROM tray is closed
> automatically after ejection.

Even without mounting anything first? My point was actually that a mounted device may be enough reason to not open the tray or whatever...

> Even without -o loop, this doesn't change nothing.

For me it does:

# mount /dev/cdrom /mnt/cdrom
# eject -v
eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/hdb'
eject: `/dev/hdb' is mounted at `/mnt/cdrom'
eject: unmounting device `/dev/hdb' from `/mnt/cdrom'
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
eject: `/dev/hdb' is a multipartition device
eject: trying to eject `/dev/hdb' using CD-ROM eject command
eject: CD-ROM eject command succeeded


# mount -o loop /dev/cdrom /mnt/cdrom
# eject -v
eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/hdb'
eject: `/dev/hdb' is not mounted
eject: `/dev/hdb' is not a mount point
eject: `/dev/hdb' is a multipartition device
eject: trying to eject `/dev/hdb' using CD-ROM eject command
eject: CD-ROM eject command failed
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
eject: trying to eject `/dev/hdb' using SCSI commands
eject: SCSI eject succeeded

# mount | grep cdrom
/dev/loop0 on /mnt/cdrom type iso9660 (ro)
Comment 16 Benjamin Bellec 2009-11-22 10:13:58 EST
(In reply to comment #15)
> For me it does:
> 
> # mount /dev/cdrom /mnt/cdrom
> # eject -v
> eject: using default device `cdrom'
> eject: device name is `cdrom'
> eject: expanded name is `/dev/cdrom'
> eject: `/dev/cdrom' is a link to `/dev/hdb'
> eject: `/dev/hdb' is mounted at `/mnt/cdrom'
> eject: unmounting device `/dev/hdb' from `/mnt/cdrom'
>        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> eject: `/dev/hdb' is a multipartition device
> eject: trying to eject `/dev/hdb' using CD-ROM eject command
> eject: CD-ROM eject command succeeded
> 
> 
> # mount -o loop /dev/cdrom /mnt/cdrom
> # eject -v
> eject: using default device `cdrom'
> eject: device name is `cdrom'
> eject: expanded name is `/dev/cdrom'
> eject: `/dev/cdrom' is a link to `/dev/hdb'
> eject: `/dev/hdb' is not mounted
> eject: `/dev/hdb' is not a mount point
> eject: `/dev/hdb' is a multipartition device
> eject: trying to eject `/dev/hdb' using CD-ROM eject command
> eject: CD-ROM eject command failed
>        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> eject: trying to eject `/dev/hdb' using SCSI commands
> eject: SCSI eject succeeded

For me too. I have the same log in both cases. Except that the tray is closed automatically after ejection.
Comment 17 Benjamin Bellec 2009-11-22 10:40:34 EST
Created attachment 372918 [details]
Video
Comment 18 Kamil Dudka 2009-11-22 15:49:21 EST
Thanks for your descriptive video :-) I of course understood the problem problem before and was only trying to reproduce the bug myself...

Digging up through our bugzilla I can see there were several reports like this. It looks rather as a udev issue. Feel free to reopen the bug if it is not that case.

*** This bug has been marked as a duplicate of bug 453095 ***

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