Bug 432729

Summary: execute command "eject -X" can not output a list of speeds of "cdrom"
Product: Red Hat Enterprise Linux 5 Reporter: Peng Haitao <penght>
Component: ejectAssignee: Kamil Dudka <kdudka>
Status: CLOSED CANTFIX QA Contact: desktop-bugs <desktop-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 5.1CC: astokes, rvokal, tao
Target Milestone: rc   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-26 16:40:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
This is a patch fixing this bug
none
the attachment of executing command "eject -v -X"
none
the attachment of executing command "cat /proc/sys/dev/cdrom/info"
none
This is a patch fixing this bug
none
The attachment of executing command "lsmod"
none
eject-2.1.5-5.el5.src.rpm
none
This is a patch fixing this bug in the source of "eject-2.1.5-5.el5.src.rpm"
none
The attachment of executing command "for s in `seq 0 1 52`; do hdparm -E $s /dev/hda; done" none

Description Peng Haitao 2008-02-14 01:40:34 UTC
Description of problem:
Using command "eject" with option "-X" can not output a list
of speeds which can be used as an argument of the -x option.

Version-Release number of selected component (if applicable):
eject-2.1.5-4.2.el5

How reproducible:
100%

Steps to Reproduce:
1.eject -X
  
Actual results:
eject: CD-ROM select speed command failed: Input/output error

Expected results:
4 16 24 ...

Additional info:

Comment 1 Peng Haitao 2008-02-14 01:40:34 UTC
Created attachment 294862 [details]
This is a patch fixing this bug

Comment 2 Zdenek Prikryl 2008-02-14 10:38:21 UTC
Hello,
I need some additional info from you. Please, run eject (without a patch) in a
verbose mode "$ eject -v -X" and create an attachment. Also create an attachment
with an output of "$ cat /proc/sys/dev/cdrom/info".

Thanks

Comment 3 Peng Haitao 2008-02-15 01:54:47 UTC
Created attachment 294961 [details]
the attachment of executing command "eject -v -X"

Comment 4 Peng Haitao 2008-02-15 01:55:55 UTC
Created attachment 294962 [details]
the attachment of executing command "cat /proc/sys/dev/cdrom/info"

Comment 5 Peng Haitao 2008-02-15 10:03:23 UTC
Created attachment 294998 [details]
This is a patch fixing this bug

This patch avoids giving up too early the speed detection: in case of error,
just try with the next speed.

Comment 6 Zdenek Prikryl 2008-02-15 13:33:27 UTC
Patch seems fine. But still, I would like to have some additional information. 
Because this is first case of this kind of problems, a bug could be in a 
kernel module of cdrom. So, what cdrom do you have? Please, attach an output 
of "$ lsmod" as attachment too.

Thanks

Comment 7 Peng Haitao 2008-02-18 00:28:07 UTC
Created attachment 295119 [details]
The attachment of executing command "lsmod"

I execute command in the machine "Acer Altos G530(SATA)"

Comment 8 Zdenek Prikryl 2008-02-28 13:30:20 UTC
Please try to build eject-2.1.5-5.el5.src.rpm which I'll create as an
attachment. This version tries to list speeds of a cdrom in different way.

Please, let me know, if this version works correct. 

Comment 9 Zdenek Prikryl 2008-02-28 13:31:04 UTC
Created attachment 296204 [details]
eject-2.1.5-5.el5.src.rpm

Comment 10 Peng Haitao 2008-02-29 01:46:04 UTC
Created attachment 296298 [details]
This is a patch fixing this bug in the source of "eject-2.1.5-5.el5.src.rpm"

This version does not work correct, the bug is still existent. So I make a
another patch to fix this bug in the source of "eject-2.1.5-5.el5.src.rpm".

Comment 11 Zdenek Prikryl 2008-03-06 10:47:54 UTC
Hello, one more test. Because eject fails to set some low CDROM speed, we try
another tool.

So run this as a root:
$ for s in `seq 0 1 52`; do hdparm -E $s /dev/hda; done

Will every set of speed run without any error?

Comment 12 Peng Haitao 2008-03-07 00:43:30 UTC
Created attachment 297128 [details]
The attachment of executing command "for s in `seq 0 1 52`; do hdparm -E $s /dev/hda; done"

BTW, The function ioctl(fd, CDROM_SELECT_SPEED, speed) when the speed is 1, 2
or 3 will return -1.

Comment 13 Zdenek Prikryl 2008-03-11 12:13:21 UTC
Hmm, it's really strange. As I mentioned before, it may be a kernel stuff. So
I'm reassigning this to kernel and will wait for their statement.

Comment 14 Anton Arapov 2008-07-04 07:08:09 UTC
  It's obviously normal return of the ioctl(). Nothing really strange happened,
it's device dependent.
  No doubts that eject tool have to deal with other then successful returns from
ioctl(), it will not break the logic of the tool and does not change the
behavior. Proposed there patches for eject is what I'd like to see in eject.

Alternatively, you can try to update the firmware in cd/dvd drive. Or at least
to look for it,... it might be known issue.

go ahead, Zdenek!

Comment 15 RHEL Program Management 2009-03-26 16:46:51 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 20 Kamil Dudka 2010-03-26 16:40:04 UTC
The proposed solution does not solve the problem, which seems to be caused by the device (or its firmware).  As there is nothing we can improve in eject itself wrt. the issue, I am closing the bug as CANTFIX.  Feel free to reopen if you are aware of another solution.  Thanks in advance!