With CDROM sensed problem you are coming across another place where
libcdio is accessing uninitialized data. The patch below should fix this.
The real problem is that the ioctls are failing. It probably has to do
with the fact that you have SCSI drives. Does cd-parnaoia (from libcdio)
show the tracks of the drive? Issue cd-paranoia -vsQ to see. And compare
with
Also interesting would be to compare the status of the ioctl's report, and
with that we need to know what device is used with that. On my system the
file descriptors are always 4 so we need the open that returns 4.
So try running these commands
strace cdparanoia -vsQ 2>&1 | grep -B 2 '^ioctl('
and libcdio's version:
strace cd-paranoia -vsQ 2>&1 | grep -B 2 '^ioctl('
For comparison, here's what I get on my GNU/Linux box where I don't have a
problem.
strace cdparanoia -vsQ 2>&1 | grep -B 2 '^ioctl('
close(4) = 0
open("/dev/hdc", O_RDONLY|O_NONBLOCK) = 4
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this line is important
ioctl(4, CDROMVOLREAD, 0xbff9a6c0) = 0
ioctl(4, 0x30d, 0x8058088) = 0
--
) = 58
ioctl(4, CDROMREADTOCHDR, 0xbff9a6ba) = 0
ioctl(4, CDROMREADTOCENTRY, 0xbff9a6ac) = 0
ioctl(4, CDROMREADTOCENTRY, 0xbff9a6ac) = 0
and
strace cd-paranoia -vsQ 2>&1 | grep -B 2 '^ioctl('
stat64("/dev/cdrom", {st_mode=S_IFBLK|0660, st_rdev=makedev(22, 0), ...}) = 0
open("/dev/cdrom", O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 4
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is helpful
ioctl(4, CDROM_GET_CAPABILITY or SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT, 0) =
2228207
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this line failed
ioctl(4, CDROMREADTOCHDR, 0x805ae0c) = 0
ioctl(4, CDROMREADTOCENTRY, 0x805a95c) = 0
ioctl(4, CDROMREADTOCENTRY, 0x805a968) = 0
ioctl(4, CDROMREADTOCENTRY, 0x805a974) = 0
ioctl(4, CDROMREADTOCENTRY, 0x805a980) = 0
ioctl(4, CDROMREADTOCENTRY, 0x805a98c) = 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ these lines didn't fail
> Hello,
>
> I have GNU libc 2.3.6 and use compiler GNU gcc 4.0.4. After
> applying your patch and rebuilding libcdio, the segfault problem is
> cured. However, my CD-ROM drive is still unusuable. The sample
> program output this:
>
> bash-3.2$ ./a.out /dev/sr0
> Trying to open device '/dev/sr0', using default access mode.
> Checking /dev/sr0 for cdrom...
> CDROM sensed: < SCSI CD-ROM
>
> ++ WARN: error in ioctl CDROMREADTOCHDR: No medium found
>
>
> Attempting to determine drive endianness from data...
> Cannot determine CDROM drive endianness.
> bash-3.2$
>
> On the line that says "CDROM sensed: < SCSI CD-ROM" the part between
> the colon and the word SCSI seems to be randomly changed each time I run
> the program. Here is the program run again just a second later with the
> same
> CD still in the drive:
> bash-3.2$ ./a.out /dev/sr0
> Trying to open device '/dev/sr0', using default access mode.
> Checking /dev/sr0 for cdrom...
> CDROM sensed: ÿÿÿÿÿÿÿÿ
> ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿ SCSI CD-ROM
>
> ++ WARN: error in ioctl CDROMREADTOCENTRY for track 162: No medium found
>
>
> Attempting to determine drive endianness from data...
> Cannot determine CDROM drive endianness.
> bash-3.2$
>
> Also note it is a different ioctl this time.
>
> JGH
>
> On 5/27/07, R. Bernstein <[EMAIL PROTECTED]> wrote:
>> I said..
>> > ... As for more
>> > information, well, the thing that may be interesting is the OS, OS
>> > release number, and version of libc (Standard C library) that you are
>> > using.
>>
>> About the OS and release number... Sorry I do see that. From this I
>> imagine that libc is also pretty new.
>>
>>
>>
>> _______________________________________________
>> Libcdio-help mailing list
>> [email protected]
>> http://lists.gnu.org/mailman/listinfo/libcdio-help
>>
>
Index: lib/cdda_interface/scan_devices.c
===================================================================
RCS file: /cvsroot/libcdio/libcdio/lib/cdda_interface/scan_devices.c,v
retrieving revision 1.30
diff -u -r1.30 scan_devices.c
--- lib/cdda_interface/scan_devices.c 25 Mar 2006 00:20:28 -0000 1.30
+++ lib/cdda_interface/scan_devices.c 27 May 2007 17:12:20 -0000
@@ -1,7 +1,7 @@
/*
$Id: scan_devices.c,v 1.30 2006/03/25 00:20:28 rocky Exp $
- Copyright (C) 2004, 2005 Rocky Bernstein <[EMAIL PROTECTED]>
+ Copyright (C) 2004, 2005, 2007 Rocky Bernstein <[EMAIL PROTECTED]>
Copyright (C) 1998 Monty [EMAIL PROTECTED]
This program is free software; you can redistribute it and/or modify
@@ -304,7 +304,9 @@
d->b_swap_bytes = true;
{
- cdio_hwinfo_t hw_info;
+ cdio_hwinfo_t hw_info = {
+ "UNKNOWN", "Unknown model", "????"
+ };
if ( mmc_get_hwinfo( p_cdio, &hw_info ) ) {
unsigned int i_len = strlen(hw_info.psz_vendor) _______________________________________________
Libcdio-help mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/libcdio-help