INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Delayed Write Failure  (Read 3732 times)

Peter Engrav

  • Regular Member
  • Recent member
  • *
  • Posts: 35
  • nothing more to say...
Delayed Write Failure
« on: May 06, 2006, 11:24:30 am »

For the last few months (11.1 and up, I think, but other things have changed as well) I've been getting quite frequent "Delayed Write Failures" when doing big operations in MC (convert a bunch of files format, etc.).  If I leave MC running for 3 or 4 hours converting say 1000 files I'll get 3 or 4 of them.  This is running with both the music files themselves and the library on network shares.  The two machines, however, are right next to each other on a switch with hardly anything else on it.  XP on one, 2003 on the other.  The same setup worked just fine until a few months ago.  Mostly I suspect stuff external to MC but I just realized I've only ever actually seen failures from it.  So maybe something changed in recent builds about file handling?  Maybe anyone else has seen this?

In the meanwhile I'll keep playing with everything else ...
Logged

zxsix

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1753
Re: Delayed Write Failure
« Reply #1 on: May 06, 2006, 12:24:24 pm »

Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20054
Re: Delayed Write Failure
« Reply #2 on: May 06, 2006, 02:08:13 pm »

yes it is a drive OS issue.

If it is a firewire drive a reboot may be needed after a drive is turned on or off. USB drives work better when it comes to this.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Delayed Write Failure
« Reply #3 on: May 06, 2006, 11:48:25 pm »

In case you don't know what a Delayed Write Failure is, a brief explanation.  All modern operating systems cache data writes to improve performance.  Hard drives are extremely slow, when compared to RAM access (which is slow when compared to L2 Cache, and so on right to the CPU's registers).  The OS assumes that most of the time when you use data on the drive and save it, there's a fair possibility that you might save that data again some time soon (or a nearby, similar piece).   It saves time to just store that data in RAM for a few moments (and act like it saved it to disk to you and the rest of the programs running) and "save up" until you have a big enough batch of data to write all at once.  Also, if you re-change that data (ever click save two or three times in a row on a Word document?), it doesn't waste time writing out to the slow disk the first time(s) by using the exponentially faster ram.  This is called a delayed write.  The OS is holding, or caching, that data until it's good and ready to write it (which usually happens within a few seconds).

A delayed write failure is when later comes, and the system tries to write the data out to the disk, and something doesn't work, so the data gets lost (or partially lost or maybe it got there but didn't confirm that it did, the OS doesn't know).  This isn't good, because the data lost could be only part of a file, or there could be random data overwritten in the middle of other files (if a file only got 1/2 moved).  Either way, bad news.  The write shouldn't have failed unless you disconnected the drive or shut down the computer -- which is why you shouldn't unplug external drives without "disconnecting" them in the OS first and is why you should always "shut down" Windows properly and not just yank the plug.

