secure remove of external USB-HDD produces error

Bug #466575 reported by Martin Thoma
548
This bug affects 133 people
Affects Status Importance Assigned to Milestone
udisks
Confirmed
Medium
nautilus (Fedora)
Won't Fix
Medium
udisks (Ubuntu)
Invalid
Low
Unassigned
Nominated for Lucid by ticket

Bug Description

Binary package hint: nautilus

1) Ubuntu 9.10
2) Nautilus 1:2.28.1-0ubuntu1
3) I just wanted to remove the USB-HDD by clicking on the eject-button. I expected it to take a few seconds and then the icon of the hdd should disappear
4) I got this error:
"Laufwerk konnte nicht gestoppt werden" (something like "Unable to stop drive")
Error detaching: helper exited with exit code 1: sense buffer empty
Error SYNCHRONIZE CACHE for /dev/sdc: Success sense buffer empty
Error STOP UNIT for /dev/sdc: No such file or directory

ProblemType: Bug
Architecture: i386
Date: Sat Oct 31 13:43:27 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/nautilus
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
NonfreeKernelModules: nvidia
Package: nautilus 1:2.28.1-0ubuntu1
ProcEnviron:
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: nautilus
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
Martin Thoma (themoosemind) wrote :
Revision history for this message
Pedro Villavicencio (pedro) wrote :

do you get the same error if you eject the drive by the command line? please execute: sudo eject /dev/sdc and paste the output here, thanks.

Changed in nautilus (Ubuntu):
importance: Undecided → Low
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
status: New → Incomplete
Revision history for this message
Martin Thoma (themoosemind) wrote :

No, I didn't get it with the command line.
Now I tried to reproduce this error, but I couldn't ... perhaps it is fixed?

Revision history for this message
Pedro Villavicencio (pedro) wrote :

could be yes, let's close it and please re open if you face the issue again, thanks.

