Bug 247446 - RHEL4-U5: "cdrom open failed" message in /var/log/messages on every reboot
Summary: RHEL4-U5: "cdrom open failed" message in /var/log/messages on every reboot
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel   
(Show other bugs)
Version: 4.5
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: John Feeney
QA Contact: Martin Jenner
Keywords: OtherQA
Depends On:
Blocks: 430698
TreeView+ depends on / blocked
Reported: 2007-07-09 11:14 UTC by srinivas
Modified: 2018-10-19 20:12 UTC (History)
5 users (show)

Fixed In Version: RHSA-2008-0665
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-24 19:13:40 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
/var/log/messages after the required changes have been done to the driver code. (59.06 KB, application/octet-stream)
2007-09-26 15:19 UTC, srinivas
no flags Details
driver file with changes (91.00 KB, application/octet-stream)
2007-09-26 15:20 UTC, srinivas
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2008:0665 normal SHIPPED_LIVE Moderate: Updated kernel packages for Red Hat Enterprise Linux 4.7 2008-07-24 16:41:06 UTC

Description srinivas 2007-07-09 11:14:22 UTC
Description of problem:

Installed RHEL-4.5 on PE1800.When we check /var/log/messages we find the below 
error messages:

error: kernel: cdrom: open failed.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install RHEL-4.5 (kernel-2.6.9-55.ELsmp) on PE1800
2. Reboot and check the /var/log/messages.
3. Error messages are shown in /var/log/messages.
     kernel: cdrom: open failed.
Actual results:
"kernel: cdrom: open failed" message is seen in /var/log/messages.
Expected results:

"kernel: cdrom: open failed" message should not be seen in /var/log/messages.
Additional info:

Comment 1 srinivas 2007-08-22 11:23:38 UTC
Will this be fixed in RHEL 4.6?

Comment 2 John Feeney 2007-08-22 14:42:23 UTC
No, it is not planned to be included in 4.6 at this time.

Comment 3 John Feeney 2007-09-06 14:37:11 UTC
Since you found and recently asked about bz247466, I was wondering if 
you could help me get it resolved. 

What I need from you is for you to get the source to RHEL4 and recompile 
the cdrom driver (drivers/cdrom/cdrom.c) with ERRLOGMASK set to 
"CD_WARN | CD_OPEN" at least. I would like to see the debug messages 
that result when CD_OPEN is defined.

There appear to be two patches upstream that deal with this area. One
adds a call to cdo->drive_status() before the call to cdrom_count_tracks().
I would hope that a call to cdo->drive_status() would update ret so the
cleanup_and_return error path is not taken. This patch was added in the
2.6.11 timeframe.

The other patch just changes the debug level on the offending message from
CD_WARN to CD_OPEN. This was added more recently.

Obviously, the first patch is preferable but if that doesn't work for a 
pe1800 I suppose the second will have to do. If you could get the output 
from changing ERRLOGMASK, perhaps this would show which patch should be

If re-compiling is not possible, I could build rpms with the first patch
and perhaps you could test it. If that doesn't work, then the same
could be done with the second patch.

Thanks in advance for whatever help you can provide. It is appreciated.

Comment 4 srinivas 2007-09-26 15:19:26 UTC
Created attachment 207221 [details]
/var/log/messages after the required changes have been done to the driver code.

Comment 5 srinivas 2007-09-26 15:20:01 UTC
Created attachment 207231 [details]
driver file with changes

Comment 6 John Feeney 2007-09-27 15:19:56 UTC
Great! Thanks so much, Srinivas. 

From the output it looks like the "first patch" isn't the solution. The
cdo->driver_status() call returned a value of 1 (CDS_NO_DISC). This value 
is then compared to CDS_TRAY_OPEN which fails and then the else if is to
see if it is NOT CDS_DISC_OK. Thus, ret goes to -ENOMEDIUM and the code
gotos clean_up_and_return where the error message in question is displayed.

The "first patch" would add a call to cd0->drive_status() just before the
check for CDS_DISC_OK but in this case, there is no disk and nothing has
been done to add one so regardless of whether cd0->drive_status() is called
again, there still would be no disk. Thus the patch won't help this bugzilla.