Assuming you weren't doing those things... This can also be a very bad sign for the drive's health physically (or the drive's cable).  Obviously, if it randomly can't write data, something is wrong.  I would probably take immediate action to backup any data on the drive.  Remember, its never a question of "if" a drive will die, its a question of when.   We haven't yet figured out how  to build a machine that spins at 7200 RPM 24 hours a day, 7 days a week, and have it last forever -- not if we plan to sell it on Newegg.com for 50 cents a GB anyway.  Eventually, on the 20 billionth spin round, something in that mechanism is going to break or wear down.

So... Lecture complete.  Back it up, then check the disk format for errors.  It could be a 100 things wrong in software, but most of them are unlikely if you haven't been mucking around in the registry, overclocking, or running weird drivers.  Also, swap out the drive cable (either IDE ribbon, USB, Firewire, or SATA ... whatever, just try it with another cable), as that is a common culprit.  Even if swapping the cable (or investigating a sofware fix) proves to be a culprit, I would probably plan to reformat the drive anyway and restore from backup.  All that random data lying around on the drive can a be little like digital "rot" (as some people call it)  At one point when my old media drive was dying (and throwing delayed write failure errors) I ended up with a bunch of corrupted music files (weird things, hunks of static thrown in, bits and pieces of songs mixed up in others, and a pile of songs that would crash explorer if you simply selected them).

Either way, something to address immediately.

EDIT: I hadn't remembered to mention when I got into this rant that you referred to network drives.  This could also certainly be a network issue (for the same reasons, something blocked the data from being properly saved -- it could be any of the devices "in the way").  You'll really need to check all of the links in the chain.  An easy way to do this is to try to eliminate them.  Can you reproduce errors on the system locally (without using the network at all)?  If so, then look to the drives, if the network seems to be required to cause errors check the switch, NICs, and drivers.  Look for things that have changed and try to reduce complexity.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Delayed Write Failure
« Reply #4 on: May 07, 2006, 05:53:57 am »

I've got a USB drive on a 6m USB Cable, which places the drive
on the opposite side of the room.  For a while I was getting these
frequently(Once a week?).   I thought about it for a while, and realised the cable
was at some points close to the incoming power cable for
the computer, amp etc.  I made some space between these two, and
that was about 2 months ago.  Not seen it since.

dlone

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 264
Re: Delayed Write Failure
« Reply #5 on: May 07, 2006, 08:32:35 am »

One other way you can get these errors is by doing a 'quick' format

Basically, no hard drive is perfect
A 'quick' format doesn't check the data surface for errors, it just writes an apparently blank filesystem to the hard drive

When you do a full format (and who does that now? it takes forever on large hard drives - and besides 'quick' just sounds so much better...), Windows will atempt to access each sector on the drive, an if it can't access it, it marks that place on the drive as being defective and not to use it again

As well as this, the hard drive itself reserves a few areas of the drive for 'replacements'  - in other words - even the hard drive itself knows it ain't perfect and will swap the faulty bit for the working bit

Of course, the question is, how much do you keep in reserve in case of errors?

Not a lot

As an example of this i'd like to intoduce you to my drive F:
It's a 250Gb drive that has caused me 1 problem in use
<sigh> First time I installed it, i would get 'delayed write' errors al the time
Then I formatted it properly instead of the 'quick' way

Result?
Well, I have a 250Gb hard drive that has 1Mb of bad sectors - but, it's a manufactureing defect, and after a year this error has never shown up again
I can put up with losing 1Gb of drive space for the sake of spending a longer time to format ;-)

HOWEVER if you DID do a full format and these errors are continuing, this is a sign that your hard drive is dying (unless it's something stupid - like you forced windows to use the wrong drivers)

In conclusion - there's 2 types of hard drive problem you could be seeing
1) There's a bit of something on the disk surface (why do you think they wear the bunny suits?)
2) The surface is peeling off (due to... something on the disk surface)

What to do?

Either



1)Back it up NOW
2)Reformat (not the quick versio)
3)Copy all the stuff back
Logged

dlone

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 264
Re: Delayed Write Failure
« Reply #6 on: May 07, 2006, 08:40:40 am »

What on earth happend there?

Got kicked out and I can't edit my post

--------------------------------------------------

Something to try

WARNING
Do this before you go to bed
It may require a reboot
Either way it's going to take a long time
Bigger the drive, the longer it'll take

 from the cmd prompt, try 'chkdsk <x>: /r'
where <x> is the letter of your drive
(this is the microsoft version of 'try to read everything' - if it's doesn't work, that bit's screwed)
...be warned this may delete stuff you _thought_  you had, but infact you hadn't ...you actually had 'delayed write failure' and this file would have contained total garbage
It will probably be deleted (if corrupt) but that's got to be better than thinking everything is AOK when in reallity the data is total junk
Although, sometimes Windows goes to great pains to recover what turns out to be a completely useless file

Now, I can't stress the importance of this enough, but DO IT
Why?
Well, considering how small the bits of information on your hard drive is, even the smallest problem will leave you with a bad chunk of drive
And, it's statistically more likely that you have a hard drive that has a bit of dirt on it than you have peeling layers

So, what do you have to loose......
After all, whatever was'delayed write fail'ed has GONE
Logged

Peter Engrav

  • Regular Member
  • Recent member
  • *
  • Posts: 35
  • nothing more to say...
Re: Delayed Write Failure
« Reply #7 on: May 07, 2006, 11:21:54 am »

Right.  Clearly "Delayed Write Failure" is actually a wildly generic error.  In a way that sort of breaks the standard "get an error, search for it on the internet, find someone else with your problem" algorithm.  It's probably important to check the "sub error code" in the actual data blob written into the event.

"The event log must contain event ID 50 with a source of MrxSMB. The event contains the same text as the error message, but also contains the error status in the data section. Double-click the event, and then click Words for the data type; the last word contains the status."

I lamely haven't done this with my failure (and amusingly need to wait for it to happen again - for some reason I can't quite fathom I cleaned out my event log).

