Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 59464 - CD digital extraction-related problems
Summary: CD digital extraction-related problems
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-04 16:20 UTC by Joel Parker
Modified: 2004-09-24 02:41 UTC (History)
0 users

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


Attachments
Sample illustrating step 2 (Sample 1.ogg,261.84 KB, application/octet-stream)
2004-08-04 16:21 UTC, Joel Parker
Details
Sample illustrating step 5 (Sample 2.ogg,359.78 KB, application/octet-stream)
2004-08-04 16:24 UTC, Joel Parker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Parker 2004-08-04 16:20:25 UTC
I've been having this problem off and on again for the past few months, but I just now got it down to a relatively isolated state.

I'm having a problem with my DVD+R/W drive and digital audio extraction. When I boot, DAE works fine, but sometimes, after some CD-related activities, it will develop a glitch that prevents any further work until a reboot.

A typical session works like this:

1. Boot Gentoo Linux, 2.6.7-gentoo-r11.
2. Play a CD using XMMS in DAE mode.
3. Stop XMMS.
4. Rip the song with cdparanoia.
5. Play the CD again using XMMS in DAE mode.

I will attach two .ogg files that demonstrate steps 2 and 5. The first, Sample 1.ogg, contains a small clip of the CD playing normally. Sample 2.ogg contains a clip of the same song playing after the glitch has been triggered.

Here's the cdparanoia session:

--
$ cdparanoia -B 3
cdparanoia III release 9.8 (March 23, 2001)
(C) 2001 Monty <monty@xiph.org> and Xiphophorus

Report bugs to paranoia@xiph.org
http://www.xiph.org/paranoia/


Ripping from sector   37367 (track  3 [0:00.00])
          to sector   60391 (track  3 [5:06.74])

outputting to track03.cdda.wav

 (== PROGRESS == [    V------------------------+*| 060391 00 ] == :^D * ==)

Done.


$
--

Note the V, which indicates an uncorrectable read error. At this point, the ripped .wav file simply stops playing any sound, although silence remains for the full remainder of the song.

I can reproduce this 9 times out of 10 using the steps outlined above. It also happens when I rip with grip 3.2.0, which uses its own internal version of cdparanoia.

I'm pretty confident this can be traced to a kernel issue, though. I've isolated this track as a consistant trigger, though it doesn't happen all the time (but I've only had 2 successes in many attempts). The track rips perfectly in Windows, and plays perfectly all the way through in XMMS (in both DAE and normal modes) before the rip attempt.

I've tried to drill this down as much as possible, but if you have any suggestions, I'll definitely try to test them.

Reproducible: Sometimes
Steps to Reproduce:




emerge --info:

--
]# emerge --info
Portage 2.0.50-r9 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.6.7-gentoo-r11)
=================================================================
System uname: 2.6.7-gentoo-r11 i686 Mobile Intel(R) Pentium(R) 4     CPU 3.06GHz
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-Os -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-Os -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://128.213.5.34/gentoo/ http://mirror.datapipe.net/gentoo
http://mirror.datapipe.net/gentoo http://gentoo.mirrored.ca/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acpi alsa apache2 avi berkdb bonobo cdparanoia cdr cjk crypt cups
divx4linux doc dvd dvdr encode esd f77 faad fam flac foomaticdb gcj gdbm gif
gnome gnutls gstreamer gtk gtk2 gtkhtml guile imlib ipv6 java jce jikes jpeg
ldap libg++ libwww live mad mailwrapper matroska mikmod mmx monkey motif mozilla
mozsvg mpeg mysql ncurses nls nptl oav objc oggvorbis opengl pam pda pdflib perl
png pnp ppds python qemu-fast quicktime quotes readline samba sdl slang sndfile
softmmu speex spell sse ssl tcltk tcpd tetex theora tiff truetype trusted
unicode x86 xml2 xmms xprint xv xvid zlib"

#
--

Hardware:

- Dell 5150 Laptop
- DVD+R/W drive

Software:

