Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 43003 - cdrdao crashes instead of displaying scsi error message
Summary: cdrdao crashes instead of displaying scsi error message
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Lars Weiler (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-26 10:36 UTC by Danny Milosavljevic
Modified: 2004-03-24 18:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild with workaround to make cdrdao display proper error messages instead of dying (cdrdao-1.1.8-r2.ebuild,1.66 KB, text/plain)
2004-02-26 10:44 UTC, Danny Milosavljevic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Danny Milosavljevic 2004-02-26 10:36:32 UTC
cdrdao-1.1.8 crashes when reading a cd.
(kernel 2.6 with direct access to /dev/cdroms/cdrom0 as device, driver generic-mmc in libscg)



Reproducible: Always
Steps to Reproduce:
1. call cdrdao read-cd --device /dev/cdroms/cdrom0 --driver generic-mmc a
2. wait until 00:01:00 or so
3. see it crash

Actual Results:  
crash in printerr

Expected Results:  
display error that it cannot read cd because of something (or read cd without 
error)

after a small workaround in the ebuild, it works fine (that is, displays 0x4 
hardware error... bah maybe I really need a new drive...).
Comment 1 Danny Milosavljevic 2004-02-26 10:41:23 UTC
--- before patching:
Cdrdao version 1.1.8 - (C) Andreas Mueller <andreas@daneb.de>
  SCSI interface library - (C) Joerg Schilling
  Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

Using libscg version 'schily-0.8'

/dev/cdroms/cdrom1: PIONEER DVD-ROM DVD-106     Rev: 1.22
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x0000)

Reading toc and track data...

Track   Mode    Flags  Start                Length
------------------------------------------------------------
 1      DATA    4      00:00:00(     0)     56:53:07(255982)
Leadout DATA    4      56:53:07(255982)

PQ sub-channel reading (data track) is supported, data format is BCD.
Copying data track 1 (MODE1): start 00:00:00, length 56:53:07 to "data.bin"...
Speicherzugriffsfehler
Comment 2 Danny Milosavljevic 2004-02-26 10:42:22 UTC
dannym@pyramid u $ gdb cdrdao # read-cd --device /dev/cdroms/cdrom1 --driver generic-mmc b
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) run read-cd --device /dev/cdroms/cdrom1 --driver generic-mmc b
Starting program: /usr/bin/cdrdao read-cd --device /dev/cdroms/cdrom1 --driver generic-mmc b

Program received signal SIGTRAP, Trace/breakpoint trap.
0x400009d0 in ?? ()
(gdb) cont
Continuing.
[New Thread 16384 (LWP 23306)]
Cdrdao version 1.1.8 - (C) Andreas Mueller <andreas@daneb.de>
  SCSI interface library - (C) Joerg Schilling
  Paranoia DAE library - (C) Monty
Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

Using libscg version 'schily-0.8'

/dev/cdroms/cdrom1: PIONEER DVD-ROM DVD-106     Rev: 1.22
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x0000)

Reading toc and track data...

Track   Mode    Flags  Start                Length
------------------------------------------------------------
 1      DATA    4      00:00:00(     0)     56:53:07(255982)
Leadout DATA    4      56:53:07(255982)

PQ sub-channel reading (data track) is supported, data format is BCD.
Copying data track 1 (MODE1): start 00:00:00, length 56:53:07 to "data.bin"...
00:09:00
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 23306)]
0x0809d1c2 in getmainfp ()
(gdb) bt
#0  0x0809d1c2 in getmainfp ()
#1  0x0809d214 in getavp ()
#2  0x0809d231 in getav0 ()
#3  0x0809c095 in get_progname ()
#4  0x0809c12c in _serrmsg ()
#5  0x0809c10e in serrmsgno ()
#6  0x080955c3 in scg__sprinterr ()
#7  0x080952c6 in scg_svtail ()
#8  0x080954ac in scg_sprinterr ()
#9  0x08095442 in scg_fprinterr ()
#10 0x0809540f in scg_printerr ()
#11 0x080614a2 in GenericMMC::readTrackData(TrackData::Mode, TrackData::SubChannelMode, long, long, unsigned char*) ()
(gdb) 
Comment 3 Danny Milosavljevic 2004-02-26 10:43:09 UTC
workaround in ebuild in src_unpack at the end:

        (cd scsilib/include && sed -e 's;HAVE_SCANSTACK;NO_FRIGGING_SCANSTACK;g' xmconfig.h >xmconfig.h.new && mv xmconfig.h.new xmconfig.h)
        (cd scsilib/include && sed -e 's;HAVE_SCANSTACK;NO_FRIGGING_SCANSTACK;g' mconfig.h >mconfig.h.new && mv mconfig.h.new mconfig.h)
Comment 4 Danny Milosavljevic 2004-02-26 10:44:02 UTC
Created attachment 26412 [details]
ebuild with workaround to make cdrdao display proper error messages instead of dying
Comment 5 Lars Weiler (RETIRED) gentoo-dev 2004-03-16 20:24:29 UTC
I checked your comments and edited the cdrdao ebuild to apply you patches.  But I changed the behaviour that it will be compiled in debug-mode by default.  Instead I used the debug USE-flag.  It's now in cdrdao-1.8.0-r1.
Comment 6 Danny Milosavljevic 2004-03-23 05:42:03 UTC
sure, that DEBUG=yes was a accidential left-in to make gdb do something useful ... good to know that there is a use flag for that, so I can stop doing such things in the future ;)

'USE="debug" emerge cdrdao', right?
Comment 7 Lars Weiler (RETIRED) gentoo-dev 2004-03-24 18:27:07 UTC
That's completly correct.