Bug 502569 - gnome-cd crashes on /dev/hdd but not on /dev/cdrom
Summary: gnome-cd crashes on /dev/hdd but not on /dev/cdrom
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cdparanoia
Version: 5.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Jones
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks: 590060 668957 719046 726828
TreeView+ depends on / blocked
 
Reported: 2009-05-26 08:29 UTC by ritz
Modified: 2018-11-26 19:46 UTC (History)
6 users (show)

Fixed In Version: cdparanoia-alpha9.8-28
Doc Type: Bug Fix
Doc Text:
Clone Of: 187602
Environment:
Last Closed: 2012-02-21 05:56:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch (452 bytes, patch)
2009-05-26 08:40 UTC, ritz
no flags Details | Diff
Revised patch (655 bytes, patch)
2011-07-27 14:32 UTC, Peter Jones
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0208 0 normal SHIPPED_LIVE cdparanoia bug fix update 2012-02-20 14:53:30 UTC

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 David 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


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