Question USB memory stick "the semaphore timeout period has expired"

itm

Distinguished
Apr 10, 2004
215
2
18,695
I have a Lexar USB memory stick which failed to copy a file (in Windows 10). I aborted the copy and retried the copy, but kept getting "the semaphore timeout period has expired".
So then I opened Disk Manager and tried to format the drive. I got the same error. So I removed the drive, re-inserted it, and tried to delete the partition. Same error.
I then plugged the drive into a different machine and tried to delete the partition again - same error.

Any ideas??
 

SparkyTech934

Reputable
Jan 22, 2020
107
14
4,665
Hi there, hopefully I can help you out!

Does the source file still open? If you navigate to the file that you're trying to copy, make sure you can open it/use it to ensure that it's not corrupted. If you could confirm that, it would be very helpful! Also, what is the capacity of the flash drive, and what file system were you formatting it as?
 

itm

Distinguished
Apr 10, 2004
215
2
18,695
Hi there, hopefully I can help you out!

Does the source file still open? If you navigate to the file that you're trying to copy, make sure you can open it/use it to ensure that it's not corrupted. If you could confirm that, it would be very helpful! Also, what is the capacity of the flash drive, and what file system were you formatting it as?
The source file is fine. After a reboot, I am now trying to delete the folder from the USB stick, but it's stuck at the "Calculating..." stage. The folder contains 3 files, totalling 187MB.

The capacity of the memory stick is 256GB, formatted as exFAT
 

itm

Distinguished
Apr 10, 2004
215
2
18,695
The source file is fine. After a reboot, I am now trying to delete the folder from the USB stick, but it's stuck at the "Calculating..." stage. The folder contains 3 files, totalling 187MB.

The capacity of the memory stick is 256GB, formatted as exFAT
...and now the USB drive is completely inaccessible - I get "Please insert a disc into Removable Disk (K:)" if I select it in File Explorer.

If I right-click and select the Format option I get: "Windows was unable to complete the formatting"
???
 

SparkyTech934

Reputable
Jan 22, 2020
107
14
4,665
Glad to hear the source file is fine! It may be a dead flash drive, but before we settle on that, I'd like to try something that will reset the flash drive entirely. I have faith we can get it fixed up for you!

For this we'll be using Microsoft's diskpart utility built into windows. it's tried and true and it one of my all-time favorite command line programs.

After a reboot (just for consistencies sake), insert the flash drive and open PowerShell or command prompt (as administrator!). Once there we will launch the Windows 'Diskpart' utility to fix the device.

While in the newly opened terminal window type in the following commands (commands in italics):
  1. diskpart
    1. This will launch diskpart from within the command line windows. Wait for the terminal to launch the program with a blinking cursor
  2. list disk
    1. Lists the drives in the computer. Identify your flash drive based off of capacity (normally will be the highest disk number)
  3. select disk X
    1. WHERE X is a number from the list above.
    2. example: sel disk 3 (that would select disk 3)
  4. detail disk
    1. This will show you everything you need to know about the disk/drive that you just selected. Make sure the name that it reports is something like 'Lexar USB Flash Drive'.
    2. If the disk you selected in step 3 is incorrect, select a different disk and detail disk until you have the right one.
  5. clean
    1. Execute this to completely wipe the partition table from the device. If you want to really clean it, execute clean all instead, but this will take much longer. (Writes all zeros to the drive)
  6. convert GPT
  7. create partition primary
  8. format fs=exfat quick
  9. assign letter=X
    1. Where X is whatever free driver letter you want to assign! (usually D or E, something like that)
This is a surefire way to reset the drive and start fresh. Please reach out if you need clarification, but it's worth the read and experiment to see if this works! Best of luck!
 
Last edited:

itm

Distinguished
Apr 10, 2004
215
2
18,695
Thanks for the suggestion. It failed at the "clean" stage:
Code:
DISKPART> select disk 6

