Bug 156684 - PATCH: k3b-1.0.4 hangs between writing and verifying a CD-R
Summary: PATCH: k3b-1.0.4 hangs between writing and verifying a CD-R
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: general (show other bugs)
Version: 1.91.0
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
: 142193 146536 147970 148413 149910 150727 151816 151875 154148 155152 155305 156683 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-26 01:22 UTC by A.C.Heron
Modified: 2013-03-20 18:44 UTC (History)
29 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Disable ejecting by cdrecord (492 bytes, patch)
2008-01-30 09:25 UTC, Sebastian Trueg
Details
Backtrace from frozen K3b (7.32 KB, text/plain)
2008-09-13 13:09 UTC, Stephan Sokolow
Details
k3b patch (kde3) (1.38 KB, patch)
2009-06-12 15:18 UTC, Lubos Lunak
Details
demonstrates generic device failure /dev/sg* as detected by k3b fails when passed to eject (1.34 KB, text/plain)
2013-03-20 18:44 UTC, Rob Townley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description A.C.Heron 2008-01-26 01:22:54 UTC
Version:           1.0.4 (using KDE 3.5.7)
Installed from:    Gentoo Packages
Compiler:          gcc 4.1.1 (Gentoo 4.1.1-r3) 
OS:                Linux

freshly installed k3b-1.0.4 with default settings works fine if the verification is unchecked in the burning dialog. If the verification is checked, the program writes the disk, ejects it and hangs. Reinserting the disk does not help. 

If "do not eject disk after writing" is checked too, verification does not hang.

Drive: Toshiba SD-R1202
Programs: Cdrdao 1.2.2, cdrecord 2.01.01a34, mkisofs 2.01.01a34, readcd 2.01.01a34, normalize 0.7.7. 
Kernel: 2.6.22-gentoo-r8 x86_64.
Comment 1 Sebastian Trueg 2008-01-30 09:25:09 UTC
Created attachment 23363 [details]
Disable ejecting by cdrecord

Please try if this patch solves the problem. It makes sure that K3b always does
the ejecting itself.
Comment 2 Ernst Kipfmüller 2008-02-25 11:10:18 UTC
I'm having the same problem, with a Samsung R60 Notebook. Obviously most Notebooks can't pull their tray in again after ejecting, so the user has to do it manually. I don't understand, why this bug can't easily be solved. If there is a burnt CD/DVD to be checked, after ejecting the CD/DVD, why not giving the user a chance to close the tray again. Should be easy enough, maybe the problem is k3b relying on wrong information from hardware drivers regarding the capabilities of the drive.
Comment 3 Rex Dieter 2008-02-25 15:50:16 UTC
*** Bug 151816 has been marked as a duplicate of this bug. ***
Comment 4 Rex Dieter 2008-02-25 15:50:56 UTC
confirmed, I'll give the patch a whirl.
Comment 5 D.L.C.Burggraaff 2008-03-02 17:27:51 UTC
For me the fix in comment #1 has no visible effect.
Without "Do not eject disk after writing" being checked, the "Reloading the medium" step is still skipped.
Comment 6 Ernst Kipfmüller 2008-03-03 14:15:16 UTC
@Sebastian Trueg,

There's probably a misunderstanding, the actual problem is, that some dvd drives (mostly notebooks) are not able to close the tray again after ejecting. So when it comes to verifying a DVD just burnt, and k3b doesn't find a DVD in the drive, k3b should open a popup dialog and give the user a chance to close the tray again, instead of just hanging. 
Comment 7 D.L.C.Burggraaff 2008-03-03 21:22:16 UTC
Emst: 
Please open another bug for your problem - the problem this issue is about is that even for drives that are capable of closing their tray 1.0.4 "forgets" to do so.
Kind regards, Dick
Comment 8 D.L.C.Burggraaff 2008-03-03 21:58:54 UTC
The phases I see after the disk is written are:
-- Flushing Cache
-- Writing Lead-out
-- Ejecting DVD
-- Checking medium
-- Verifying track 0

