Re: K3b 1.0.1 eject problem

[email protected]
Newsgroups gmane.comp.kde.k3b
Message-ID <[email protected]>
What I forgot to mention about my system is (I have):
- Pioneer DVD-305S (a SCSI DVD-ROM, only to read, with disc loading slot)
- Adaptec SCSI Card 29160 Ultra160 SCSI Controller

The output from K3b (DVD+R (VIDEO)) only with your patch (devicehandler.diff) 
ist attached to this mail below.

I attach also a patch (k3bdevice.diff), with which I can now eject and quit 
K3b properly (it is an expedient for me).

Am Montag, 18. Juni 2007 11:39 schrieb Sebastian Trüg:
> Sorry for the delay.
>
> On Saturday 12 May 2007 01:14:35 [email protected] wrote:
> > With the following change a new DVD+R DL (VIDEO) disk is ejected after
> > the burn process is completed.
> >
> > One can quit k3b, but it is still running in the background and "xkill
> > k3b" doesn't help to finish k3b.
>
> Is this without your patch? And does the output from your other mail come
> from a K3b run with or without your patch?
This is with my patch. The output from the other mail comes from a K3b run 
without my patch.
>
> > I don't know if the change has harmful effect  on other things during the
> > burning process.
> >
> > --- ./libk3bdevice/k3bdevice.cpp
> > +++ ./libk3bdevicek3bdevice.cpp
> > @@ -1677,7 +1677,7 @@
> >    if( d->openedReadWrite != write )
> >      close();
> >
> > -  d->mutex.lock();
> > +  //d->mutex.lock();
> >
> >    d->openedReadWrite = write;
>
> This is very weird. I tried to find the reason but was not able to.
> Could you please apply the attached patch and reproduce the output from
> your other mail without your patch. Then I can see if the eject command
> goes through or not.
> Cheers,
> Sebastian
Output from K3b:
************
cancel + manual eject + xkill (DVD+R (VIDEO))
************

...@..:~> k3b
...@..:~> kdecore (KAction): WARNING: KActionCollection::KActionCollection( 
QObject *parent, const char *name, KInstance *instance )
k3b: (K3bCdrecordProgram) could not start /opt/schily/bin
k3b: (K3bMkisofsProgram) could not start /opt/schily/bin
k3b: (K3bExternalBinManager) Cdrecord 1.0pre1 features: wodim, gracetime, 
overburn, cdtext, clone, tao, cuefile, xamix, suidroot, plain-atapi, 
hacked-atapi, short-track-raw, audio-stdin, burnfree
(K3bDevice::HalConnection) initializing HAL >= 0.5
Mapping udi /org/freedesktop/Hal/devices/storage_model_DVD_ROM_DVD_305 to 
device /dev/sr0
Mapping udi /org/freedesktop/Hal/devices/storage_serial_202515 to 
device /dev/hdc
/dev/sr0 resolved to /dev/sr0
/dev/sr0 is block device (0)
/dev/sr0 seems to be cdrom
bus: 0, id: 4, lun: 0
(K3bDevice::Device) /dev/sr0: init()
(K3bDevice::ScsiCommand) failed:
                           command:    MODE SENSE (5a)
                           errorcode:  70
                           sense key:  ILLEGAL REQUEST (5)
                           asc:        24
                           ascq:       0
(K3bDevice::Device) /dev/sr0: MODE SENSE length det failed.
(K3bDevice::ScsiCommand) failed:
                           command:    MODE SENSE (5a)
                           errorcode:  70
                           sense key:  ILLEGAL REQUEST (5)
                           asc:        24
                           ascq:       0
(K3bDevice::Device) /dev/sr0: MODE SENSE with real length 65535 failed.
(K3bDevice::Device) /dev/sr0: modeSense 0x05 failed!
(K3bDevice::Device) /dev/sr0: Cannot check write modes.
(K3bDevice::ScsiCommand) failed:
                           command:    MODE SENSE (5a)
                           errorcode:  70
                           sense key:  ILLEGAL REQUEST (5)
                           asc:        24
                           ascq:       0
(K3bDevice::Device) /dev/sr0: MODE SENSE length det failed.
(K3bDevice::ScsiCommand) failed:
                           command:    MODE SENSE (5a)
                           errorcode:  70
                           sense key:  ILLEGAL REQUEST (5)
                           asc:        24
                           ascq:       0