- gentoo-sources-2.6.7-r11
- grip 3.2.0
- cdparanoia III r9.8
- XMMS 1.2.10
Comment 1 Joel Parker 2004-08-04 16:21:52 UTC
Created attachment 36780 [details]
Sample illustrating step 2
Comment 2 Joel Parker 2004-08-04 16:24:11 UTC
Created attachment 36781 [details]
Sample illustrating step 5
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2004-08-05 13:29:08 UTC
can you try a different drive?
Comment 4 Joel Parker 2004-08-05 14:10:00 UTC
Well, I'll have a few different computers available to me this weekend, but none are running Linux at the moment (Win98, 2000). I can try putting it on one of them quickly, if that's what you want. 
Comment 5 Ben Dash 2004-08-11 07:09:21 UTC
I think I'm seeing the same problem.

I have a CD which I can't rip track 6 from on Gentoo 2.6.5 Kernel, but can rip fine on RedHat 9.

Visually Grip seems to rip the track to a wav file, I'll check to see if the wav file plays.  The first sign of problems is that oggenc goes down to 0.2x speed, and then 0.1x, and within another 5 seconds it's idle.

The only way that I can rip more CDs is to reboot, which is why I suspect a kernel problem.
Comment 6 Joel Parker 2004-08-11 12:41:38 UTC
Good to see someone with the same problem. I posted this as a question to the cdparanoia list too, so we'll see if there's any activity on that end.
Comment 7 Chris White (RETIRED) gentoo-dev 2004-08-11 15:50:29 UTC
Has there been any luck with upstream on the issue?  If not I'd like to take a 
look and see what's up.
Comment 8 Joel Parker 2004-08-12 13:24:23 UTC
I just reposted my message to paranoia@xiph.org, looks like it didn't get through last time.
Comment 9 Jeremy Huddleston (RETIRED) gentoo-dev 2004-08-29 03:23:28 UTC
Can you try CFLAGS="-O2 -pipe"
Comment 10 Joel Parker 2004-08-30 20:03:19 UTC
I performed the following command:

# USE="-O2 -pipe" emerge cdparanoia

Here's the result of ripping the audio tracks the Starsiege game CD (a two-session disc with game data in the first session and music tracks in the second) using gentoo-dev-sources-2.6.8-r3.

--
$ /usr/bin/cdparanoia -B -v
cdparanoia III release 9.8 (March 23, 2001)
(C) 2001 Monty <monty@xiph.org> and Xiphophorus

Report bugs to paranoia@xiph.org
http://www.xiph.org/paranoia/

Checking /dev/cdrom for cdrom...
        DMA scatter/gather table entries: 1
        table entry size: 131072 bytes
        maximum theoretical transfer: 55 sectors
        Setting default read size to 13 sectors (30576 bytes).


CDROM model sensed sensed: PHILIPS DVD+RW SDVD6004 1.03


Checking for SCSI emulation...
        Drive is ATAPI (using SCSI host adaptor emulation)

Checking for MMC style command set...
        Drive is MMC style
Verifying CDDA command set...
        Expected command set reads OK.

Table of contents (audio tracks only):
track        length               begin        copy pre ch
===========================================================
  2.    10533 [02:20.33]   264854 [58:51.29]    no   no  2
  3.    13450 [02:59.25]   275387 [61:11.62]    no   no  2
  4.    10174 [02:15.49]   288837 [64:11.12]    no   no  2
  5.    11646 [02:35.21]   299011 [66:26.61]    no   no  2
TOTAL   45803 [10:10.53]    (audio only)

Ripping from sector  264854 (track  2 [0:00.00])
          to sector  310656 (track  5 [2:35.20])

outputting to track02.cdda.wav

 (== PROGRESS == [VVVVV+++VV+V+V!+VV++VVVVV++VVV*| 275386 00 ] == :^D * ==)

outputting to track03.cdda.wav

 (== PROGRESS == [VV+V!V+VVVVV+VVVVVV+VVV+V++V++*| 288836 00 ] == :^D * ==)

outputting to track04.cdda.wav

[etc.]