I assume that the "Ejecting DVD" message indicates that K3b is the "ejector" - if cdrecord secretely would have done the ejection K3b would not know about it and by implication would not have been able to display the message.

In 1.0.3 the "Ejecting DVD" phase was followed by a "Reloading medium" phase in which indeed the tray was closed. In 1.0.4 that phase is skipped. 
Comment 9 Bram Schoenmakers 2008-03-05 15:03:57 UTC
*** Bug 150727 has been marked as a duplicate of this bug. ***
Comment 10 Imre Péntek 2008-03-07 18:16:54 UTC
As a reply to #6:

Maybe there is a dialog box, but (if it is even really there) it doesn't pops into the foreground.
Comment 11 Brent Goodrick 2008-03-30 19:48:29 UTC
I'm seeing the exact same problem on Debian Lenny 64-bit using K3b v1.0.4 on KDE 3.5.8.  With the "Do not eject medium after write process" Advanced options setting _not_ checked, K3b hangs right after ejecting, but with that option checked, it does not hang.

My DVD recorder info:

  Name: LG Super Multi DVD Rewriter 18x SATA
  Vendor: HL-DT-ST
  Model: DVDRAM GSA-H62N
  Serial:
  Firmware: CL00
  Connection: SCSI
  Media: CD-RW/DVD+/-RW Drive
  External: No

Comment 12 Denis Misiurca 2008-04-19 16:11:28 UTC
Confirming with Optiarc DVD RW AD-7200A

Tray is ejected and not loaded back. Timer works, Cancel button works
Comment 13 Tristan Hoffmann 2008-05-11 19:20:07 UTC
*** Bug 156683 has been marked as a duplicate of this bug. ***
Comment 14 Tristan Hoffmann 2008-05-11 19:23:01 UTC
*** Bug 155305 has been marked as a duplicate of this bug. ***
Comment 15 Tristan Hoffmann 2008-05-11 19:26:08 UTC
*** Bug 155152 has been marked as a duplicate of this bug. ***
Comment 16 Tristan Hoffmann 2008-05-11 19:32:33 UTC
*** Bug 154148 has been marked as a duplicate of this bug. ***
Comment 17 Tristan Hoffmann 2008-05-11 19:37:45 UTC
*** Bug 151875 has been marked as a duplicate of this bug. ***
Comment 18 Tristan Hoffmann 2008-05-11 19:42:23 UTC
*** Bug 149910 has been marked as a duplicate of this bug. ***
Comment 19 Tristan Hoffmann 2008-05-11 19:47:46 UTC
*** Bug 147970 has been marked as a duplicate of this bug. ***
Comment 20 Tristan Hoffmann 2008-05-11 19:56:03 UTC
*** Bug 142193 has been marked as a duplicate of this bug. ***
Comment 21 Willi Mann 2008-07-23 08:52:21 UTC
I'm also experiencing this bug. Would a backtrace help to track it down?
Comment 22 Stephan Sokolow 2008-09-13 13:09:02 UTC
I'm seeing this kind of problem with 1.0.5 on Gentoo and, when it's a video DVD, it freezes up K3b. I'm attaching a backtrace taken before I killed the frozen process.
Comment 23 Stephan Sokolow 2008-09-13 13:09:51 UTC
Created attachment 27395 [details]
Backtrace from frozen K3b
Comment 24 Duncan Doyle 2009-01-17 15:50:51 UTC
I'm having the same problem with 1.0.5 on Ubuntu 8.10. This is on a Dell D820 with an external Samsung SE-S204N DVD writer. It at least happens on video and data DVDs.

With the video DVD, the burn process finished successfully, K3b ejected the disc, but failed to retract. I had to cancel the process (which did not hang by the way).

I found this bug-report and saw the "Do not eject medium after write process" workaround. I tried that today on a data DVD, but after the write process successfully finished, the verification did not start. The remaining time counter was stuck, but the elapsed time counter continued to run. So in my situation K3b did not crash. I was able to eject the disc using Nautilus (Gnome) and after closing the tray, the disc automounted successfully. K3b did not respond however and I had to manually cancel the process.

