Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 502569

Summary: gnome-cd crashes on /dev/hdd but not on /dev/cdrom
Product: Red Hat Enterprise Linux 5 Reporter: ritz <rkhadgar>
Component: cdparanoiaAssignee: Peter Jones <pjones>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4CC: chris, cww, lzachar, peterd, p.van.egdom, spurrier
Target Milestone: rcKeywords: Patch, Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cdparanoia-alpha9.8-28 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 187602 Environment:
Last Closed: 2012-02-21 05:56:25 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:
Bug Depends On:    
Bug Blocks: 590060, 668957, 719046, 726828    
Attachments:
Description Flags
patch
none
Revised patch none

Description ritz 2009-05-26 08:29:12 UTC
+++ This bug was initially created as a clone of Bug #187602 +++

gnome-cd works correctly if the device name is exactly /dev/cdrom.
However is segfaults on any other device name, that point
to the the same device.
/dev/cdrom is linked to hdd, so is /dev/cdwriter
gnome-cd crashes on /dev/hdd and /dev/cdwriter, but not on /dev/cdrom.
When clicking on the audio cd icon that appears when an
audio cd is inserted, gnome-cd is started as:
gnome-cd --unique --play --device /dev/hdd
therefore it crashes.

In cdparanoia source in file scan_devices.c in function sgio_cdda_identify_scsi
is this test:

if (check_fd_sgio(d->cdda_fd))
  sgio_init_sg_info(d);
else
  sg2_init_sg_info(d);

Function check_fd_sgio returns value < 0, on error or argement if ok. For some
unknown reason when device other as /dev/cdrom is used (/dev/hdc /dev/hdd) 
cdda_fd = 0 is opened (this is valid fd, but zero) and check fails and
s2_init_sg_info is used (which is wrong). Check should be changed to:

if (check_fd_sgio(d->cdda_fd) == d->cdda_fd)
  sgio_init_sg_info(d);
else
  sg2_init_sg_info(d);

Comment 1 ritz 2009-05-26 08:40:40 UTC
Created attachment 345402 [details]
patch

Comment 3 RHEL Program Management 2009-11-06 19:14:20 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 7 Dave Cantrell 2011-02-15 19:17:11 UTC
This problem has been addressed upstream.  The version of cdparanoia that ships with RHEL-6 no longer exhibits this problem.

Comment 11 RHEL Program Management 2011-05-31 14:56:42 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 13 Peter Jones 2011-07-27 14:32:41 UTC
Created attachment 515536 [details]
Revised patch

Previous patch is buggy in that it handles the case where fd is *already* an error condition incorrectly. This patch should work correctly.

Comment 14 RHEL Program Management 2011-08-05 12:59:34 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
release.

Comment 19 Lukáš Zachar 2012-01-18 12:39:05 UTC
This bug has been tested SanityOnly.

Sanity was tested by playing and ripping audio-cd using several names for the device (/dev/cdrom,/dev/hda, /dev/my_simlink).

Comment 20 errata-xmlrpc 2012-02-21 05:56:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0208.html