Bugzilla – Bug 158316
KDE fails to unmount an auto-mounted USB flash drive
Last modified: 2006-04-24 09:47:10 UTC
When trying to connect an USB flash drive to my workstation (SL10.1 beta7, KDE), it got automatically mounted with the standard KDE dialog appearing, and worked, but I was not able to unmount it from KDE. When right-clicking the icon of the disk in the 'My Computer' folder, a 'Safely Remove' entry is in the menu, but when I click on it, an error window appears, titled "Error - kio_media_mounthelper", with message "An unknown error occurred". The disk can be unmounted by classical 'umount' command but only if run as root. I am afraid a common user would be lost. It is well possible that this behavior is only specific to some types of USB flash disks or computer hardware. I have used Corsair FlashVoyager.
After unmounting it by hand, and then disconnecting and reinserting it again, the situation is slightly different: the 'Safely Remove' option now did not report any error, and the device icon changed to unmounted state, but the drive is still mounted; when clicking on the icon, an error message 'Device is already mounted' appears. Further attempts to 'Safely Remove' still appear to work, but have no effect.
I have tried another USB flash disk, an old Apacer Handy Drive (USB1.0 only), it behaves in the same way.
I can't reproduce that at all ;( Please strace -f $(pidof hald) and then safely remove and attach it here.
I have the very same issue on my laptop (10.1b7)
Created attachment 73076 [details] Strace output for hald when attempting to unmount the drive from KDE.
Please find the attached strace output. Interestingly, the computer behaved differently this time, or possibly I have mistaken the previous behavior. The 'Safely Remove' option seemed to really unmount the drive successfully and *then* issued an error message. When I typed 'mount' in the console, the drive was not mounted. When I clicked on the icon (now in unmounted state), I have got the 'Device is already mounted' message, but when I typed 'mount' in the console again, the drive was mounted successfully (but Konqueror was unable to show its contents). In short, now it seemed both functions worked correctly but they *think* they failed. Unfortunately I don't know how to check if the behavior changed or if it was this way from the start.
Nope, I was wrong - when the drive is mounted, the 'Safely Remove' option does not unmount it, it just does not report any error.
Ouch, now I have confused it completely; please better look at the strace output and don't take my babbling too seriously :-)
read(48, "/usr/lib/hal/scripts/hal-system-"..., 510) = 73 write(2, "2204: arguments to dbus_message_"..., 225) = 225 writev(14, [{"l\3\1\1\35\0\0\0%\v\0\0O\0\0\0\6\1s\0\5\0\0\0:1.30\0\0"..., 96}, {"\30\0\0\0An unknown error occured\0", 29}], 2) = 125 HAL is not behaving as it should be (and I have no idea what would be different on my machine). If Dirk can reproduce this, I might reproduce this on friday.
parts of this could be caused by #158579
There hasn't been any progress on this bug for more than a month now -> what's the status?
I claim it's fixed