Bug 121218 - cdparanoia with SCSI fails on recent kernels (no sg)
Summary: cdparanoia with SCSI fails on recent kernels (no sg)
Alias: None
Product: Fedora
Classification: Fedora
Component: cdparanoia   
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: Peter Jones
QA Contact:
: 122551 123280 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2004-04-19 11:43 UTC by Ralf Ertzinger
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-08 13:28:15 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
strace cdparanoia on plextor drive (6.79 KB, text/plain)
2004-04-20 20:07 UTC, Ralf Ertzinger
no flags Details
strace on plextor drive (working) (166.38 KB, text/plain)
2004-04-21 09:58 UTC, Ralf Ertzinger
no flags Details
cdparanoia on plextor drive (working, long form) (52.99 KB, application/octet-stream)
2004-04-22 16:30 UTC, Ralf Ertzinger
no flags Details

Description Ralf Ertzinger 2004-04-19 11:43:21 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312

Description of problem:
On recent kernel releases, the scsi generic device is no longer
available for CDROM devices (see bug

Due to this, cdparanoia fails to work:

[sun@nausicaa ~ :( (1) 6]$ cdparanoia -vsQ
cdparanoia III release 9.8 (March 23, 2001)
(C) 2001 Monty <monty@xiph.org> and Xiphophorus

Report bugs to paranoia@xiph.org

Checking /dev/cdrom for cdrom...
        Testing /dev/cdrom for cooked ioctl() interface
                /dev/scd0 is not a cooked ioctl CDROM.
        Testing /dev/cdrom for SCSI interface
Error trying to open /dev/sg0 exclusively (No such device or address).
retrying in 1 second.
Error trying to open /dev/sg0 exclusively (No such device or address).
retrying in 1 second.
Error trying to open /dev/sg0 exclusively (No such device or address).
retrying in 1 second.
Error trying to open /dev/sg0 exclusively (No such device or address).
retrying in 1 second.

It might have to be rewritten to use SG_IO on the cdrom device.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Use cdparanoia on a SCSI cdrom with current kernels

Actual Results:  Error messages about scsi generic

Expected Results:  Successful ripping

Additional info:

Comment 1 Peter Jones 2004-04-20 15:39:13 UTC
There are packages that use SG_IO at
http://people.redhat.com/pjones/cdparanoia/ .

The patch is experimental, and I'd like more feedback before making
such an invasive change to the tree.

Comment 2 Ralf Ertzinger 2004-04-20 20:05:59 UTC
Works in 2 cases out of 3.

The failing drive is a Plextor PX-40TS (1.05 firmware). strace from
cdparanoia is attached.

Comment 3 Ralf Ertzinger 2004-04-20 20:07:01 UTC
Created attachment 99574 [details]
strace cdparanoia on plextor drive

Comment 4 Ralf Ertzinger 2004-04-21 09:56:26 UTC
The same drive works with kernel-2.6.4-1.300 and
cdparanoia-alpha9.8-20.1. strace attached.

Comment 5 Ralf Ertzinger 2004-04-21 09:58:57 UTC
Created attachment 99589 [details]
strace on plextor drive (working)

Comment 6 Peter Jones 2004-04-21 18:45:29 UTC
Any chance I can get you to rerun that last one with "strace -s3000"?

Comment 7 Ralf Ertzinger 2004-04-22 16:29:29 UTC
Attached. I reduced cdparanoia to read the first ten sectors of the track.

Comment 8 Ralf Ertzinger 2004-04-22 16:30:24 UTC
Created attachment 99635 [details]
cdparanoia on plextor drive (working, long form)

Comment 9 Ralf Ertzinger 2004-04-29 17:51:31 UTC
cdparanoia sometimes kicks the current CDROM from the bus (resetting
the whole bus in the process). See

Comment 10 Peter Jones 2004-05-17 15:27:11 UTC
*** Bug 123280 has been marked as a duplicate of this bug. ***

Comment 11 Dams 2004-05-19 18:04:24 UTC
Peter, please, take a look at bug #123618 .. related ? unrelated ?

Comment 12 Peter Jones 2004-05-21 19:23:51 UTC
*** Bug 122551 has been marked as a duplicate of this bug. ***

Comment 13 Jürgen Botz 2004-05-21 19:47:46 UTC
You can spare yourself the straces... we KNOW what the problem is. 
It's that arjanv@redhat.com deliberately broke the sg interface.  He
decided that sg should be deprecated because the other scsi devices
can now fill the same function so sg now no longer attaches to drives
that are already claimed by another driver (sd, sr).

arjanv did this despite my and others pointing out that there are
still applications that rely on sg and can't be forced to use i.e.
/dev/scd0 the way cdrecord can.  See fedora-devel and fedora-test for
this history on this.

The solution is to fix cdrecord and grip to do SG_IO on the regular
cdrom device.  (Right even if you give "-g /dev/scd0" it doesn't do
the right thing, but I haven't looked at the code to see why.)

Although the above is the correct solution that doesn't absolve arjan
from knowingly breaking these apps late in the Fedora 2 release cycle,
which has me really down on the whole RedHat / Fedora thing.

Comment 14 Peter Jones 2004-05-21 19:59:28 UTC
Jurgen, I'd really rather get cdparanoia up to snuff with SG_IO than
have to read political posts in my bugzillas.

So if you wouldn't mind, testing the packages linked to above is fair
game, let me know any problems whatsoever.  Complaining about removal
of sg is an argument for some other venue.  As far as I'm concerned,
sg is depricated, and the bug is that cdparanoia in fc2 is still using it.

Comment 15 Peter Jones 2004-05-21 20:18:50 UTC
Dams, I think 123618 is related, but I'm going to leave it seperate
until I get a chance to push another package with a fix in it, and
then see if _this_ problem still occurs.

Comment 16 Jürgen Botz 2004-05-23 22:37:51 UTC
Peter, your SG_IO cdparanoia packages work for me.

Comment 17 Ralf Ertzinger 2004-10-08 13:28:15 UTC
cdparanoia and the kernel seem to have settled down, I have no more
obvious problems.

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