Changed in nautilus (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
manolo (mac-man2005) wrote :

I have this problem too. All the other methods to eject/unmount the devece are succesful (including sudo eject /dev/sdc).
When clicking on "Safely remove drive" from nautilus I get:

  Unable to stop 120 GB Hard Disk

  Error detaching: helper exited with exit code 1: sense buffer empty
  Error SYNCHRONIZE CACHE for /dev/sdc: Successsense buffer empty
  Error STOP UNIT for /dev/sdc: No such file or directory

Ubuntu 9.10 - Karmic Koala
kernel version 2.6.31-14-generic

Revision history for this message
Martin Thoma (themoosemind) wrote :

I could now reproduce this error, too.

I think this is a duplicate of https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/462364

Revision history for this message
Roland J. (roland-jorz) wrote :

Same here,

Unable to stop 250 GB Hard Disk
Error detaching: helper exited with exit code 1: sense buffer empty
Error SYNCHRONIZE CACHE for /dev/sdb: Success
sense buffer empty
Error STOP UNIT for /dev/sdb: No such file or directory

On terminal the answer was
roland@roland-laptop:~$ sudo eject /dev/sdc
[sudo] password for roland:
eject: unable to find or open device for: `/dev/sdc'
roland@roland-laptop:~$ sudo eject /dev/sdb
roland@roland-laptop:~$

Revision history for this message
manolo (mac-man2005) wrote :

@Pedro Villavicencio
@Martin Thoma

I suppose it's time to reopen this bug report, isn't it?

Revision history for this message
Martin Thoma (themoosemind) wrote :

@manolo: I think so, too. I changed the status to confirmed. Is this correct?

Changed in nautilus (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks folks, the error is coming from devicekit-disks reassigning for now.

affects: nautilus (Ubuntu) → devicekit-disks (Ubuntu)
Changed in devicekit-disks (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
Revision history for this message
In , Sense Egbert Hofstede (sense) wrote :

When safely removing a device with the option from the context menu the following error is generated.

"Unable to stop device
Error detaching: helper exited with exit code 1: sense buffer empty
Error SYNCHRONIZE CACHE for /dev/sdc: Success sense buffer empty
Error STOP UNIT for /dev/sdc: No such file or directory"

A screenshot of the warning dialogue, taken from a downstream duplicate: http://launchpadlibrarian.net/36693130/USB_Flash_Memory_error.png
This image says:
"Unable to stop USB Flash Memory
Error detaching: helper exited with error code 1: synchronize
cache(10): Fixed format, current; Sense key: Key=9
 Additional sense: Logical unit not ready, cause not reportable
  Info fld=0x0 [0]
Error SYNCHRONIZE CACHE for /dev/sdd: Success
start stop unit: transport: Host_status=0x07 [DID_ERROR]
Driver_status=0x00 [DRIVER_OK, SUGGEST_OK]

Error STOP UNIT for /dev/sdd: No such file or directory"

This bug was reported originally by Martin Thoma at Launchpad in Ubuntu at <https://launchpad.net/bugs/466575>.

description: updated
Changed in devicekit:
status: Unknown → Confirmed
Revision history for this message
Sense Egbert Hofstede (sense) wrote :

Setting the status to Triaged since the triaging is done here.
Thanks to all participants so far!

Changed in devicekit-disks (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Oliver Joos (oliver-joos) wrote :

Same error here whenever I "Safely Remove" my Nokia N81.

If I "Unmount" and unplug it, the N81 complains about incorrect disconnection ("data may be lost").

And if I "Eject" and unplug it, then *sometimes* it works for both sides (N81 says "cable may be removed now")! Sometimes the same error is shown like after safely remove it.

Revision history for this message
Oliver Joos (oliver-joos) wrote :

I just checked Lucid 10.04 alpha 2 (released 13th January 2010):

"Safely Remove" my Nokia N81 still triggers this error.

"Unmount" and unplug the N81 still makes it complain about incorrect disconnection (which is correct, I think!)

"Eject" and unplug it now seems to work always! (as opposed to Karmic)

Revision history for this message
Oliver Joos (oliver-joos) wrote :

To clarify my previous comment: In Lucid alpha 2 Unmount and Eject do what I expect.

Revision history for this message
Nemo_bis (nemobis) wrote :

I have the same problem with an MP3 player, which has a "RockChip USBDISK User: 8,2 GB File system" and adds also a "RockChip USBDISK SD" to the "Computer" screen of Nautilus (memory can be expanded with a microSD, and this "card reader" is detected, I suppose).

If I "Safely Remove" it, it's unmounted (at least, Nautilis gives me the "Mount" option) but the device doesn't confirm the correct removal, and after some time thhis error is displayed:

«Error detaching: helper exited with exit code 1: synchronize cache(10): transport: Host_status=0x05 [DID_ABORT]
Driver_status=0x00 [DRIVER_OK, SUGGEST_OK]

Error SYNCHRONIZE CACHE for /dev/sdb: Success
start stop unit: pass through os error: No such device
Error STOP UNIT for /dev/sdb: No such device»

I press "OK" and the device confirms the correct removal.
"Eject", "Unmount" or "sudo eject" give no error, but have no effect, except that as above the device is unmounted (at least, Nautilis gives me the "Mount" option).

If I "Safely Remove" "RockChip USBDISK SD" and then "RockChip USBDISK User: 8,2 GB File system", I receive two errors:

«"Impossibile fermare l'unità" [Italian for "It's impossible to stop the drive"]
Device is not a drive»

«"Impossibile fermare l'unità"
DBus error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.»

And then the device confirms the correct removal.

Ubuntu 9.04
kernel 2.61.31-14.48 generic
nautilus 1:2.28.1-0ubuntu3
devicekit-disks 007-2ubuntu4

Revision history for this message
Nemo_bis (nemobis) wrote :

Instead of "Device is not a drive" (in the second procedure) now I've had:

«Error detaching: helper exited with exit code 1: Cannot open /dev/sdb: No such device or address»

Revision history for this message
Nemo_bis (nemobis) wrote :

Sorry, there's another possible error instead of the last one:

«Method "DriveDetach" with signature "as" on interface "org.freedesktop.DeviceKit.Disks.Device" doesn't exist»

Ah, and removal requires ~55 s (quite long...).

Martin Pitt (pitti)
affects: devicekit-disks (Ubuntu) → udisks (Ubuntu)
affects: devicekit → udisks
Changed in udisks (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
pyrgus (trash56) wrote :

Same here:

When I want to 'secure remove' my fantec MM-CR35US 500GB FAT32 media player, then I get the same error message.

See http://img109.imageshack.us/img109/1513/bildschirmfotohdd.png

---
Ubuntu 9.10 64bit
linux-image-2.6.31-19-generic (2.6.31-19.56)

Revision history for this message
Bino (webmaster-stuermer-benjamin) wrote :

Date: Sat Apr 10 16:49
DistroRelease: Ubuntu 10.04 beta
ExecutablePath: /usr/bin/nautilus
Package: nautilus 2.30.0
Uname: Linux 2.6.32-19-generic x86_64

See http://img688.imageshack.us/img688/7269/errorbx.jpg

---
Ubuntu 10.04 64bit
Linux 2.6.32-19-generic x86_64

Revision history for this message
pyrgus (trash56) wrote :

Sorry, your link is not working properly.

Revision history for this message
Gustavo Landín Arenas (landin-ag) wrote :

Hello everyone, I'm completely new to the forum and I am a bit lost, I have the same problem as discussed in trying to remove a USB drive of 320 GB using right click and I get this error

Detaching Error: helper exited with exit code 1: synchronize cache (10): transport: Host_status = 0x07 [DID_ERROR]
Driver_status = 0x08 [DRIVER_SENSE, SUGGEST_OK]

SYNCHRONIZE CACHE Error for / dev / sdc: Success
start stop unit: transport: Host_status = 0x07 [DID_ERROR]
Driver_status = 0x08 [DRIVER_SENSE, SUGGEST_OK]
Error STOP UNIT for / dev / sdc: No such file or directory

This unit had already used in Ubuntu and had no error, but now install Ubuntu on the entire hard drive and am using a SWAP partition, previously installed Ubuntu and Windows on one disc and was not using a swap partition, only the partition EXT4

I hope you can help me, thanks, greetings from Mexico

70 comments hidden view all 101 comments
Revision history for this message
In , Tom (tom-redhat-bugs) wrote :

Created attachment 409858
screenshot of "Unable to stop" error popup

Description of problem:
If I try to "safely remove" an SD card that is mounted during boot, I get the attached error popup complaining "Unable to stop drive":

Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
USB device: /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-6)
SYNCHRONIZE CACHE: FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: FAILED: No such file or directory

I see no messages in /var/log/messages, nor in ~/.xsession-errors.

If I reinsert the SD card, it automounts thusly:

/dev/sdb1 on /media/FlashCard type vfat (rw,nosuid,nodev,uhelper=udisks,uid=500,gid=500,shortname=mixed,dmask=0077,utf8=1,flush)

But trying to "safely remove" reproduces the same error.

Problem reproduces with SELinux in permissive mode as well.

Version-Release number of selected component (if applicable):
nautilus-2.30.1-2.fc14.x86_64

How reproducible:
Every time

Steps to Reproduce:
1.
2.
3.

Actual results:

Expected results:

Additional info:

69 comments hidden view all 101 comments
Revision history for this message
Peter Graversen (peter-graversen-deactivatedaccount) wrote :

Same problem in released Ubuntu 10.04:
Using "Safely remove drive" to unmount my Nokia N900, following error is displayed:

Unable to stop drive
Error detaching: helper exited with error code 1: Detaching device /dev/sdc
USB device: /sys/devices/pci0000:00/0000:00:02.1/usb1/1-4)
SYNCHRONIZE CACHE: OK
STOP UNIT: FAILED:

Revision history for this message
Oliver Joos (oliver-joos) wrote :

With released 10.04 I get an error more like that of Gustavo (saying that SYNCHRONIZE CACHE failed). "Eject" works perfectly whereas "Safely Remove Drive" brings:

Unable to stop Nokia S60
Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
USB device: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1)
SYNCHRONIZE CACHE: FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: FAILED: No such file or directory

Revision history for this message
newuser (16b) wrote :

Like Oliver Joos me too, with release 10.04 lts, ubuntu gets error amounting N900:

Unable to stop drive

Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
USB device: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1)
SYNCHRONIZE CACHE: OK
STOP UNIT: FAILED: No such file or directory

Revision history for this message
Javed A Rahman (s.kaniff) wrote :

Ubuntu 10.04

Rightclick>"Safely remove drive" on 1TB external NTFS disk

Unable to stop drive

Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
USB device: /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-3)
SYNCHRONIZE CACHE: OK
STOP UNIT: FAILED: No such file or directory

Revision history for this message
meow81 (whocares) wrote :

Impossibile fermare l'unità (impossible stop the unit)
Error detaching :helper exited with exit code1: Detaching device /dev/sdb
USB device : /sys/devices/pci0000:00/0000:00:02.0/usb3/3-5
SYNCHRONIZE CACHE : OK
STOP UNIT: start stop unit: transport: Host_status=0x07
[DID_ERROR]
Driver_status=0x08 [DRIVER_SENSE, SUGGEST_OK]
FAILED: No such file or directory

is a photocamera easypix dc 512

is possible to copy images and files from device to pc but is not possible to copy image from pc to device
is not possible to safety remove hardware, ubuntu 10.04 gives that error above reported.

Revision history for this message
meow81 (whocares) wrote :

me too in ubuntu 10.04

Revision history for this message
chr (chr-dbedia) wrote :

got same issue since ubuntu 8 (have been on 9 and now I'm on 10)

Error detaching: helper exited with exit code 1: Detaching device /dev/sdd
USB device: /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-2)
SYNCHRONIZE CACHE: FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: FAILED: No such file or directory

USB device: Sony DSC-R1 digital camera - MMC and SD card (and I've had this issue also on some pendrives but don't have one to test it at the moment)
PC: Dell Inspiron 1720

64 comments hidden view all 101 comments
Revision history for this message
In , Benjamin (benjamin-redhat-bugs) wrote :

I have this problem too with a USB key, on F13 i686.

63 comments hidden view all 101 comments
Revision history for this message
quirks (quirks) wrote :

Having the same issue with two USB disks: SAMSUNG_SV2042H and Myson_Century__Inc._USB_Mass_Storage_Device_100.

I did some debugging and this is what I came up with:
When you right-click on a USB drive and choose "Safely remove drive", this is what happens in the background:
1. Nautilus calls udisks --umount <device file of USB drive>"
2. udisks contact a background-process named "udisks-daemon".
3. udisks-daemon inturn invokes "/usr/lib/udisks/udisks-helper-drive-detach".
4. udisks-helper-drive-detach calls some sg3-utils to synchronize the cache and stop the device ("sg_ll_sync_cache_10" at line ~184 and "sg_ll_start_stop_unit" at line ~202 in source file "job-drive-detach.c"). Both of these functions return an error message.

You can easily reproduce the error messages caused by sg3-utils by running the sg3-utils manually. In order to reproduce the first error message ("SYNCHRONIZE CACHE: FAILED: No such file or directory"), run this command:

sg_sync --verbose <device file of USB drive>
Example: sg_sync --verbose /dev/sdc

This yields the precise error message returned by the sg3 backend:

    synchronize cache(10) cdb: 35 00 00 00 00 00 00 00 00 00
synchronize cache(10): Fixed format, current; Sense key: Illegal Request
 Additional sense: Invalid field in cdb
bad field in Synchronize cache command

In order to reproduce the second error message ("STOP UNIT: FAILED: No such file or directory"), run this command:

sg_start --stop --verbose <device file of USB drive>
Example: sg_start --stop --verbose /dev/sdc

Again, this yields a more precise error message than the general "No such file or directory" as shown by the graphical front-end:

    Start stop unit command: 1b 00 00 00 00 00
start stop unit: Fixed format, current; Sense key: Illegal Request
 Additional sense: Invalid field in cdb
invalid field in cdb
START STOP UNIT command failed

In conclusion, it looks like the sg3-utils send the wrong commands to the SCSI layer or wherever these commands go (I am not that much into low level SCSI programming, my apologies). However, I don't see any adverse effects from these erroneous commands. Even though the sg3-utils functions return an error, udisk-daemon properly continues and cleanly unmounts the USB drive as far as I can tell (it invokes umount, which should sync the cache anyway). To try this out, I removed the two calls to the functions "sg_ll_sync_cache_10" and "sg_ll_start_stop_unit" from the source code of udisks "job-drive-detach.c" and recompiled the thing. Nautilus stopped whining about the failure of these two functions and the drives are unmounted perfectly. :-)

I would have attached a patch, but I do not really have a clue about what these two functions do precisely. In fact, it might have been a bad thing to remove the function calls from "job-drive-detach.c". I cannot say, if this may result in loss of data (someone with some SCSI programming knowledge please explain). Plus, I imagine that for most users it may actually be useful that these functions are called. So it would not really be a patch.

Revision history for this message
quirks (quirks) wrote :

Having done some tests with various drives, I have come to believe that it is actually safe to ignore the error messages produced by sg3-utils. I think so for the following reasons:

1. I could not find evidence that Hardy Heron (the release I used before Lucid) made use of sg3-utils to flush caches/stop devices before unmounting USB devices. And still, the filesystems were closed cleanly.
2. Even if Hardy made use of the problematic sg3-utils functions ("sg_ll_sync_cache_10" and "sg_ll_start_stop_unit"), they still would have failed, because the relevant code is identical.
3. Even though the sg3 functions fail, udisks-daemon still invokes the "umount" command, so the filesystem is not left in an inconsistent state, when the device is removed.

For these reasons, I slightly modified udisks-helper-drive-detach to simply not report back error messages to the user. It still invokes the error-producing sg3 functions, but does not pass the errors on to the user. This way, the functions are still called for devices where they can be executed successfully. And for the devices where they fail, it is not any different - only that the user does not know anything about this. Anyhow, I have come to believe that the errors are caused by a crappy implementation of the SCSI protocol by my USB disk, which is in arbitrary 3.5" disk in a cheap disk enclosure, which I bought separately. The controller of the enclosure seems to produce errors no matter what command you throw at it. :-/

I am attaching the modified version of "job-drive-detach.c", which only differs from the original version ("job-drive-detach.c.orig") by one statement (setting return value to success; line 213). For your convenience, I'm also attaching a precompiled version of "udisks-helper-drive-detach", which is responsible for passing the error to the user. If you are fed up with the error messages like me, place the file in /usr/lib/udisks and you won't be bothered anymore. Make sure to create a backup of the original file. Also you will have to place my modified version there, whenever an update overwrites it (which doesn't happen too often anyway).

Please note that this is not really a patch, as it does not fix the underlying problem. But I don't really mind, since it wasn't any different in Hardy. The only difference is that I didn't notice it back then and now I am bothered with it every time I unplug a device. If you think so, too, then you are welcome to use my modified version of "udisks-helper-drive-detach".

Revision history for this message
quirks (quirks) wrote :
Revision history for this message
quirks (quirks) wrote :
Revision history for this message
quirks (quirks) wrote :
60 comments hidden view all 101 comments
Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Revision history for this message
In , meo (meo-redhat-bugs) wrote :

This bug is not restricted to fedora 14.

I have not enabled rawhide repositories

I am using fedora 13 and i had a similar problem. First with an external hard disk and then my n95 external memory.

On the 80gig external ....after safely removing i get the ff:

Unable to stop drive
Failed to eject media; one or more volumes on the media are busy.

Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
USB device: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5)
SYNCHRONIZE CACHE: FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: FAILED: No such file or directory

On the N95 external memory afer safely removing i get the ff:

Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
USB device: /sys/devices/pci0000:00/0000:00:1d.2/usb4/4-1)
SYNCHRONIZE CACHE: FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: FAILED: No such file or directory

Revision history for this message
In , meo (meo-redhat-bugs) wrote :

I just noticed that the external hard drive does not spin down.

It just unmounts.

You hear a knock sound when you remove the usb cable.

Changed in udisks:
importance: Unknown → Medium
61 comments hidden view all 101 comments
Revision history for this message
ticket (tickettothemoon2004) wrote :

I have a media player with an internal flash drive and a SD-insert.
Without the SD-insert, I can access the internal flash drive without any issues.
With the SD slot occupied, Ubuntu sees the two drives correctly, and I can usually eject one of them, but the second one always gives an error.

These messages have appeared at various times when trying to eject / unmount:
=======
Method "DriveDetach" with signature "as" on interface "org.freedesktop.UDisks.Device" doesn't exist

Error detaching: helper exited with exit code 1: Detaching device /dev/sde
USB device: /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4)
SYNCHRONIZE CACHE: synchronize cache(10): transport: Host_status=0x05 [DID_ABORT]
Driver_status=0x00 [DRIVER_OK, SUGGEST_OK]

FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: start stop unit: pass through os error: No such device
FAILED: No such device

Error ejecting: eject exited with exit code 1: eject: unable to eject, last error: No such device

Method "DriveEject" with signature "as" on interface "org.freedesktop.UDisks.Device" doesn't exist
======
Lucid 10.4
Linux 2.6.32-24-generic #43-Ubuntu SMP
GNOME 2.30.2

Revision history for this message
In , Lea-gris-gmail (lea-gris-gmail) wrote :

Created an attachment (id=38891)
hwinfo dump

Same problem here Ubuntu 10.04

<code>Error detaching: helper exited with exit code 1: Detaching device /dev/sdc</code>
Kernel 2.6.32-24-generic #42-Ubuntu SMP Fri Aug 20 14:21:58 UTC 2010 x86_64 GNU/Linux
USB3 hdd Bus 002 Device 005: ID 174c:5106 ASMedia Technology Inc.
Ext4 partition on external hard drive
Automatic mount unmount appear to be ok but get this error when "safe remove" it.

Here is a hwinfo if it can help.

Revision history for this message
In , Lea-gris-gmail (lea-gris-gmail) wrote :

Created an attachment (id=38892)
Fail to stop the volume dialog window

<code>
Error detaching: helper exited with exit code 1: Detaching device /dev/sdc
USB device: /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-2)
SYNCHRONIZE CACHE: FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: FAILED: No such file or directory
</code>

Revision history for this message
Léa GRIS (lea-gris) wrote :

Same problem here Ubuntu 10.04

<code>Error detaching: helper exited with exit code 1: Detaching device /dev/sdc</code>
Kernel 2.6.32-24-generic #42-Ubuntu SMP Fri Aug 20 14:21:58 UTC 2010 x86_64 GNU/Linux
USB3 hdd Bus 002 Device 005: ID 174c:5106 ASMedia Technology Inc.
Ext4 partition on external hard drive
Automatic mount unmount appear to be ok but get this error when "safe remove" it.

Here is a hwinfo dump if it can help.

Revision history for this message
Rocdufer (lepcis) wrote :

Hello. I have good quality 1 TB USB Hard Disk, that came with FAT32 file system and driver for the commercial OS. I did not care about changing this file system, and along some time it worked without error message. When removing safely, I have now this message:
«Unable to stop drive
Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
USB device: /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-2)
SYNCHRONIZE CACHE: OK
STOP UNIT: FAILED: No such file or directory»

However, I can clearly hear that the disk stops, and I also hear it start to run when I wish so; obviously, the message can be ignored.

I wonder if the disk file system is, or not, totally irrelevant for the optimum disk operation under Linux.

58 comments hidden view all 101 comments
Revision history for this message
In , George (george-redhat-bugs) wrote :

Same thing happens to me, Fedora 13 64bit

nautilus-2.30.1-6.fc13.x86_64

57 comments hidden view all 101 comments
Revision history for this message
jedioetzi (jedioetzi) wrote :

on maverick
Method "DriveEject" with signature "as" on interface "org.freedesktop.UDisks.Device" doesn't exist
same usb key 1GB, on lucid works well

58 comments hidden view all 101 comments
Revision history for this message
In , Perazim (perazim-redhat-bugs) wrote :

Fedora 14 32 bit. nautilus-2.32.2-1.fc14.i686

Running luks encrypted external USB harddrives.

When I use nautilus to "safely remove drive" the status goes back to encrypted but after approx ten seconds, I receive a pop-up " Unable to stop drive" message.

This is a consistent behaviour.

Changed in udisks:
importance: Medium → Unknown
Changed in udisks:
importance: Unknown → Medium
36 comments hidden view all 101 comments
Revision history for this message
girisha (girishad) wrote :

I get the same warning msg when I try to safely remove my nexus S from Ubuntu. This is happening in 11.04 32 bit as well as in the 64 bit.

Revision history for this message
Anil Gobburi (anil-gobburi) wrote :

I get the same issue too when I am unmounting Kingston 16 GB Pendrive as well as Nokia 5800 XM(as mass storage Device)

Revision history for this message
Fabrice Moncade (fafanuclear) wrote :

I've got the same, but with a Western digital 1TB.

Revision history for this message
Mihai Capotă (mihaic) wrote :

Same bug with an Adata CH11 1 TB USB 3.0 hard disk connected to a USB 2.0 port:

$ udisks --detach /dev/sdb
Detach failed: Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
USB device: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4)
SYNCHRONIZE CACHE: FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: FAILED: No such file or directory

$ sudo sg_start --stop --verbose /dev/sdb
    Start stop unit command: 1b 00 00 00 00 00
start stop unit: Fixed format, current; Sense key: Illegal Request
 Additional sense: Invalid command operation code
command not supported
START STOP UNIT command failed

Does anybody know a workaround that would make the hard disk spin down so it can be safely disconnected?

Revision history for this message
Mihai Capotă (mihaic) wrote :

Answering my own question, hdparm will make the hard disk spin down, even though it reports an error:

$ sudo hdparm -Y /dev/sdb

/dev/sdb:
 issuing sleep command
 HDIO_DRIVE_CMD(sleep) failed: Invalid argument

Revision history for this message
E. Lewis (ed-lewis) wrote :

I get the same problem when removing a USB drive from /dev/sdb. The drive is a 250 GB hard disc formatted with the ext4 file system.
After getting this message, I just unplug it. I first unplug the USB cable and then hit the 'off switch' on the drive.
Other than the annoying dialogue, the error does not seem to give any problem.

Revision history for this message
Constantine (theaspect) wrote :

Same for 11.04

Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
USB device: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1)
SYNCHRONIZE CACHE: OK
STOP UNIT: FAILED: No such file or directory

root@iEEEpc:/etc/default# uname -a
Linux iEEEpc 2.6.38-12-generic #51-Ubuntu SMP Wed Sep 28 14:25:20 UTC 2011 i686 i686 i386 GNU/Linux
root@iEEEpc:/etc/default# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty

31 comments hidden view all 101 comments
Revision history for this message
In , David (david-redhat-bugs) wrote :

Also on F15 with nautilus-3.0.2-1 with an android phone attached in mass-storage mode.

30 comments hidden view all 101 comments
Revision history for this message
Matt Stan (jmstanfield) wrote :

I have the same problem using a standard (no-keyboard) Kindle (Autumn 2011 Kindle version) on 10.04 LTS, Lucid Lynx.

Unable to stop Kindle Internal Storage
Error detaching: helper exited with exit code 1: Detaching device /dev/sdd
USB device: /sys/devices/pci0000:00/0000:00:1d.1/usb7/7-2)
SYNCHRONIZE CACHE: OK
STOP UNIT: FAILED: No such file or directory

Revision history for this message
Prakash J Kokkatt (pjkonweb) wrote :

I face the error with kindle touch 4th generation ebook reader.
Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
USB device: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1)
SYNCHRONIZE CACHE: OK
STOP UNIT: FAILED: No such file or directory

Revision history for this message
white_gecko (natanaela) wrote :

I just got the same Error when I attached my new external HDD case. Strange is, I didn't get this error with the same HDD in my old case. The new case is a "fantec DB-ALU3" and it has USB 3.0. The old case was a "Conrad Electronic" Model No.: "CEX-HDD/U35s" with USB 2. The HDD is a WD 1TB with serial-ATA.

The exact error message is:

Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
USB device: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3)
SYNCHRONIZE CACHE: FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: FAILED: No such file or directory

Revision history for this message
Marc López (marc10lopez) wrote :

The same error when I use the "remove safely drive" in Ubuntu 11.10 with a Kingston DataTraveler G2 (16 Gb) and with a Iomega external HDD (500 Gb). I only have the error with Nautilius, in Unity and LXDE it doesn't appear. I think that the first time that I saw this error was in version 8.10 or 9.04 with ext4, in 8.04 I can confirm that never has appeared me.

The error message is:

Unable to stop drive

    Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
    USB device: /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2)
    SYNCHRONIZE CACHE: synchronize cache(10): Fixed format, current; Sense key: Key=9
     Additional sense: Logical unit not ready, cause not reportable
      Info fld=0x0 [0]
    FAILED: No such file or directory
    (Continuing despite SYNCHRONIZE CACHE failure.)
    STOP UNIT: start stop unit: transport: Host_status=0x07 [DID_ERROR]
    Driver_status=0x00 [DRIVER_OK, SUGGEST_OK]

    FAILED: No such file or directory

Revision history for this message
Przemek K. (azrael) wrote :

I have the same error with external USB 3.0 disk. It happens both on Ubuntu 11.10 and 12.04, and both when using USB 3.0 and USB 2.0 ports.
Error detaching: helper exited with exit code 1: Detaching device /dev/sdb
USB device: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1)
SYNCHRONIZE CACHE: FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: FAILED: No such file or directory

Revision history for this message
Przemek K. (azrael) wrote :

root@laptop616:/home# eject /dev/sdb
eject: unable to eject, last error: Invalid argument

Revision history for this message
Przemek K. (azrael) wrote :

My other USB 2.0 drive works fine.

Revision history for this message
Przemek K. (azrael) wrote :

My USB 3.0 disk only unmounts partitions, it doesn't power off.

Revision history for this message
Pink Ink (pink-ink) wrote :

I get this error in Nautilus:
"Unable to stop 2 TB Hard Disk
Error detaching: helper exited with exit code 1: Detaching device /dev/sdc
USB device: /sys/devices/pci0000:00/0000:00:1c.2/0000:02:00.0/usb3/3-3)
SYNCHRONIZE CACHE: FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: FAILED: No such file or directory"

The error only occurs, when I select "Safely Remove Drive" from the context menu. (In Nautilus I have selected the pane "Places" on the left side of the window. There the drive is shown. There the context menu was opened). After the error occured, the drive is removed (the eject button vanished).

The error DOES NOT OCCUR if I click on the eject symbol on the right of the device name. This works fine.

Software:
  Ubuntu 11.04 with latest updates,
  Nautilus 2.32.2.1
Hardware:
  2 TB HDD SAMSUNG HD203WI
  External USB 3.0 HDD Case by "Sinan Power".

One info from "hdparm -I /dev/sdc":
Configuration:
 cache/buffer size = unknown

Conclusions:
1.) The cache is said to be "unknown" by hddparm and nautilus' error message said "SYNCHRONIZE CACHE: FAILED: No such file or directory". Is there a correlation? Maybe the hdd-cache is not used, therefore there's no file, but Nautilus expects one?

2.) What does Nautilus do different when using the eject button (which works) in contrary to using the context menu entry "Safely Remove Drive" (which does not work)?

3.) Has it something to do with USB 3.0 maybe?

Revision history for this message
Pink Ink (pink-ink) wrote :

Addition to previous comment:
- using the context menu entry "Safely Remove Drive" fails from both Nautilus AND Desktop, but works from Unity Sidebar.
- command line: executing "eject /dev/sdc" as root works fine.

Revision history for this message
DeeKey (privateinf) wrote :

Unable to safely remove USB3 hardrive using Nautilus, but able to do it using Unity sidebar.

Here is my error message:

Error detaching: helper exited with exit code 1: Detaching device /dev/sdc
USB device: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1)
SYNCHRONIZE CACHE: FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: FAILED: No such file or directory

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu laptop testing tracker.

A list of all reports related to this bug can be found here:
http://laptop.qa.ubuntu.com/qatracker/reports/bugs/466575

tags: added: laptop-testing
20 comments hidden view all 101 comments
Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

This message is a notice that Fedora 14 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 14. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 14 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

19 comments hidden view all 101 comments
Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

The same problem on Ubuntu Precise:

sudo udisks --detach /dev/sdc
Detach failed: Error detaching: helper exited with exit code 1: Detaching device /dev/sdc
USB device: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.7)
SYNCHRONIZE CACHE: FAILED: No such file or directory
(Continuing despite SYNCHRONIZE CACHE failure.)
STOP UNIT: FAILED: No such file or directory

This error message matches exactly the the error message from Nautilus.

Apparently, Unity fails to safely remove the drive too.
Though it does not report a problem, it does not power down the device, and it is still available in Nautilus for mounting.
Truly removed devices disappear from the list of mountable devices until they are unplugged and plugged again.

On my computer USB thumb drives usually do not produce this error.
But USB HDD always produce this error.

My guess is that HDD contain more than one entry in the partition table, while thumb drives usually have only one, and this somehow matters.

Revision history for this message
aoandr (t-launchpad-nbs-eng-ru) wrote :

I've filed this bug against udisks in bugzilla at freedesktop.org.
The resolution is distressing: the bug will not be fixed upstream.

Resolution --- WONTFIX

Comment # 1 on bug 55742 from David Zeuthen

udisks 1.x is in maintenance mode and only security critical bugs will get any
attention. Since there is no similar concept in the UDisks 2.x I'm closing this
bug WONTFIX.

Revision history for this message
Alex Cabal (acabal) wrote :

How old is udisks 2.x? Is the chance of it being included in Debian/Ubuntu along the lines of within 2 cycles, or more like 2+ years?

Kind of annoying because I have to use hdparms to spin down my external hdd's before disconnecting now. It's still not a good workaround because they never truly power down that way.

Revision history for this message
Oliver Joos (oliver-joos) wrote :

@aoandr: sad to hear that it is set to WONTFIX upstream. But IMHO this does not force it to WONTFIX for Ubuntu! A brave Ubuntero could fix it, and perhaps the patch will then swim upstream. So please let this bug be CONFIRMED.

Revision history for this message
Martin Pitt (pitti) wrote :

Not relevant for Ubuntu 12.10 any more, we moved to udisks2.

Changed in udisks (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Jane Atkinson (irihapeti) wrote :

What's going to happen to 12.04 (5 year support, after all)? Will there be a backport made available?

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 466575] Re: secure remove of external USB-HDD produces error

Jane Atkinson [2012-10-10 5:03 -0000]:
> What's going to happen to 12.04 (5 year support, after all)? Will there
> be a backport made available?

udisks2 itself could certainly be backported in theory, but it would
require backporting everything that actually _uses_ it as well; that's
half of the desktop infrastructure, and thus not going to happen.

This bug is not a deal-breaker, so I'm afraid it will just stay as it
is in stable releases.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Martin: I didn't think all of the ubuntu varients had moved onto Udisks2, only the main one.
On Quantal udisks still shows as a member of tasks:
ubuntu-desktop, ubuntu-usb, kubuntu-desktop, kubuntu-active-desktop, kubuntu-active, edubuntu-desktop, edubuntu-desktop-kde, edubuntu-usb, ubuntustudio-desktop

but udisks2 is a member of:
ubuntu-desktop, ubuntu-usb, kubuntu-dvd-live, kubuntu-active-dvd-live, edubuntu-desktop, edubuntu-desktop-kde, edubuntu-usb, xubuntu-desktop, mythbuntu-frontend, mythbuntu-desktop, mythbuntu-backend-slave, mythbuntu-backend-master, mythbuntu-backend-master, lubuntu-desktop, ubuntustudio-desktop

That's an odd non-overlapping in either direction set, with only the kubuntu dvd-live sets in the udisks2 camp.

Dave

Revision history for this message
Oliver (ok23) wrote :

For some reason this seems to be hardware-dependant. I have so far "collected" four USB SATA docking stations or adapters. I do not see this bug on USB 2 at all (ICH 10). On USB 3 (Renesas/NEC) I see it on one of two docking stations. On that one, I see it every time, and on the other never at all. Also, I never saw this when disconnecting a stick, a memory card or a phone.

Just with one docking station (Icy Box IB 111 with integrated hub). It's not the hub either, second USB 3 dock works perfectly through the hub of the one producing the error. Also, the dock producing the error is hotplug capable, according to Icy Box.

Strange, but the hardware dependancy is obvious.

Also, I noticed when I correctly disconnect a drive on USB 3, kern.log says
Oct 20 01:39:08 FSC kernel: [12509.993534] usb 10-1.4: reset SuperSpeed USB device number 19 using xhci_hcd
Oct 20 01:39:08 FSC kernel: [12510.011574] xhci_hcd 0000:02:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff88003eec3b80
Oct 20 01:39:08 FSC kernel: [12510.011578] xhci_hcd 0000:02:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff88003eec3bc0
Oct 20 01:39:08 FSC kernel: [12510.028700] usb 10-1.4: USB disconnect, device number 19
Oct 20 01:40:42 FSC kernel: [12604.084118] usb 10-1: USB disconnect, device number 17
Oct 20 01:40:42 FSC kernel: [12604.084122] usb 10-1.1: USB disconnect, device number 18

When I disconnect with the error, nothing gets written to kern.log at all.

Revision history for this message
Oliver (ok23) wrote :

Oh, forgot to add info: I run Lucid, and have the 3.0.26 kernel (oneiric-generic) (otherwise I get loads of stale endpoint errors on USB 3...).

Revision history for this message
gbachot (geert-bachot) wrote :

Same here, when I "safely remove" the external USB drive, Maxtor, 500GB.
It does unmount as it should, though.
Ubuntu 12.04.4, gnome-shell.

Error detaching: helper exited with exit code 1: Detaching device /dev/sdc
USB device: /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.2)
SYNCHRONIZE CACHE: OK
STOP UNIT: FAILED: No such file or directory

Revision history for this message
Mihai Capotă (mihaic) wrote :

Launchpad is not updating the status of the Freedesktop and Fedora bugs. They should be Invalid and Won't Fix, respectively.

Changed in nautilus (Fedora):
importance: Unknown → Medium
status: Unknown → Won't Fix
Displaying first 40 and last 40 comments. View all 101 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.