(K3bDevice::Device) /dev/sr0: MODE SENSE with real length 65535 failed.
/dev/hdc resolved to /dev/hdc
/dev/hdc is block device (0)
/dev/hdc seems to be cdrom
(K3bDevice::Device) /dev/hdc: init()
(K3bDevice::Device) /dev/hdc feature: CD Mastering
(K3bDevice::Device) /dev/hdc feature: CD Track At Once
(K3bDevice::Device) /dev/hdc feature: CD-RW Media Write Support
(K3bDevice::Device) /dev/hdc feature: DVD+R
(K3bDevice::Device) /dev/hdc feature: DVD+RW
(K3bDevice::Device) /dev/hdc feature: DVD+R Double Layer
(K3bDevice::Device) /dev/hdc feature: DVD-R/-RW Write
(K3bDevice::Device) /dev/hdc feature: Rigid Restricted Overwrite
(K3bDevice::Device) /dev/hdc feature: Layer Jump Recording
(K3bDevice::Device) /dev/hdc: dataLen: 60
(K3bDevice::Device) /dev/hdc: checking for TAO
(K3bDevice::Device) /dev/hdc: checking for SAO
(K3bDevice::Device) /dev/hdc: checking for SAO_R96P
(K3bDevice::Device) /dev/hdc: checking for SAO_R96R
(K3bDevice::Device) /dev/hdc: checking for RAW_R16
(K3bDevice::Device) /dev/hdc: checking for RAW_R96P
(K3bDevice::Device) /dev/hdc: checking for RAW_R96R
(K3bDevice::Device) /dev/hdc:  Number of supported write speeds via GET 
PERFORMANCE: 4
(K3bDevice::Device) /dev/hdc : 22160 KB/s
(K3bDevice::Device) /dev/hdc : 16620 KB/s
(K3bDevice::Device) /dev/hdc : 11080 KB/s
(K3bDevice::Device) /dev/hdc : 8310 KB/s
(K3bDevice::DeviceManager) setting current write speed of device /dev/hdc to 
22160
k3b: [void K3bMediaCache::clearDeviceList()]
/dev/sr0 resolved to /dev/sr0
(K3bDevice::DeviceManager) dev /dev/sr0 already found
/dev/hdc resolved to /dev/hdc
(K3bDevice::DeviceManager) dev /dev/hdc already found
(K3bDevice::DeviceManager) found config entry for devicetype: PIONEER DVD-ROM 
DVD-305
(K3bDevice::DeviceManager) found config entry for devicetype: PLEXTOR DVDR   
PX-760A
k3b: (K3bCdrecordProgram) could not start /opt/schily/bin
k3b: (K3bMkisofsProgram) could not start /opt/schily/bin
k3b: (K3bExternalBinManager) Cdrecord 1.0pre1 features: wodim, gracetime, 
overburn, cdtext, clone, tao, cuefile, xamix, suidroot, plain-atapi, 
hacked-atapi, short-track-raw, audio-stdin, burnfree
Devices:
------------------------------
Blockdevice:    /dev/sr0
Generic device:
Vendor:         PIONEER
Description:    DVD-ROM DVD-305
Version:        1.06
Write speed:    0
Profiles:       DVD-ROM, CD-ROM
Read Cap:       DVD-ROM, CD-ROM
Write Cap:      Error
Writing modes:  None
Reader aliases: /dev/sr0
------------------------------
Blockdevice:    /dev/hdc
Generic device:
Vendor:         PLEXTOR
Description:    DVDR   PX-760A
Version:        1.00
Write speed:    8400
Profiles:       DVD-ROM, DVD-R Sequential, DVD-R Dual Layer Sequential, DVD-R 
Dual Layer Jump, DVD-RW Restricted Overwrite, DVD-RW Sequential, DVD+RW, 
DVD+R, DVD+R Dual Layer, CD-ROM, CD-R, CD-RW
Read Cap:       DVD-ROM, DVD-R, DVD-R Sequential, DVD-R Dual Layer, DVD-R Dual 
Layer Sequential, DVD-R Dual Layer Jump, DVD-RW, DVD-RW Restricted Overwrite, 
DVD-RW Sequential, DVD+RW, DVD+R, DVD+R Dual Layer, CD-ROM, CD-R, CD-RW
Write Cap:      DVD-R, DVD-R Sequential, DVD-R Dual Layer, DVD-R Dual Layer 
Sequential, DVD-R Dual Layer Jump, DVD-RW, DVD-RW Restricted Overwrite, 
DVD-RW Sequential, DVD+RW, DVD+R, DVD+R Dual Layer, CD-R, CD-RW
Writing modes:  SAO, TAO, RAW, SAO/R96P, SAO/R96R, RAW/R16, RAW/R96P, 
RAW/R96R, Restricted Overwrite, Layer Jump
Reader aliases: /dev/hdc
------------------------------
kdecore (KAction): WARNING: KActionCollection::operator+=(): function is 
severely deprecated.
First sec data area: 43:41:33 (LBA 196608) (402653184
Last sec data area: 553:42:61 (LBA 2491711) (5103024128 Bytes)
Last sec layer 1: 00:00:00 (LBA 0) (0 Bytes)
Layer 1 length: 00:00:01 (LBA 1) (2048 Bytes)
Layer 2 length: 553:42:61 (LBA 2491711) (5103024128 Bytes)
k3b: (K3bMedium) found medium:
k3b: =====================================================
DiskInfo:
Mediatype:       DVD+R
Current Profile: DVD+R
Disk state:      empty
Empty:           1
Rewritable:      0
Appendable:      0
Sessions:        0
Tracks:          0
Layers:          1
Capacity:        510:01:29 (LBA 2295104) (4700372992 Bytes)
Remaining size:  510:01:29 (LBA 2295104) (4700372992 Bytes)
Used Size:       00:00:00 (LBA 0) (0 Bytes)
k3b: =====================================================
(K3bDevice::Device) /dev/hdc:  Number of supported write speeds via GET 
PERFORMANCE: 4
(K3bDevice::Device) /dev/hdc : 22160 KB/s
(K3bDevice::Device) /dev/hdc : 16620 KB/s
(K3bDevice::Device) /dev/hdc : 11080 KB/s
(K3bDevice::Device) /dev/hdc : 8310 KB/s
k3b: (K3bFileTreeView::addCdDeviceBranches)
k3b: (K3bFileTreeView::addCdDeviceBranches) done
k3b: (K3bFileTreeView::addCdDeviceBranches)
k3b: (K3bFileTreeView::addCdDeviceBranches) done
k3b: kernel version: 2.6.18.2-34-default
k3b: (K3bCore) System problems:
k3b:           - none -
k3b: (K3bProjectManager) adding doc /VideoDVD0
k3b: K3bIso9660::openArchive no volume descriptors
k3b: (K3bDataUrlAddingDialog) using locale codec: UTF-8
k3b: (K3bThreadJob) waiting for the thread to finish.
k3b: (K3bThreadJob) thread finished.
k3b: kernel version: 2.6.18.2-34-default
k3b: (K3bThreadJob) waiting for the thread to finish.
k3b: (K3bThreadJob) thread finished.
k3b: (K3bVideoDvdImager) creating temp dir: /tmp/kde-.../k3bVideoDvd0
k3b: (K3bIsoImager) creating dummy 
dir: /home/.../.kde/share/apps/k3b/temp/1065726465000118217360000000045840017_0/dummydir_0
k3b: ***** mkisofs calculate size parameters:
k3b: /usr/bin/mkisofs -gui -graft-points -print-size -quiet -volid 
VIDEO_TS -volset  -appid K3B THE CD KREATOR (C) 1998-2006 SEBASTIAN TRUEG AND 
THE K3B TEAM -publisher  -preparer  -sysid LINUX -volset-size 1 -volset-seqno 
1 -sort /tmp/kde-.../k3bo0oBEb.tmp -no-cache-inodes -udf -iso-level 
1 -path-list /tmp/kde-.../k3bUEmvIa.tmp -dvd-video -f /tmp/kde-.../k3bVideoDvd0
k3b: (K3bIsoImager) iso size: 2166113
k3b: (K3bEmptyDiscWaiter) slotMediumChanged()
k3b: (K3bEmptyDiscWaiter) finishWaiting()
k3b: ***** growisofs parameters:
k3b: /usr/bin/growisofs -Z /dev/hdc=/dev/fd/0 -use-the-force-luke=notray -use-the-force-luke=tty -use-the-force-luke=tracksize:2166113 -use-the-force-luke=dao:2166113 -dvd-compat -speed=16 -use-the-force-luke=bufsize:32m 
k3b:
(K3bDevice::HalConnection) lock queued 
for /org/freedesktop/Hal/devices/storage_serial_202515
k3b: (K3bVideoDvdImager) creating temp dir: /tmp/kde-.../k3bVideoDvd0
k3b: (K3bIsoImager) creating dummy 
dir: /home/.../.kde/share/apps/k3b/temp/1065726465000118217360000000045840017_1/dummydir_0
k3b: (K3bActivePipe) successfully opened pipe.
k3b: ***** mkisofs parameters:
k3b: /usr/bin/mkisofs -gui -graft-points -volid VIDEO_TS -volset  -appid K3B 
THE CD KREATOR (C) 1998-2006 SEBASTIAN TRUEG AND THE K3B 
TEAM -publisher  -preparer  -sysid LINUX -volset-size 1 -volset-seqno 
1 -sort /tmp/kde-.../k3bmCViUb.tmp -no-cache-inodes -udf -iso-level 
1 -path-list /tmp/kde-.../k3bBV43wb.tmp -dvd-video -f /tmp/kde-.../k3bVideoDvd0
k3b: (K3bActivePipe) started thread.
k3b: (mkisofs) I: -input-charset not specified, using UTF-8 (detected in 
locale settings)
k3b: (growisofs) Executing 'builtin_dd if=/dev/fd/0 of=/dev/hdc obs=32k 
seek=0'
k3b: (growisofs) :-? the LUN appears to be stuck writing LBA=10h, keep 
retrying in 46ms
k3b: (growisofs) :-? the LUN appears to be stuck writing LBA=10h, keep 
retrying in 43ms
k3b: (mkisofs) Total translation table size: 0
k3b: (mkisofs) Total rockridge attributes bytes: 0
k3b: (mkisofs) Total directory bytes: 4248
k3b: (mkisofs) Path table size(bytes): 42
k3b: (mkisofs) Max brk space used 0
k3b: [virtual void K3bIsoImager::slotProcessExited(KProcess*)]
(K3bDevice::HalConnection) unlock queued 
for /org/freedesktop/Hal/devices/storage_serial_202515
k3b: (K3bDevice::DeviceHandler) starting command: 1024 --> the burn process 
ends here (one sees the message "Ejecting DVD", but the DVD+R (VIDEO) doesn't 
eject) <--
k3b: (K3bJobProgressDialog) received finished signal!
k3b: (K3bProjectBurnDialog) job done. cleaning up.
removing udi /org/freedesktop/Hal/devices/volume_empty_dvd_plus_r --> after 
the key: "Cancel" is pressed and manual eject, k3b comes until here; to quit 
k3b with the key "Quit" is not possible <--
k3b: [void K3bMediaCache::clearDeviceList()]
k3b: [void K3bMediaCache::clearDeviceList()]  waiting for info thread /dev/hdc 
to finish --> after "xkill", k3b comes until here <--

...@..:~>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
K3b-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/k3b-user
k3bdevice.diff (text/x-diff, 1.1 KB)
--- ./libk3bdevice/k3bdevice.cpp
+++ ./libk3bdevice/k3bdevice.cpp
@@ -109,6 +109,9 @@
 #if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD)
 int K3bDevice::openDevice( const char* name, bool write )
 {
+  QMutex mutex;
+  QMutexLocker locker(&mutex);
+
   int fd = -1;
   int flags = O_NONBLOCK;
   if( write )
@@ -1674,10 +1677,13 @@
 
 bool K3bDevice::Device::open( bool write ) const
 {
+  QMutex mutex;
+  QMutexLocker locker(&mutex);
+
   if( d->openedReadWrite != write )
     close();
 
-  d->mutex.lock();
+  //d->mutex.lock();
 
   d->openedReadWrite = write;
 
@@ -1688,7 +1694,7 @@
 	      << ((d->cam)?" succeeded.":" failed.") << endl;
   }
 
-  d->mutex.unlock();
+  //d->mutex.unlock();
 
   return (d->cam != 0);
 #endif
@@ -1696,7 +1702,7 @@
   if( d->deviceFd == -1 )
     d->deviceFd = openDevice( QFile::encodeName(devicename()), write );
 
-  d->mutex.unlock();
+  //d->mutex.unlock();
 
   return ( d->deviceFd != -1 );
 #endif
@@ -1726,6 +1732,9 @@
 
 bool K3bDevice::Device::isOpen() const
 {
+  QMutex mutex;
+  QMutexLocker locker(&mutex);
+
 #ifdef Q_OS_FREEBSD
   return d->cam;
 #endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.