$
--
Comment 11 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-01 13:05:48 UTC
I just added a few patches to cdparanoia for a couple bugs with drive identification and TOC reading... can youu try that... I doubt it's related, but it might be...
Comment 12 Joel Parker 2004-09-03 09:12:37 UTC
I'll try it, but it'll be a few days before I can. My laptop was having other problems, so I sent it back for repairs.
Comment 13 Joel Parker 2004-09-14 17:28:26 UTC
Ok, I tried the latest cdparanoia in portage:

# emerge -pv cdparanoia

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] media-sound/cdparanoia-3.9.8-r2  -debug  0 kB

Total size of downloads: 0 kB

# exit
$ $ /usr/bin/cdparanoia -B -v
cdparanoia III release 9.8 (March 23, 2001)
(C) 2001 Monty <monty@xiph.org> and Xiphophorus

Report bugs to paranoia@xiph.org
http://www.xiph.org/paranoia/

Checking /dev/cdrom for cdrom...
        DMA scatter/gather table entries: 1
        table entry size: 131072 bytes
        maximum theoretical transfer: 55 sectors
        Setting default read size to 13 sectors (30576 bytes).


CDROM model sensed sensed: PHILIPS DVD+RW SDVD6004 1.03


Checking for SCSI emulation...
        Drive is ATAPI (using SCSI host adaptor emulation)

Checking for MMC style command set...
        Drive is MMC style
Verifying CDDA command set...
        Expected command set reads OK.

Table of contents (audio tracks only):
track        length               begin        copy pre ch
===========================================================
  2.    10533 [02:20.33]   264854 [58:51.29]    no   no  2
  3.    13450 [02:59.25]   275387 [61:11.62]    no   no  2
  4.    10174 [02:15.49]   288837 [64:11.12]    no   no  2
  5.    11646 [02:35.21]   299011 [66:26.61]    no   no  2
TOTAL   45803 [10:10.53]    (audio only)

Ripping from sector  264854 (track  2 [0:00.00])
          to sector  310656 (track  5 [2:35.20])

outputting to track02.cdda.wav

 (== PROGRESS == [VV!V!!V!!!!!!!!V!! >          0| 270821 00 ] == 8-| 0 ==)   Segmentation fault (core dumped)
$ $ gdb /usr/bin/cdparanoia core
GNU gdb 6.0
Copyright 2003 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"...
(no debugging symbols found)...Using host libthread_db library "/lib/libthread_db.so.1".

