Bug 247446 - RHEL4-U5: "cdrom open failed" message in /var/log/messages on every reboot
RHEL4-U5: "cdrom open failed" message in /var/log/messages on every reboot
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.5
All Linux
low Severity low
: ---
: ---
Assigned To: John Feeney
Martin Jenner
: OtherQA
Depends On:
Blocks: 430698
  Show dependency treegraph
 
Reported: 2007-07-09 07:14 EDT by srinivas
Modified: 2010-10-22 12:11 EDT (History)
5 users (show)

See Also:
Fixed In Version: RHSA-2008-0665
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-07-24 15:13:40 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)
/var/log/messages after the required changes have been done to the driver code. (59.06 KB, application/octet-stream)
2007-09-26 11:19 EDT, srinivas
no flags Details
driver file with changes (91.00 KB, application/octet-stream)
2007-09-26 11:20 EDT, srinivas
no flags Details

  None (edit)
Description srinivas 2007-07-09 07:14:22 EDT
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):
2.6.9-55 

How reproducible:
Always

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 07:23:38 EDT
Will this be fixed in RHEL 4.6?
Comment 2 John Feeney 2007-08-22 10:42:23 EDT
No, it is not planned to be included in 4.6 at this time.
Comment 3 John Feeney 2007-09-06 10:37:11 EDT
Srinivas,
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
used.

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.
  John 
Comment 4 srinivas 2007-09-26 11:19:26 EDT
Created attachment 207221 [details]
/var/log/messages after the required changes have been done to the driver code.
Comment 5 srinivas 2007-09-26 11:20:01 EDT
Created attachment 207231 [details]
driver file with changes
Comment 6 John Feeney 2007-09-27 11:19:56 EDT
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 16:05:33 EDT
The built rpms with the proposed fix can be found in
 http://people/redhat.com/jfeeney/.bz247446.

Comment 8 John Feeney 2007-09-27 16:35:13 EDT
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 11:25:09 EDT
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
 http://people.redhat.com/jfeeney/.bz247446.


Comment 10 John Feeney 2008-02-07 15:28:14 EST
Srinivas,
Any luck downloading the rpms specified in comment #9? The link works for
me.
  Thanks.
Comment 11 Vijayakumara Moteth 2008-02-21 05:23:52 EST
#include<stdio.h>
#include <stdlib.h>
int main()
{
    FILE *fptr;

    fptr = fopen("/dev/hdc", "r");
    if(fptr)
       printf("CD rom open success\n");
    else
       printf("CD rom open Fail\n");
}
Comment 12 Vijayakumara Moteth 2008-02-21 05:37:59 EST
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
/var/log/messages.

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
negative. 

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. 

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

Thanks
Ram
Comment 14 RHEL Product and Program Management 2008-03-04 15:29:43 EST
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
release.
Comment 15 Vivek Goyal 2008-03-11 19:38:48 EDT
Committed in 68.19.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/
Comment 16 Ram 2008-03-12 02:42:25 EDT
Verified. The kernel 2.6.9-68.20 fixes this issue.
Comment 18 Chris Ward 2008-06-05 11:50:17 EDT
~~~~~~~~~~~~~~
~ 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
received.

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 04:40:27 EDT
Correction: This bug is **Low Priority**. Sorry.
Comment 20 Ram 2008-06-11 02:50:35 EDT
Verified. The issue is fixed with RHEL4.7 beta code drop.
Comment 23 errata-xmlrpc 2008-07-24 15:13:40 EDT
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.

http://rhn.redhat.com/errata/RHSA-2008-0665.html
Comment 24 Chris Ward 2008-07-29 03:24:18 EDT
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.