USB thumb drive random re-plugging ("Delayed Write Failed")

B

BubbaGump

I have a USB thumb drive, and I've noticed that if I have it plugged
in while I plug in my USB mp3 player into a different USB port then
the thumb drive's root directory will pop up in an Explorer window as
if I had just unplugged and then plugged it back in again (even though
I haven't touched it). I think the Plug N Play manager is actually
re-enumerating it, removing and re-adding the device stack, because if
I'd previously enabled write caching ("Optimize for performance" in
Device Manager) and formatted it with NTFS then I'll get "Delayed
Write Failed" error messages at this time.

Yes, I know I can disable write caching to make the error message go
away, but I think that will only make the problem less likely to
happen and less likely to notice. I want the drive to work correctly,
not simply fail silently. If there happened to be data transferring
to the thumb drive at the moment when it disappeared and re-appeared
then that data would be lost. Is this a Windows problem, USB host
controller problem, or a USB device problem?
 
M

Marc Reinig

Sounds like your mp3 player is drawing too much power supply current for
your hub and forcing a reboot and re-enumeration of everything attached.

Marco
________________________
Marc Reinig
UCO/Lick Observatory
Laboratory for Adaptive Optics
 
G

Guest

Marc Reinig said:
Sounds like your mp3 player is drawing too much power supply current for
your hub and forcing a reboot and re-enumeration of everything attached.

Yep. It may cause USB bus reset.
Does popup of explorer always reproduce? Does disabling caching really
avoid the popup?

--PA
 
B

BubbaGump

Yep. It may cause USB bus reset.
Does popup of explorer always reproduce? Does disabling caching really
avoid the popup?

Huh. Actually, it's one of those problems that's hard to reproduce on
purpose but which I've seen more than once. A long time ago I also
saw it while transferring a bunch of songs to the mp3 player in the
background. I would try to use my computer normally, to type in
another window for instance, and it became annoying because an
explorer window for the thumb drive would keep coming to the
foreground every 30 seconds or so.

I first noticed the problem with caching disabled (optimize for quick
removal in Device Manager). That's how I always used to run. I
haven't actually verified data loss in this situation, but it's
possible unless one of the layered drivers that maintains a persistent
name for its device also does retries and keeps persistent context for
the device in some global area outside of the device object so that it
can recover when the device re-appears, but it's also annoying to have
a window to the drive's root directory keep re-opening. Would any
storage drivers, including the FAT32 file system, really go this far
to retry an I/O themselves before reporting failure to the next layer
up?
 
B

BubbaGump

If that's the case, do you think an external self-powered hub might be
used to isolate the player from the rest of the bus?
 
M

Marc Reinig

Sure.

Marco
________________________
Marc Reinig
UCO/Lick Observatory
Laboratory for Adaptive Optics
 
G

Guest

BubbaGump said:
Would any
storage drivers, including the FAT32 file system, really go this far
to retry an I/O themselves before reporting failure to the next layer
up?

Only usbstor is aware of USB resets and is in the position to do recovery.
But you see the explorer window popping up, this means that volume arrival
events were broadcasted, so usbstor does not handle this transparently.

--PA
 
B

BubbaGump

Only usbstor is aware of USB resets and is in the position to do recovery.
But you see the explorer window popping up, this means that volume arrival
events were broadcasted, so usbstor does not handle this transparently.

Right. I see now the problem would be determining that the device is
still plugged into the port. It would be bad to maintain persistent
data for a device that's been unplugged, modified at a different
computer, and then plugged back in. :)

Of course another problem with the driver even attempting recovery is
apparently an over-current condition could cause power to be lost on
more ports than just the bad one. In that case, it doesn't seem
possible for even the hub driver to distinguish the over-current
condition from the device being physically unplugged, unless the
over-current bit remains set even after port power is lost.

In any case, USB pisses me off. I'm glad PCI, IDE, and SATA don't
have these reliability problems (I'm assuming the physical layer of
SCSI doesn't, but I don't use it on a regular basis). I actually used
to also see these problems with an external USB hard drive enclosure I
used to back up the important parts of my hard drive to an old IDE
drive. I finally threw the enclosure away after deciding it was
easier to power off, open my case, and plug the drive into my normal
IDE controller.
 
M

Maxim S. Shatskih

In any case, USB pisses me off. I'm glad PCI, IDE, and SATA don't
have these reliability problems (I'm assuming the physical layer of

This is usually due to implementation quality of El Cheapo USB peripherals, it
can be as low as standard violation.

There are good USB disks enclosures (I have 2 of them) and there are very, very
inferior.
 
B

BubbaGump

This is usually due to implementation quality of El Cheapo USB peripherals, it
can be as low as standard violation.

There are good USB disks enclosures (I have 2 of them) and there are very, very
inferior.

Please mention the brand name of the good ones. Reliable data
transfer without having to power off and open my case would make me
happy. :)
 
M

Maxim S. Shatskih

Please mention the brand name of the good ones. Reliable data
transfer without having to power off and open my case would make me
happy. :)

Sarotech and Oxford Semiconductor
 
J

Jeff Henkels

Maxim S. Shatskih said:
Sarotech and Oxford Semiconductor

Good to know -- I have a couple of cheapo USB/FW enclosures I picked up at
Fry's. They both use the Oxford chip.
 
B

BubbaGump

Good to know -- I have a couple of cheapo USB/FW enclosures I picked up at
Fry's. They both use the Oxford chip.

Your enclosures are bad too or just cheap? :)
 
K

konrad

Your enclosures are bad too or just cheap? :)

BTW, Is is possible on a Win XP machine (no checked build) to get
the USB connects, disconnects, HUB errors into the event log
somehow (Registry setting etc?) in order to identify hardware
problems (e.g sometimes the system says that a device has been
removed from the system w/o doing a safe removal first [ not even
givin any hint about what device has been considered removed ]...)

I found the log output from the Linux kernel incredibly
useful to help identifying marginal USB hardware in more or
less realtime - just by watching the system log while bending
cables/connectors and so on.

(it is possible to see USB hub and device info using the checked
build and a kernel debugger but this is quite cumbersome and it runs
very slow and the windows kernel seems to hit a couple of
assertions when plugging and unplugging a device)

Any hints are very welcome

Greetings,
Konrad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top