[opensuse-factory] cdparanoia, kernel 5.6.0rc2 and no SG_IO support for device /dev/sr0
Hi, I'm testing the 5.6.0rc2 kernel from Kernel:HEAD with Tumbleweed and I noticed that cdparanoia doesn't work with it. I specified -d /dev/sr0 as usual in the command line to use the cdrom device but with kernel 5.6.0rc2 it returns: "Error trying to open /dev/sga exclusively (No such file or directory)" And in verbose mode it adds: Testing /dev/sr0 for SCSI/MMC interface no SG_IO support for device: /dev/sr0 With kernel 5.5.2 the same command line works fine. I checked that the sg module is loaded with both kernels and also did a diff of the lsmod output with both kernels and didn't find anything suspicious. Any idea? Btw, a small test application with code from cdparanoia (attached, build with `gcc test.c`) shows that the ioctl call is returning a different errno number in 5.5.2 (EINVAL) and 5.6.0rc2 (EFAULT). -- Antonio Larrosa
On Thursday 2020-02-20 14:07, Antonio Larrosa wrote:
I'm testing the 5.6.0rc2 kernel from Kernel:HEAD with Tumbleweed and I noticed that cdparanoia doesn't work with it. I specified -d /dev/sr0 as usual in the command line to use the cdrom device but with kernel 5.6.0rc2 it returns:
Btw, a small test application with code from cdparanoia (attached, build with `gcc test.c`) shows that the ioctl call is returning a different errno number in 5.5.2 (EINVAL) and 5.6.0rc2 (EFAULT).
So since it's demonstratably a kernel problem, report it upstream for faster handling? ;-) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Thu, Feb 20, 2020 at 02:17:55PM +0100, Jan Engelhardt wrote:
On Thursday 2020-02-20 14:07, Antonio Larrosa wrote:
I'm testing the 5.6.0rc2 kernel from Kernel:HEAD with Tumbleweed and I noticed that cdparanoia doesn't work with it. I specified -d /dev/sr0 as usual in the command line to use the cdrom device but with kernel 5.6.0rc2 it returns:
Btw, a small test application with code from cdparanoia (attached, build with `gcc test.c`) shows that the ioctl call is returning a different errno number in 5.5.2 (EINVAL) and 5.6.0rc2 (EFAULT).
So since it's demonstratably a kernel problem, report it upstream for faster handling? ;-)
Yes, the change of return value sounds wrong, especially to EFAULT. I vaguely recall some syscall reorganization so maybe something went wrong with that. You can also try to bisect. Thanks Michal -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 20/2/20 14:17, Jan Engelhardt wrote:
On Thursday 2020-02-20 14:07, Antonio Larrosa wrote:
I'm testing the 5.6.0rc2 kernel from Kernel:HEAD with Tumbleweed and I noticed that cdparanoia doesn't work with it. I specified -d /dev/sr0 as usual in the command line to use the cdrom device but with kernel 5.6.0rc2 it returns:
Btw, a small test application with code from cdparanoia (attached, build with `gcc test.c`) shows that the ioctl call is returning a different errno number in 5.5.2 (EINVAL) and 5.6.0rc2 (EFAULT).
So since it's demonstratably a kernel problem, report it upstream for faster handling? ;-)
For closure, here's the answer I got from upstream: A fix is on the works for this. The patch seems to be this one: https://marc.info/?l=linux-scsi&m=158213114410341&w=2 -- Antonio Larrosa -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Antonio Larrosa <alarrosa@suse.de> wrote:
I'm testing the 5.6.0rc2 kernel from Kernel:HEAD with Tumbleweed and I noticed that cdparanoia doesn't work with it. I specified -d /dev/sr0 as usual in the command line to use the cdrom device but with kernel 5.6.0rc2 it returns:
"Error trying to open /dev/sga exclusively (No such file or directory)"
And in verbose mode it adds:
Testing /dev/sr0 for SCSI/MMC interface no SG_IO support for device: /dev/sr0
cdparanoia is de-facto dead, it did not get any fix or enhancement since 2001, just a minor code maintenance in 2008. Even more: cdparanoia is no more than a patched cdda2wav source from 1997 that did never get any update and the code is not really portable. Simething that may be also important here is that cdparanoia splits the data at the wrong places when creating separate track images. The underlying basic idea and implementation is however still alive. In April 2002, I extracted the important parts of the cdparanoia program and created libparanoia by making the code highly portable and by fixing plenty of bugs. Some of these bugs caused even core dumps. At the same time, libparanoia is part of the official maintained cdda2wav program that offers much better extraction features than cdparanoia. Since then, the many code enhancements have been added (e.g. using defect information from the drive). I therefore recommand you to leave cdparanoia where it belongs and to switch to the maintained cdda2wav that is part of the cdrtools package since late 2000. Jörg -- EMail:joerg@schily.net (home) Jörg Schilling D-13353 Berlin joerg.schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/' -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 20/2/20 14:37, Joerg Schilling wrote:
Antonio Larrosa <alarrosa@suse.de> wrote:
I'm testing the 5.6.0rc2 kernel from Kernel:HEAD with Tumbleweed and I noticed that cdparanoia doesn't work with it. I specified -d /dev/sr0 as usual in the command line to use the cdrom device but with kernel 5.6.0rc2 it returns:
"Error trying to open /dev/sga exclusively (No such file or directory)"
And in verbose mode it adds:
Testing /dev/sr0 for SCSI/MMC interface no SG_IO support for device: /dev/sr0
cdparanoia is de-facto dead, it did not get any fix or enhancement since 2001, just a minor code maintenance in 2008.
I just noticed that when I went to their (svn!) repository to see if there was any recent patch from upstream... I guess I better not wait for it :) .
Even more: cdparanoia is no more than a patched cdda2wav source from 1997 that did never get any update and the code is not really portable. Simething that may be also important here is that cdparanoia splits the data at the wrong places when creating separate track images.
The underlying basic idea and implementation is however still alive.
In April 2002, I extracted the important parts of the cdparanoia program and created libparanoia by making the code highly portable and by fixing plenty of bugs. Some of these bugs caused even core dumps. At the same time, libparanoia is part of the official maintained cdda2wav program that offers much better extraction features than cdparanoia.
Since then, the many code enhancements have been added (e.g. using defect information from the drive).
I therefore recommand you to leave cdparanoia where it belongs and to switch to the maintained cdda2wav that is part of the cdrtools package since late 2000.
Thanks for the history lesson. I'm afraid I've been using cdparanoia for too long and didn't know all of that. I just noticed the -paranoia option in cdda2wav so I'll use that. Btw, running 'LANG=C sudo cdda2wav -D /dev/sr0", it says: cdda2wav: Invalid argument. Illegal value for busno, target or lun '-1,208,11'. Cannot open or use SCSI driver. cdda2wav: For possible targets try 'cdda2wav -scanbus'. (the 2nd and 3rd lun numbers seem to be random each time it's run) But at least cdda2wav works with the 5.6.0rc2 kernel when using "-D 4,0,0" to specify the device . Thanks! -- Antonio Larrosa -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Antonio Larrosa <alarrosa@suse.de> wrote:
Thanks for the history lesson. I'm afraid I've been using cdparanoia for too long and didn't know all of that. I just noticed the -paranoia option in cdda2wav so I'll use that.
Btw, running 'LANG=C sudo cdda2wav -D /dev/sr0", it says:
cdda2wav does not need to run as root once it has been installed with the right fine grained permissions: setcap cap_sys_resource,cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_ipc_lock,cap_sys_rawio+ep /opt/schily/bin/cdrecord setcap cap_dac_override,cap_sys_admin,cap_sys_nice,cap_net_bind_service,cap_sys_rawio+ep /opt/schily/bin/cdda2wav setcap cap_dac_override,cap_sys_admin,cap_net_bind_service,cap_sys_rawio+ep /opt/schily/bin/readcd and note that /dev/sr0 is an unsupported device name on Linux because even if it worked, you could enforce libscg to use a bad driver even though a better driver may be present. BTW: LANG is only a fallback environment that has been used as the main control for localization on SunOS in the 1980s....
cdda2wav: Invalid argument. Illegal value for busno, target or lun '-1,208,11'. Cannot open or use SCSI driver. cdda2wav: For possible targets try 'cdda2wav -scanbus'.
This may be caused by a bug in the linux kernel. The linux kernel folks like to destroy SCSI interfaces from time to time in order to annoy me.
(the 2nd and 3rd lun numbers seem to be random each time it's run)
But at least cdda2wav works with the 5.6.0rc2 kernel when using "-D 4,0,0" to specify the device .
Well, if you only have one CD drive in the system, there is no need to specify a device at all. Jörg -- EMail:joerg@schily.net (home) Jörg Schilling D-13353 Berlin joerg.schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/' -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (4)
-
Antonio Larrosa
-
Jan Engelhardt
-
Joerg Schilling
-
Michal Suchánek