Bug 158316

Summary: KDE fails to unmount an auto-mounted USB flash drive
Product: [openSUSE] SUSE Linux 10.1 Reporter: Jiri Dluhos <jdluhos>
Component: KDEAssignee: E-mail List <kde-maintainers>
Status: RESOLVED WORKSFORME QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: suse-beta
Version: Beta 7   
Target Milestone: ---   
Hardware: i686   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on: 158579    
Bug Blocks:    
Attachments: Strace output for hald when attempting to unmount the drive from KDE.

Description Jiri Dluhos 2006-03-15 17:06:30 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.
Comment 1 Jiri Dluhos 2006-03-15 17:10:12 UTC
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.
Comment 2 Jiri Dluhos 2006-03-15 17:12:43 UTC
I have tried another USB flash disk, an old Apacer Handy Drive (USB1.0 only), it behaves in the same way.
Comment 3 Stephan Kulow 2006-03-15 17:22:51 UTC
I can't reproduce that at all ;(

Please strace -f $(pidof hald) and then safely remove and attach it here.
Comment 4 Dirk Mueller 2006-03-15 17:29:48 UTC
I have the very same issue on my laptop (10.1b7)
Comment 5 Jiri Dluhos 2006-03-15 17:40:49 UTC
Created attachment 73076 [details]
Strace output for hald when attempting to unmount the drive from KDE.
Comment 6 Jiri Dluhos 2006-03-15 17:44:53 UTC
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.

Comment 7 Jiri Dluhos 2006-03-15 17:48:00 UTC
Nope, I was wrong - when the drive is mounted, the 'Safely Remove' option does not unmount it, it just does not report any error.
Comment 8 Jiri Dluhos 2006-03-15 17:49:27 UTC
Ouch, now I have confused it completely; please better look at the strace output and don't take my babbling too seriously :-)
Comment 9 Stephan Kulow 2006-03-15 18:53:30 UTC
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.
Comment 10 Ludwig Nussel 2006-03-16 10:58:29 UTC
parts of this could be caused by #158579
Comment 11 Christoph Thiel 2006-04-23 11:13:27 UTC
There hasn't been any progress on this bug for more than a month now -> what's the status?
Comment 12 Stephan Kulow 2006-04-24 09:47:10 UTC
I claim it's fixed