This is a rather annoying bug. K3b is by far the best recording tool out there (better than any commercial tool even), but this bug prevents to check disk consistency, which, in my opinion, should be one of the core features of a burning application. It doesn't make K3b look good at all, so I hope this will be fixed soon.
Comment 25 GK 2009-01-25 12:09:58 UTC
Hi there!
  Got similar problem on my system too: fresh install of openSuSE 11.1 with all the recent patches applied. KDE 3.5.10 with K3B 1.0.5 running on it.
  After burning a Data DVD project with subsequent verification enabled, the medium properly automatically reloads, but then K3B simply hangs. The elapsed time indicator runs further, but the verification is NOT performed. "Cancel" button closes the dialog. The data seems to be properly written, though.
  Moreover, when this happens, closing K3B only removes its GUI, but the core seems to remain running, which caused a KDE crash when I logged out, at least yesterday.
  Another strangeness, that I witness since openSuSE 10.3 (K3B 1.0.3, KDE 3.5.7) - changing "Writing mode" from "Auto" to, for example, "DAO" causes writing to fail at "Updating RMA" step. With K3B 1.0.5, it cannot even start burning properly if non-auto writing method is chosen. In both cases growisofs was used by K3B.
  My current system config: 32-bit openSuSE 11.1, KDE 3.5.10 release 21.9, K3B 1.0.5, growisofs 7.1. DVD-burner: LG GH20NS10 SATA, Firmware EL01.
  K3B was my favorite burning software in openSuSE 10.1 - it performed excellent in any mode, so I used to backup my sensitive data. Since version 1.0.3 something went wrong, not necessarily in K3B itself, maybe, in growisofs or the SATA interface of the burner, but still...
 I hope it will be fixed soon.



Comment 26 Tristan Hoffmann 2009-02-08 15:14:31 UTC
*** Bug 146536 has been marked as a duplicate of this bug. ***
Comment 27 Tristan Hoffmann 2009-02-08 15:16:35 UTC
*** Bug 148413 has been marked as a duplicate of this bug. ***
Comment 28 D.L.C.Burggraaff 2009-02-11 22:05:01 UTC
For the record: Whereas cdrtools-2.01.01a57 resolves bug #164950, it does NOT resolve this bug.
Comment 29 Florian Staudacher 2009-02-22 15:30:20 UTC
In previous versions this seems to have worked... even with my notebook, where the drive is definately not able to close itself again, it just stayed closed. 
But the current version available from Ubuntu 8.10 (1.0.5) does neither close the drive on its own nor shows a dialogue to do so.

... please fix, it's very annoying not to be able to check the burnt media!
Comment 30 Lubos Lunak 2009-06-12 15:18:56 UTC
Created attachment 34468 [details]
k3b patch (kde3)

This bug appears to be caused by the fact that the verification job, despite a comment saying so, actually neither tries to load the media nor it waits for that to happen. This patch seems to fix this problem with not loading the media back and thus avoid k3b getting stuck in the loop from the backtrace attached above, although if the tray will need to be closed manually and the user instead clicks cancel, that problem will still happen.