Unfortunately the majority of the posts on the net about such failures end up recommending that you install some patch or other - all of which are already fixed in WinXPSP2.  Which I have.

My issue is definitely network related.  The drive in question is actually a Promise UltraTrack 8-drive RAID array, which is used (over the network) for a bunch of stuff by a 4 or 5 other machines (including some relatively big weekly backups).  Lots of exercise there from lots of places and never this error.  Interesting.

If indeed the error is the one mentioned in a post above (with status code 0xC0000022, STATUS_ACCESS_DENIED) then the problem may be an OS bug exposed by correct but "odd' code in MC. If an app opens a file handle with read access and then later opens a second handle (same process, same file) with read+write access but doesn't close the first handle and then runs like that for a while (doing writes to the second handle) I've seen the OS apparently get muddled and try to write to the first (read-only) handle (hence ACCESS_DENIED). In my case, changing the app to release the read handle (which it didn't really need anyway) after it got the read+write handle worked around the issue.
Logged

mesue

  • Galactic Citizen
  • ****
  • Posts: 395
Re: Delayed Write Failure
« Reply #8 on: May 07, 2006, 04:39:34 pm »

For the last few months (11.1 and up, I think, but other things have changed as well) I've been getting quite frequent "Delayed Write Failures" when doing big operations in MC … (snip)  The same setup worked just fine until a few months ago.  Mostly I suspect stuff external to MC but I just realized I've only ever actually seen failures from it.  So maybe something changed in recent builds about file handling?  Maybe anyone else has seen this?

I have all my music files on a Ximeta Netdisk and I have also been getting the "Delayed Write Failure" errors ever since I started using the MC 11.1 builds. I've had the Netdisk longer than I've been using MC but these errors didn't start until I started using the 11.1 builds. It has always and only happened when MC was open. Almost every time was when MC was left with a song on pause, but at least once it happened while playing.

I do suspect something in MC 11.1 is at the root of this. I have to be very careful now to close MC when I leave my computer for a while, and I can't leave it paused for very long or it is sure to happen.

So far I don't think I have lost any data because of it, but it sure is making me nervous, and it is quite an annoying procedure to get the NetDisk back online after it happens.
Logged
Sue

Robert Taylor

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 646
  • Living in a Smokeless Zone...
Re: Delayed Write Failure
« Reply #9 on: May 07, 2006, 04:41:28 pm »

It's not possible that the machine is closing the network interface  to "conserve power" is it? There is an option under your network card settings which allows Windows to shutdown your network card when it decides there's been no activity for a while. This can cause some strange problems.

I've only ever seen delayed write failures on my external drive, and generally when accessing it via Firewire rather than USB.

You also sometimes see them on a USB memory stick if you pull it out before stopping it (although this seems rare under WindowsXP)

So, the machine you are getting the delayed write failures on is the machine with the Promise RAID controller in it?

I have a Promise SX4000 RAID controller, and it has a slot on it for up to 256Mb of SDRAM for use as a cache. If yours has a stick of onboard RAM which is user changable, have you tried swapping it for another? I remember having some weird stuff happen with my Promise when the RAM stick lost its marbles...



Logged
Cheers
Rob

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Delayed Write Failure
« Reply #10 on: May 07, 2006, 05:49:22 pm »

My issue is definitely network related.  The drive in question is actually a Promise UltraTrack 8-drive RAID array, which is used (over the network) for a bunch of stuff by a 4 or 5 other machines (including some relatively big weekly backups).  Lots of exercise there from lots of places and never this error.  Interesting.

I would guess so too... However, I'm not so sure about your ACCESS_DENIED guess.

I'm using a Promise FastTrak S150-SX4 (which is their little, 4-drive, SATA Hardware RAID5 PCI card) and I've never had similar problems even with all the recent builds of MC (and I would expect to see issues here too if it was as you described).  I'd probably start troubleshooting the network...
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/
Pages: [1]   Go Up