Fwd: Burn, mount DVD and then eject fails?

Srdjan Todorovic <[email protected]> Tue, 17 Nov 2009 10:15:13 +0000
Newsgroups gmane.comp.kde.k3b
Message-ID <[email protected]>
Hello everyone,

I sent this to my LUG mailing list but not had a lot of useful replies.

K3b should be 1.0.5 or 1.0.4 (not at home right now to check), on KDE
3.5.9 or 3.5.10 on Slamd64 12.2 desktop.

I've not yet had a chance to look at the source, but at the moment not
entirely sure where the fault is (so I may be looking in the wrong
application).

Does anyone have any suggestions? (besides upgrading to KDE 4 and
latest K3b ;)  )

Thanks
Srdjan

---------- Forwarded message ----------
From: Srdjan Todorovic <[email protected]>
Date: Mon, 16 Nov 2009 19:41:12 +0000
Subject: Burn, mount DVD and then eject fails?
To: ALUG ML <[email protected]>

Hi all,

Got this weird problem for a few weeks now where I cannot eject
optical disks after buring. (strangely, my old Tiberian Sun game disks
can now be read, whereas previously could not on the desktop...).

I burn an optical disk using K3b -> burn succeeds and can mount it and
read all the files using md5sum to compare against known checksum
file.

I want to eject the disk, and then KDE pops up a message: "The device
was successfully unmounted, but the tray could not be opened".

I also cannot eject using /usr/bin/eject

Stracing it:

open("/dev/hda", O_RDONLY|O_NONBLOCK)   = 3
ioctl(3, CDROMEJECT, 0x1)               = -1 EIO (Input/output error)
ioctl(3, SG_GET_VERSION_NUM, 0x7fffdc13f47c) = 0
ioctl(3, SG_IO, 0x7fffdc13f3d0)         = -1 EFAULT (Bad address)
ioctl(3, FDEJECT, 0x1)                  = -1 ENOSYS (Function not implemented)
ioctl(3, MGSL_IOCGPARAMS or MTIOCTOP or SNDCTL_MIDI_MPUMODE,
0x7fffdc1440e0) = -1 ENOSYS (Function not implemented)

Oddly there's not close(3) but maybe it's not needed.

Another run:
open("/dev/hda", O_RDONLY|O_NONBLOCK)   = 3
ioctl(3, CDROMEJECT, 0x1)               = -1 EIO (Input/output error)
ioctl(3, SG_GET_VERSION_NUM, 0x7fff97ef8fac) = 0
ioctl(3, SG_IO, 0x7fff97ef8f00)         = -1 EFAULT (Bad address)
ioctl(3, FDEJECT, 0x1)                  = -1 ENOSYS (Function not implemented)
ioctl(3, MGSL_IOCGPARAMS or MTIOCTOP or SNDCTL_MIDI_MPUMODE,
0x7fff97efdc10) = -1 ENOSYS (Function not implemented)

The device is the correct device, and perms are:

brw-rw---- 1 root cdrom 3, 0 2009-11-16 08:57 /dev/hda

And I'm in the 'cdrom' group. From this moment onwards (until a reboot
I guess), I have the same behaviour with optical disks: I can mount
them, read them, unmount them, but cannot physically eject the drive,
even if pressing (and/or holding) the drive eject button.

Running eject as root works perfectly, which seems to suggest a
permissions problem.

As root:

open("/dev/hda", O_RDONLY|O_NONBLOCK)   = 3
ioctl(3, CDROMEJECT, 0x1)               = -1 EIO (Input/output error)
ioctl(3, SG_GET_VERSION_NUM, 0x7fff6f0d36ec) = 0
ioctl(3, SG_IO, 0x7fff6f0d3640)         = 0
ioctl(3, SG_IO, 0x7fff6f0d3640)         = 0
ioctl(3, SG_IO, 0x7fff6f0d3640)         = 0
ioctl(3, BLKRRPART, 0x7fff6f0d3640)     = -1 EINVAL (Invalid argument)
close(3)                                = 0

and again as root:

open("/dev/hda", O_RDONLY|O_NONBLOCK)   = 3
ioctl(3, CDROMEJECT, 0x1)               = -1 EIO (Input/output error)
ioctl(3, SG_GET_VERSION_NUM, 0x7fff93f2ffac) = 0
ioctl(3, SG_IO, 0x7fff93f2ff00)         = 0
ioctl(3, SG_IO, 0x7fff93f2ff00)         = 0
ioctl(3, SG_IO, 0x7fff93f2ff00)         = 0
ioctl(3, BLKRRPART, 0x7fff93f2ff00)     = -1 EINVAL (Invalid argument)
close(3)                                = 0

Initial searching suggests and issue with HAL. I've found that it
seems k3b is still running and can be seen to have /dev/hda still open
using lsof. Killing the process causes it to not appear in the lsof
output, but still cannot eject. So it may even be a bug with K3b.

Any ideas, please?

Thanks
Srdjan

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july