Core was generated by `/usr/bin/cdparanoia -B -v'.
Program terminated with signal 11, Segmentation fault.

warning: current_sos: Can't read pathname for load map: Input/output error

Reading symbols from /usr/local/lib/libcdda_interface.so.0...done.
Loaded symbols for /usr/local/lib/libcdda_interface.so.0
Reading symbols from /usr/local/lib/libcdda_paranoia.so.0...done.
Loaded symbols for /usr/local/lib/libcdda_paranoia.so.0
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  0x400482b3 in i_paranoia_overlap (buffA=0x40b8a008, buffB=0x807d6f0,
    offsetA=100348, offsetB=27954, sizeA=99032, sizeB=1400,
    ret_begin=0xbfffe164, ret_end=0xbfffe160) at paranoia.c:98
98          if(buffA[beginA]!=buffB[beginB])break;
(gdb) bt
#0  0x400482b3 in i_paranoia_overlap (buffA=0x40b8a008, buffB=0x807d6f0,
    offsetA=100348, offsetB=27954, sizeA=99032, sizeB=1400,
    ret_begin=0xbfffe164, ret_end=0xbfffe160) at paranoia.c:98
#1  0x40046a29 in i_stage2_each (root=0x8077f04, v=0x807b6f8,
    callback=0x8049742) at paranoia.c:628
#2  0x40047269 in i_stage2 (p=0x8077f00, beginword=318486672,
    endword=318525480, callback=0x8049742) at paranoia.c:850
#3  0x40047e20 in paranoia_read_limited (p=0x8077f00, callback=0x8049742,
    max_retries=20) at paranoia.c:1225
#4  0x0804ab7c in ?? ()
#5  0x08077f00 in ?? ()
#6  0x08049742 in ?? ()
#7  0x00000014 in ?? ()
#8  0x00000003 in ?? ()
#9  0x40bb9a98 in ?? ()
#10 0x12fbb88f in ?? ()
(gdb) q
$

The disc is Sierra's Starsiege, a multi-session disc with game data in the firt session and CDDA in the second.
Comment 14 Joel Parker 2004-09-14 17:54:23 UTC
Actually, wait a sec. I noticed in the debug output that it's using libs in /usr/local/lib, which belong to another version of cdparanoia I've been tinkering with. How do I make it use the libs in /usr/lib?
Comment 15 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-14 19:26:21 UTC
well you could remove the libs in /usr/local/lib so it's forced to use the ones in /usr/lib...
Comment 16 Joel Parker 2004-09-15 21:41:51 UTC
Well, I removed the libs in /usr/local/lib, and now it appears to be working fine... This is the same disc and the same setup as before.

$ cdparanoia -B -v
cdparanoia III release 9.8 (March 23, 2001)
(C) 2001 Monty <monty@xiph.org> and Xiphophorus

Report bugs to paranoia@xiph.org
http://www.xiph.org/paranoia/

Checking /dev/cdrom for cdrom...
        Testing /dev/cdrom for cooked ioctl() interface
                CDROM sensed: ATAPI compatible PHILIPS DVD+RW SDVD6004


Verifying drive can read CDDA...
        Expected command set reads OK.

Table of contents (audio tracks only):
track        length               begin        copy pre ch
===========================================================
  2.    10533 [02:20.33]   264854 [58:51.29]    no   no  2
  3.    13450 [02:59.25]   275387 [61:11.62]    no   no  2
  4.    10174 [02:15.49]   288837 [64:11.12]    no   no  2
  5.    11646 [02:35.21]   299011 [66:26.61]    no   no  2
TOTAL   45803 [10:10.53]    (audio only)

Ripping from sector  264854 (track  2 [0:00.00])
          to sector  310656 (track  5 [2:35.20])

outputting to track02.cdda.wav

 (== PROGRESS == [               +              *| 275386 00 ] == :^D * ==)

outputting to track03.cdda.wav

 (== PROGRESS == [                +          +++*| 288836 00 ] == :^D * ==)

outputting to track04.cdda.wav

 (== PROGRESS == [+  ++   +  ++++++++++++++    +*| 299010 00 ] == :^D * ==)

outputting to track05.cdda.wav

 (== PROGRESS == [  ++++++++++++ + + +++++++++++*| 310656 00 ] == :^D * ==)

Done.


$
Comment 17 Joel Parker 2004-09-16 07:07:41 UTC
Slight caveat here. After the previous test, I put in The Beatles - 1 and started ripping it. It started out fine, but had gone down to 0.2x by track 21. By track 27, it had stalled. It appears that the tracks (besides 27) came out fine, though.

I re-ripped just track 27, and watched it go from 4-6x to 0.1x by mid-song. I'm going to leave it going all day to see if it actually produces a good rip.
Comment 18 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-16 13:09:19 UTC
this sounds like a mechanical problem to me...
Comment 19 Joel Parker 2004-09-16 15:35:32 UTC
Well, if I turn off paranoia (-Z), it works fine. That wouldn't happen if it was a mechanical problem.
Comment 20 Joel Parker 2004-09-20 11:09:43 UTC
Well, this stalling-on-the-last-track problem seems to come and go. I've been ripping a few cds during the past couple days, and most have been fine. Sometimes it just plain stalls on the last track, though, for unknown reasons. When I turn off paranoia, it rips fine.

When this problem came up again, I realized DMA was off on my CD drive, but turning it on didn't help.
Comment 21 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-24 02:41:13 UTC
I'm sorry, but I can't really help you out here... I have never heard of a problem like this from anyone else, and I don't really have the resources to help you out here... maybe you can get better help on the forums, sorry...