Bug 244558 - gnome-media - gnome-cd picky about device name (segfault)
gnome-media - gnome-cd picky about device name (segfault)
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: cdparanoia (Show other bugs)
8
All Linux
low Severity medium
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-17 05:17 EDT by Michal Jaegermann
Modified: 2009-01-09 02:08 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-09 02:08:21 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)
effects of running 'gnome-cd --device /dev/scd0' as produced by bug-buddy (9.40 KB, text/plain)
2007-06-18 00:25 EDT, Michal Jaegermann
no flags Details
results from a run 'gdb --args gnome-cd --unique --play --device /dev/scd0' (6.84 KB, text/plain)
2007-08-20 21:10 EDT, Michal Jaegermann
no flags Details
bug-buddy produces that after 'gnome-cd --unique --play --device /dev/scd0' (17.92 KB, text/plain)
2007-08-20 21:12 EDT, Michal Jaegermann
no flags Details

  None (edit)
Description Michal Jaegermann 2007-06-17 05:17:48 EDT
Description of problem:

On a system in question /dev/cdrom happens to be a link to
/dev/scd0.  Other links in /dev/ to scd0 happen to be:
cdrom-sr0
cdrw
cdrw-sr0
cdwriter
cdwriter-sr0
dvd
dvd-sr0

With an audio CD in a drive the following command

   gnome-cd --unique --play --device /dev/cdrom

plays that CD as expected.  OTOH if I will do

   gnome-cd --unique --play --device /dev/scd0

then results are like this:
.....
lstat("/dev/scd0", {st_mode=S_IFBLK|0666, st_rdev=makedev(11, 0), ...}) = 0
open("/dev/scd0", O_RDWR|O_EXCL|O_NONBLOCK) = 0
ioctl(0, SG_IO, 0x7fff7f67cca0)         = -1 EINVAL (Invalid argument)
ioctl(0, SG_IO, 0x7fff7f67cce0)         = -1 EINVAL (Invalid argument)
ioctl(0, SG_GET_RESERVED_SIZE, 0x7fff7f67cbf4) = 0
ioctl(0, SG_GET_SG_TABLESIZE, 0x7fff7f67cbf8) = -1 ENOTTY (Inappropriate ioctl
for device)
ioctl(0, SG_SET_COMMAND_Q, 0x7fff7f67cbf4) = -1 ENOTTY (Inappropriate ioctl for
device)
ioctl(0, SG_IO, 0x7fff7f67cc20)         = -1 EINVAL (Invalid argument)
ioctl(0, SG_EMULATED_HOST, 0x7fff7f67cca8) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---

while a corresponding fragment with "/dev/cdrom" is use looks like 
that:
.....
lstat("/dev/cdrom", {st_mode=S_IFLNK|0777, st_size=4, ...}) = 0
readlink("/dev/cdrom", "scd0", 4096)    = 4
lstat("/dev/scd0", {st_mode=S_IFBLK|0666, st_rdev=makedev(11, 0), ...}) = 0
open("/dev/scd0", O_RDWR|O_EXCL|O_NONBLOCK) = 14
ioctl(14, SG_IO, 0x7fff04adf100)        = -1 EINVAL (Invalid argument)
ioctl(14, SG_IO, 0x7fff04adf140)        = -1 EINVAL (Invalid argument)
ioctl(14, SG_SET_RESERVED_SIZE, 0x7fff04adf050) = 0
.....

and off we go to play CD.

As a matter of fact if any name from the list above but /dev/cdrom
is used then gnome-cd segfaults.  The only other way to use gnome-cd
in that situation will be

     gnome-cd --unique --play

which works too.  OTOH

     totem --play <device>

with any of possible names plays without problems.  What gives???

The issue comes to head because if one will set in gconf
'autoplay_cda_command' to 

     gnome-cd --unique --play --device %d

then "%d" gets substituted with /dev/scd0 and results bomb.
With a single CD device on a system workarounds are obvious;
otherwise we are in trouble.

Version-Release number of selected component (if applicable):
gnome-media-2.18.0-3.fc7

How reproducible:
always as described
Comment 1 Bastien Nocera 2007-06-17 19:22:31 EDT
Please gather a backtrace of the crash, following the instructions at:
http://fedoraproject.org/wiki/StackTraces
Comment 2 Michal Jaegermann 2007-06-18 00:25:02 EDT
Created attachment 157250 [details]
effects of running 'gnome-cd --device /dev/scd0' as produced by bug-buddy

> Please gather a backtrace of the crash

Attached is a spillage from bug-buddy.	I am pretty sure that you can
produce easily such traces yourself.  If this is really _not_ the
case then maybe later I can play with various debugging symbols
and whatever.  At this moment I am somewhat pressed for time and my
connection is not that fast to get all these debug packages.
Comment 3 Bastien Nocera 2007-08-20 10:18:45 EDT
Please test with the updated GStreamer packages in F7 and updates-testing. I
can't reproduce the problem locally...
Comment 4 Michal Jaegermann 2007-08-20 21:10:18 EDT
Created attachment 161937 [details]
results from a run 'gdb --args gnome-cd --unique --play --device /dev/scd0'

> Please test with the updated ....

I did that.
gstreamer-plugins-base-0.10.13-1.fc7.x86_64
gstreamer-plugins-good-0.10.6-1.fc7.x86_64

No change.  After loading a numbe of debug packages it looks
like that the whole thing crashes in sg2_setup_scsi_cmd()
from cdparanoia-libs-alpha9.8-27.2.x86_64 because if /dev/scd0
is used then a pointer 'cdrom_drive *d' is passed to it which is
pointing to an unitialized memory.  If /dev/cdrom is used
instead then I am not sure how to get with gdb to that function.
No crash and setting a breakpoint there does not seem to be
effective (different thread?).

I attach traces from a gdb run and also what bug-buddy prints
with debugging symbols present.
Comment 5 Michal Jaegermann 2007-08-20 21:12:47 EDT
Created attachment 161938 [details]
bug-buddy produces that after 'gnome-cd --unique --play --device /dev/scd0'

Maybe this is x86_64 thing?  All executables here are for that arch.
Comment 6 Gian Paolo Mureddu 2008-02-01 06:29:07 EST
I can confirm this is still a problem in F8, fully updated, gnome-cd in
gnome-media version 2.20.1-3. My backtraces look pretty much identical to the
ones already attached, this would seem to be a problem local to x86_64. This
also happens in the LiveCD (just so you know)
Comment 7 Bug Zapper 2008-05-14 09:08:58 EDT
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Michal Jaegermann 2008-05-14 12:28:52 EDT
See comment #6.  I do not know now about Fedora 9 but I would be
not surprised to find the issue there too.
Comment 9 Bug Zapper 2008-11-26 02:20:41 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 10 Bug Zapper 2009-01-09 02:08:21 EST
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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