libcdio-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libcdio-help] Re: libcdio-0.78.2 fails with adaptec and plextor on linu


From: R. Bernstein
Subject: [Libcdio-help] Re: libcdio-0.78.2 fails with adaptec and plextor on linux 2.6.21.3
Date: Sun, 27 May 2007 13:35:48 -0400 (EDT)
User-agent: SquirrelMail/1.4.9a

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 <address@hidden> 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
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/libcdio-help
>>
>

Attachment: scan_devices.c.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]