Bug 502569 - gnome-cd crashes on /dev/hdd but not on /dev/cdrom
gnome-cd crashes on /dev/hdd but not on /dev/cdrom
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cdparanoia (Show other bugs)
5.4
All Linux
medium Severity medium
: rc
: ---
Assigned To: Peter Jones
BaseOS QE
: Patch, Reopened
Depends On:
Blocks: 590060 719046 726828 668957
  Show dependency treegraph
 
Reported: 2009-05-26 04:29 EDT by ritz
Modified: 2012-02-21 00:56 EST (History)
6 users (show)

See Also:
Fixed In Version: cdparanoia-alpha9.8-28
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 187602
Environment:
Last Closed: 2012-02-21 00:56:25 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)
patch (452 bytes, patch)
2009-05-26 04:40 EDT, ritz
no flags Details | Diff
Revised patch (655 bytes, patch)
2011-07-27 10:32 EDT, Peter Jones
no flags Details | Diff

  None (edit)
Description ritz 2009-05-26 04:29:12 EDT
+++ 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 04:40:40 EDT
Created attachment 345402 [details]
patch
Comment 3 RHEL Product and Program Management 2009-11-06 14:14:20 EST
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 David Cantrell 2011-02-15 14:17:11 EST
This problem has been addressed upstream.  The version of cdparanoia that ships with RHEL-6 no longer exhibits this problem.
Comment 11 RHEL Product and Program Management 2011-05-31 10:56:42 EDT
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 10:32:41 EDT
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 Product and Program Management 2011-08-05 08:59:34 EDT
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 Lukas Zachar 2012-01-18 07:39:05 EST
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 00:56:25 EST
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

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