The solution is to change the level of the printk to a informational
level from a warning level. It is not an error to have no cd in the drive.

I will make this fix and build rpms and if I can impose upon you again to test 
them, that would be great.

Comment 7 John Feeney 2007-09-27 20:05:33 UTC
The built rpms with the proposed fix can be found in

Comment 8 John Feeney 2007-09-27 20:35:13 UTC
Srinivas, could you do me one additional favor? Would you make sure that
this error message is written to /var/log when there is no CD in the
device and isn't written if there is. As I tried to explain above, the
status return indicates there is no CD so I would just like to confirm that.
Thanks again.

Comment 9 John Feeney 2007-10-01 15:25:09 UTC
Let me try to type the link for the rpms one more time. I had a typo 
in the previous attempt. 

The built rpms with the proposed fix can be found in

Comment 10 John Feeney 2008-02-07 20:28:14 UTC
Any luck downloading the rpms specified in comment #9? The link works for

Comment 11 Vijayakumara Moteth 2008-02-21 10:23:52 UTC
#include <stdlib.h>
int main()
    FILE *fptr;

    fptr = fopen("/dev/hdc", "r");
       printf("CD rom open success\n");
       printf("CD rom open Fail\n");

Comment 12 Vijayakumara Moteth 2008-02-21 10:37:59 UTC
Hello John,

This is Vijayakumara Moteth from HP. I'm also facing the same issue logging
"cdrom open failed" messages whenever i try to check for device existence.

In Comment#11 i wrote a simple program. If i execute this, logs the message into

I have tried your proposed fix with 2.6.9 kernel. It works fine. but the same i
tried with 2.6.5 also (facing the same problem here also). but the result is

I have also tested by restarting machine with 2.6.9 kernel. After applying
proposed fix and restart "cdrom open failed" messages disappeared.  

I think this issue is present with 2.6 kernel. Is there any common patch for the
all the machines with 2.6 kernel. 


Comment 13 Ram 2008-02-27 05:19:57 UTC
Yes, John. I have verified your fix. This issue is fixed in the proposed 


Comment 14 RHEL Product and Program Management 2008-03-04 20:29:43 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 15 Vivek Goyal 2008-03-11 23:38:48 UTC
Committed in 68.19.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/

Comment 16 Ram 2008-03-12 06:42:25 UTC
Verified. The kernel 2.6.9-68.20 fixes this issue.

Comment 18 Chris Ward 2008-06-05 15:50:17 UTC
~ Attention: ~ Feedback requested regarding this **High Priority** bug. 

A fix for this issue should be included in the latest packages contained in
RHEL4.7-Snapshot1--available now on partners.redhat.com.

After you (Red Hat Partner) have verified that this issue has been addressed,
submit a comment describing the passing results of your test in appropriate
detail, along with which snapshot and package version tested. The bugzilla will
be updated by Red Hat Quality Engineering for you when this information has been

If you believe this issue has not properly fixed or you are unable to verify the
issue for any reason, please add a comment describing the most recent issues you
are experiencing, along with which snapshot and package version tested. 

If you believe the bug has not been fixed, change the status of the bug to ASSIGNED.

If you are receiving this message in Issue Tracker, please reply with a message
to Issue Tracker about your results and bugzilla will be updated for you. 

If you need assistance accessing ftp://partners.redhat.com, please contact your
Partner Manager.

Thank you
Red Hat QE Partner Management

Comment 19 Chris Ward 2008-06-06 08:40:27 UTC
Correction: This bug is **Low Priority**. Sorry.

Comment 20 Ram 2008-06-11 06:50:35 UTC
Verified. The issue is fixed with RHEL4.7 beta code drop.

Comment 23 errata-xmlrpc 2008-07-24 19:13:40 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Comment 24 Chris Ward 2008-07-29 07:24:18 UTC
Partners, I would like to thank you all for your participation in assuring the
quality of this RHEL 4.7 Update Release. My hat's off to you all. Thanks.

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