libcdio-help
[Top][All Lists]
Advanced

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

[Libcdio-help] libcdio-0.78.2 fails with adaptec and plextor on linux 2.


From: R. Bernstein
Subject: [Libcdio-help] libcdio-0.78.2 fails with adaptec and plextor on linux 2.6.21.3
Date: Sun, 27 May 2007 11:07:02 -0400

Attached is a patch that may fix the segfault problem. 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.

Attachment: cdfree-bug.diff
Description: fix bug in trying to free cd-text when it is not initialized

BuraphaLinux Server writes:
 > Version:libcdio-0.78.2
 > 
 > Problem:
 > 
 >    The libcdio library cannot work with my computer.  Originally the problem
 > was thought to be xmms2, but the developers helped me find the problem.
 > We tried several different audio CDs and that makes no difference.
 > Finally they supplied a small sample program that demonstrates the problem
 > to help you with debugging the libcdio library.  The original cdparanoia can
 > rip a track, but the cd-paranoia from libcdio cannot (it segfaults).  The cd
 > used while running this sample is known good, plays fine on ide systems,
 > and cdparanoia-III-alpha9.8 can rip tracks from it on my computer which
 > then can play fine, but everything that uses libcdio does not work.  If you
 > need more data, please tell me.
 > 
 > Sample program:
 > -----8<   cut here   8<----
 > /* Author: Eclipser from xmms2 irc
 >    gcc -Wextra -Wall -ansi -pedantic $(pkg-config --libs --cflags
 > libcdio_cdda) cdio.c
 >    ./a.out /dev/sr0
 >  */
 > #include <cdio/cdda.h>
 > #include <stdlib.h>
 > #include <stdio.h>
 > 
 > CdIo_t*
 > open_cd( char const* device );
 > 
 > cdrom_drive_t*
 > open_cdda( CdIo_t* cdio );
 > 
 > int
 > main( int argc, char** argv )
 > {
 >     CdIo_t* cdio = NULL;
 >     cdrom_drive_t* drive = NULL;
 >     if( argc != 2 ) {
 >         printf( "No drive specified.\n" );
 >         return EXIT_FAILURE;
 >     }
 > 
 >     cdio = open_cd( argv[1] );
 >     if( !cdio ) {
 >         return EXIT_FAILURE;
 >     }
 > 
 >     drive = open_cdda( cdio );
 >     cdio_cddap_close_no_free_cdio( drive );
 >     cdio_destroy( cdio );
 > 
 >     return EXIT_SUCCESS;
 > 
 > }
 > 
 > CdIo_t*
 > open_cd( char const* device )
 > {
 > 
 >     CdIo_t* cdio = NULL;
 >     printf( "Trying to open device '%s', using default access
 > mode.\n", device );
 > 
 >     cdio = cdio_open( device, DRIVER_DEVICE );
 > 
 >     if( !cdio ) {
 >         printf( "Failed to open device '%s'.\n", device );
 >     }
 > 
 >     return cdio;
 > 
 > }
 > 
 > cdrom_drive_t*
 > open_cdda( CdIo_t* cdio )
 > {
 >     cdrom_drive_t* drive = cdio_cddap_identify_cdio( cdio, 1, NULL );
 >     if( !drive ) {
 >         printf( "Failed to identify drive.\n" );
 >         return NULL;
 >     }
 > 
 >     if( cdio_cddap_open( drive ) ) {
 >         printf( "Unable to open disc.\n" );
 >         cdio_cddap_close_no_free_cdio( drive );
 >         return NULL;
 >     }
 > 
 >     return drive;
 > }
 > -----8<   cut here   8<----
 > 
 > Output of sample program on my system:
 > 
 > bash-3.2$ gdb a.out
 > GNU gdb 6.6
 > Copyright (C) 2006 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 "i586-pc-linux-gnu"...
 > Using host libthread_db library "/lib/libthread_db.so.1".
 > (gdb) r /dev/sr0
 > Starting program: /home/zappaman/a.out /dev/sr0
 > Trying to open device '/dev/sr0', using default access mode.
 > Checking /dev/sr0 for cdrom...
 >                 CDROM sensed:  d7  SCSI CD-ROM
 > 
 > ++ WARN: error in ioctl CDROMREADTOCENTRY for track 165: No medium found
 > 
 > 
 > Attempting to determine drive endianness from data...
 >         Cannot determine CDROM drive endianness.
 > 
 > Program received signal SIGSEGV, Segmentation fault.
 > 0xb7e45d27 in free () from /lib/libc.so.6
 > (gdb) bt
 > #0  0xb7e45d27 in free () from /lib/libc.so.6
 > #1  0xb7f21322 in cdtext_destroy () from /usr/lib/libcdio.so.7
 > #2  0xb7f1f725 in cdio_generic_free () from /usr/lib/libcdio.so.7
 > #3  0xb7f21900 in cdio_destroy () from /usr/lib/libcdio.so.7
 > #4  0x080486a1 in main ()
 > (gdb) q
 > The program is running.  Exit anyway? (y or n) y
 > bash-3.2$
 > 
 > Kernel information:
 > 
 > uname -a
 > Linux linux.cs.buu.ac.th 2.6.21.3 #1 SMP Sun May 27 16:53:53 ICT 2007
 > i686 pentium4 i386 GNU/Linux
 > sg is loaded and is modular, the other SCSI stuff for adaptec and hard
 > disk and cdrom drivers are compiled in.
 > 
 > Hardware:
 > 
 > cat /proc/scsi/scsi
 > Attached devices:
 > Host: scsi0 Channel: 00 Id: 00 Lun: 00
 >   Vendor: SEAGATE  Model: ST336706LW       Rev: 010A
 >   Type:   Direct-Access                    ANSI  SCSI revision: 03
 > Host: scsi0 Channel: 00 Id: 05 Lun: 00
 >   Vendor: PLEXTOR  Model: CD-R   PX-W4012S Rev: 1.01
 >   Type:   CD-ROM                           ANSI  SCSI revision: 02
 > 
 > kernel log output for SCSI at boot time from /var/log/messages:
 > 
 > scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 7.0
 > scsi 0:0:0:0: Direct-Access     SEAGATE  ST336706LW       010A PQ: 0 ANSI: 3
 >  target0:0:0: Beginning Domain Validation
 >  target0:0:0: wide asynchronous
 >  target0:0:0: FAST-20 WIDE SCSI 40.0 MB/s ST (50 ns, offset 63)
 >  target0:0:0: Domain Validation skipping write tests
 >  target0:0:0: Ending Domain Validation
 > scsi 0:0:5:0: CD-ROM            PLEXTOR  CD-R   PX-W4012S 1.01 PQ: 0 ANSI: 2
 >  target0:0:5: Beginning Domain Validation
 >  target0:0:5: FAST-20 SCSI 20.0 MB/s ST (50 ns, offset 15)
 >  target0:0:5: Domain Validation skipping write tests
 >  target0:0:5: Ending Domain Validation
 > SCSI device sda: 71687370 512-byte hdwr sectors (36704 MB)
 > sda: Write Protect is off
 > SCSI device sda: write cache: disabled, read cache: enabled, supports
 > DPO and FUA
 > SCSI device sda: 71687370 512-byte hdwr sectors (36704 MB)
 > sda: Write Protect is off
 > SCSI device sda: write cache: disabled, read cache: enabled, supports
 > DPO and FUA
 >  sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 sda8 >
 > sd 0:0:0:0: Attached scsi disk sda
 > Uniform CD-ROM driver Revision: 3.20
 > 
 > 
 > _______________________________________________
 > Libcdio-help mailing list
 > address@hidden
 > http://lists.gnu.org/mailman/listinfo/libcdio-help
 > 

reply via email to

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