Disk 6 is now the selected disk.

DISKPART> detail disk

Lexar USB Flash Drive USB Device
Disk ID: 00000000
Type   : USB
Status : No Media
Path   : 0
Target : 0
LUN ID : 0
Location Path : UNAVAILABLE
Current Read-only State : No
Read-only  : No
Boot Disk  : No
Pagefile Disk  : No
Hibernation File Disk  : No
Crashdump Disk  : No
Clustered Disk  : No

There are no volumes.

DISKPART> clean

DiskPart has encountered an error: The device is not ready.
See the System Event Log for more information.

When I first inserted the drive I repeatedly (maybe 5-6 times) got a pop-up, saying "You need to format the disk in drive L: before you can use it". I cancelled this each time it came up.

I then removed the USB stick and inserted it into a different USB port (at the front of the computer). When I tried again I got this error from the CLEAN command:
Code:
Virtual Disk Service error:
There is no media in the device.
 

SparkyTech934

Reputable
Jan 22, 2020
107
14
4,665
Well,

That certainly does not bode well. How old is the flash drive? If it's still covered by warranty, you may want to request a replacement. Sounds like a dead flash drive. There are however, two more ways I can think to verify if it's dead..

1. do a windows search for "Create and format hard disk partitions". Run the program. This is another way to manage drives. It does the same thing that diskpart does, but it's worth a shot.. Locate your flash drive, and you can try to format it there, by clicking on the 'empty' black drive space. It may ask you to initialize the disk first (as MBR or GPT, either works, but I recommend GPT, especially if you only use newer computers). Try to create a partition using that tool, and format it. If it doesn't work, like diskpart, it's not looking too good.

2. Last but not least, Linux. If you have a machine running Linux, you can try to erase and format the disk using something like parted, Gparted, fdisk, etc. You can also try doing the diskpart steps again on another machine just to make sure it's not just your computer having an issues with the flash drive.

I sincerely hope that this helps and that you can use your drive again! Let me know how things work out!
 

itm

Distinguished
Apr 10, 2004
215
2
18,695
Thanks for the feedback. The drive is 5 years old, but has seen very little use - it's been sitting in a drawer unused for most of the time that I've had it. I'd say it's been written to less than a dozen times.
I've tried using Windows Disk Management to format and delete the partition, but neither works - I usually get the "semaphore" error. Tried the same thing on another Windows 10 laptop and it failed there too.
I've also tried passing the USB stick through to a Ubuntu VM (running under VirtualBox) and using the Disks utility to format the partition, but I get this error:
Code:
Error wiping device: Failed to probe the device /dev/sdd (udisks-error-quark, 0)
 

SparkyTech934

Reputable
Jan 22, 2020
107
14
4,665
Sorry to hear that this still didn't work. To me, it sounds like it's pretty much donezo.. There is one more option, you can try a USB flash drive reset tool (one by Bureausoft called 'USB Drive Factory Reset Tool'. Info linked here). This may be able to revert the drive and overwrite bad (RAW) data in it. Besides trying this though, you may be out of luck. Was the drive stored in a humid environment? Or extreme heat/cold? It doesn't sound like it. Just bad luck I suppose.

If you can't ressurect it, and need a replacement, I highly recommend the Samsung BAR Plus flash drives. They are bulletproof, fairly cheap, and fast for USB type A interface. A replacement similar to yours (capacity) on Amazon is linked here (on sale as of 10/26/2022).

Best of luck, please keep me posted if you try a USB reset tool, I want to see if it can fix it! Also consider picking a solution if anything helped. Thanks, and best of luck!
 
Last edited:

SparkyTech934

Reputable
Jan 22, 2020
107
14
4,665
Yeah, I think it's toast! Sorry to hear that, I hate not being able to solve a problem :tearsofjoy:. If you get something to work, please update me! And if you found any posts helpful, consider picking a solution to help others find answers. Thanks so much!