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...).
--- 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
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)
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)
Created attachment 26412 [details] ebuild with workaround to make cdrdao display proper error messages instead of dying
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.
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?
That's completly correct.