This patch possibly also fixes or helps to avoid problems in bug #154023, bug #154437, bug #167822, bug #172729, bug #175092, bug #180043, bug #184155, bug #184704, bug #191680.
Comment 31 D.L.C.Burggraaff 2009-06-12 23:52:03 UTC
After applying Lubos' patch to kde 3.5.10 / k3b 1.0.5 I can confirm that with or without "do not eject disk after writing" things work as expected for data CD's as well as data DVD's.
For data CD's the checksum verification still fails in 1 out of 2 cases, whereas for data DVD's it always works, but that is (should be) an other bug report.
Comment 32 Dmitriy 2009-08-15 19:45:03 UTC
(In reply to comment #25)
> Hi there!
>   Got similar problem on my system too: fresh install of openSuSE 11.1 with all
> the recent patches applied. KDE 3.5.10 with K3B 1.0.5 running on it.
>   After burning a Data DVD project with subsequent verification enabled, the
> medium properly automatically reloads, but then K3B simply hangs. The elapsed
> time indicator runs further, but the verification is NOT performed. "Cancel"
> button closes the dialog. The data seems to be properly written, though.
>   Moreover, when this happens, closing K3B only removes its GUI, but the core
> seems to remain running, which caused a KDE crash when I logged out, at least
> yesterday.
>   Another strangeness, that I witness since openSuSE 10.3 (K3B 1.0.3, KDE
> 3.5.7) - changing "Writing mode" from "Auto" to, for example, "DAO" causes
> writing to fail at "Updating RMA" step. With K3B 1.0.5, it cannot even start
> burning properly if non-auto writing method is chosen. In both cases growisofs
> was used by K3B.
>   My current system config: 32-bit openSuSE 11.1, KDE 3.5.10 release 21.9, K3B
> 1.0.5, growisofs 7.1. DVD-burner: LG GH20NS10 SATA, Firmware EL01.
>   K3B was my favorite burning software in openSuSE 10.1 - it performed
> excellent in any mode, so I used to backup my sensitive data. Since version
> 1.0.3 something went wrong, not necessarily in K3B itself, maybe, in growisofs
> or the SATA interface of the burner, but still...
>  I hope it will be fixed soon.

Hello!
First I faced this problem in k3b in openSUSE 10.3, then in Debian Lenny and in openSUSE 11.1 which I'm running at the moment. Unfortunately the problem still exist even in k3b 1.67 from kde4.3 factory repository. It happens with TSSTCorp CD/DVDW TS-L632D on my ASUS F2Tc laptop.
Comment 33 Michał Małek 2009-11-08 10:02:48 UTC
Could somebody test it against 1.68 alpha3?
Comment 34 Dmitriy 2009-11-14 19:29:24 UTC
It works for me both writing CDs and DVDs from ISO images and from folders. Tested on openSUSE 11.2 with 1.68 alpha3.
Comment 35 Emilio 2009-12-01 09:16:30 UTC
It also works for me using 1.68 alpha 3.
Comment 36 markuss 2010-03-16 16:06:02 UTC
In an attempt to clean up old bugs that are not valid for K3b 2.0 (=KDE SC 4.x port) anymore, this is now being marked as UNMAINTAINED.
If this bug is still valid for 2.0, please reopen it.
Comment 37 Lubos Lunak 2010-03-16 16:47:11 UTC
The openSUSE build of KDE4's K3B works because it includes the patch from comment #30, so quite possibly this issue is still valid, but I don't know for sure.
Comment 38 Juan M. 2010-06-10 17:16:51 UTC
The problem still exists in Kubuntu Lucid (10.4), using the included k3b (1.91.0-rc2).
About once every 5 times, the verification doesn't begin and k3b stays there waiting until you cancel. It doesn't matter if you disable ejecting after writing or not.
Comment 39 Michał Małek 2010-06-12 18:00:43 UTC
SVN commit 1137396 by mmalek:

Added additional "Load" command to prevent occassional hangs before verification. Patch by Lubos Lunak <l.lunak@kde.org>, thanks!
BUG: 156684
CCMAIL: l.lunak@kde.org


 M  +2 -1      ChangeLog  
 M  +15 -0     libk3b/jobs/k3bverificationjob.cpp  
 M  +1 -0      libk3b/jobs/k3bverificationjob.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1137396
Comment 40 Juan M. 2010-06-15 13:15:24 UTC
Thanks. I've applied the patch and for now it seems to be working. However, given that it failed with low frequency, I'll keep testing for a week or two and report back.
Comment 41 Juan M. 2010-06-17 01:16:40 UTC
Bad news. It still hangs on verification after applying the changes from #39
Comment 42 Mika Norén 2012-10-28 20:06:30 UTC
This bug still exist with K3b version: 2.0.2 (Kubuntu with KDE 4.9.2)
Drive Model: ASUS    BC-1205PT
Drive Firmware: 1.03

Tray simply won't respond to anything, and the button eject doesn't do anything.
I have to perform the 'eject -t' in order to restore the drive. after this command the drive responds normally again.
Comment 43 Rob Townley 2013-03-20 16:54:15 UTC
Same thing, K3b visuals hang and have to be force closed when starting to verify after disc ejected.  Occurs on both Ubuntu 10.04 and CentOS 6.4:

On Ubuntu 10.04, aptitude show k3b:
     Version: 1.91.0~rc2-0ubuntu3
$ aptitude show eject
     Package: eject
     Version: 2.1.5+deb1+cvs20081104-7


CentOS 6 K3b Version 1.05
CentOS 6.4 64bit
Linux (x86_64) release 2.6.32-358.2.1.el6.x86_64
$ rpm -q -f /usr/bin/eject
eject-2.1.5-17.el6.x86_64

$ rpm -qi k3b
Name        : k3b                          Relocations: (not relocatable)
Version     : 1.0.5                             Vendor: CentOS
Release     : 13.el6                        Build Date: Thu 11 Nov 2010 08:18:28 PM CST
Install Date: Wed 20 Mar 2013 05:51:10 AM CDT      Build Host: c6b3.bsys.dev.centos.org
Group       : Applications/Archiving        Source RPM: k3b-1.0.5-13.el6.src.rpm
Size        : 2970863                          License: GPLv2+
Signature   : RSA/8, Sat 02 Jul 2011 11:26:45 PM CDT, Key ID 0946fca2c105b9de

(K3bDevice::Device) /dev/sr1: READ TRACK INFORMATION with real length 36 failed.
DiskInfo:
Mediatype:       DVD+R
Current Profile: DVD+R
Disk state:      complete
Empty:           0
Rewritable:      0
Appendable:      0
Sessions:        0
Tracks:          1
Layers:          1
Capacity:        00:00:00 (LBA 0) (0 Bytes)
Remaining size:  00:00:00 (LBA 0) (0 Bytes)
Used Size:       00:00:00 (LBA 0) (0 Bytes)
(K3bDevice::ScsiCommand) failed: 
                           command:    GET PERFORMANCE (ac)
                           errorcode:  70
                           sense key:  NOT READY (2)
                           asc:        4
                           ascq:       1
(K3bDevice::Device) /dev/sr1: GET PERFORMANCE length det failed.
(K3bDevice::Device) /dev/sr1:  Number of supported write speeds via 2A: 9
(K3bDevice::Device) /dev/sr1 : 8467 KB/s
(K3bDevice::Device) /dev/sr1 : 7056 KB/s
(K3bDevice::Device) /dev/sr1 : 5645 KB/s
(K3bDevice::Device) /dev/sr1 : 4234 KB/s
(K3bDevice::Device) /dev/sr1 : 2822 KB/s
(K3bDevice::Device) /dev/sr1 : 2112 KB/s
(K3bDevice::Device) /dev/sr1 : 1764 KB/s
(K3bDevice::Device) /dev/sr1 : 1411 KB/s
(K3bDevice::Device) /dev/sr1 Invalid DVD speed: 706 KB/s
(K3bDevice::Device) /dev/sr1 current profile 0. Checking current profile list instead.
(K3bDevice::Device) /dev/sr1: GET CONFIGURATION length det failed.
Comment 44 Rob Townley 2013-03-20 17:05:55 UTC
     'eject -v -t /dev/sr1'
above command works successfully to close drive and 
     'eject -v -T /dev/sr1'
works successfully to toggle drive

K3B running under Gnome Desktop Environment, not native KDE.
Comment 45 Rob Townley 2013-03-20 18:44:21 UTC
Created attachment 78248 [details]
demonstrates generic device failure /dev/sg* as detected by k3b fails when passed to eject

Launch k3b from gnome-terminal on CentOS 6.4 and it lists 3 device names for each optical drive.  The Generic device name does not exist.  

k3b 2&>1 | grep -i dev | grep -i generic
will cut down on the noise but may not mention device name until k3b exits.