A fragmented horror story

In the forum unrelated to drivers development which I occasionally read I noticed an interesting post which might indicate NTFS bug. Basically, the guy who posted it claims his PC (XP SP1) started freezing when highly fragmented file was present. The file was about 600 - 700 MB size and fragmented to 92000 pieces. He claims problems disappeared immediatelly when file was deleted. There was no space free space problem, about 7 GB free space of 20 GB.

I’m just curious: might it be caused by some internals NTFS tables overflow? And does it makes sense at all to somebody?

Original post:

I’m still recovering from one of the worst Windows-induced
psychoses that I survived about three weeks ago. The problem:
PC with XP SP1 freezing randomly after a few minutes or hours.

I started with the usual suspects: memory and every single
card, especially the ATI graphics one. Tried two other
graphics cards – same problem. Swapped slots, based on “expert”
advice on the net – I don’t know how sound this is, but
there seem to be “rules” out there, like “sound card in
PCI slot #5, network card slot #3”, etc.

Of course, removing stuff from the box caused XP to
start telling me to (re)register my copy in 60 days.
(When the ordeal was over, the message was: “2 days left
to register”…)

Something also got me worried: my board is VIA-based, and
there seem to be “known issues” with capacitors melting after
a few years?!? There were many other (imagined) causes that
I tried to confirm but couldn’t. Played with BIOS settings –
the usual shots in the dark by desparate idiots still believing
that this “technology” can be fixed at this stage of bloat
and rot.

I did not want to re-install everything, but find out the real
cause. Another proof that I’m out of touch with reality –
today, one does not try to understand. Instead, use brute
force (re-install), and keep going clueless. Booting from
DOS was rock solid, but not from my C (XP) and D (W2K)
drives. Both are NTFS.

This lasted about 2 months, with all sorts of chaos
at home (Internet, school, work) adding to the fun.

I used Ghost Explorer to extract *parts* of some
recent backups to roll-back drivers, etc., but no
luck. I felt it wasn’t hardware, although the symptoms
idicated just that. Ad-aware, Spybot, RegCleaner –
no luck.

I decided to defragment, which is the standard tip I give
to others, just to gain time, before suggesting giving
up re-formating, re-installing.

What do I find? There are plenty of fragmented files, but
one is made up of 92,000+ fragments! It’s one of the games
my son had installed recently, on drive C. But it
was rarely played, it was just sitting there, about
600-700 MB.

Without even defragging, I deleted this file and there
has been no freeze ever again! Conclusion: the very
presence of such a file on one of the disks (even when
I booted from D) seemed to cause the system to freeze.

Note that no programs need to be run, just log in,
get to the desktop and click a button – freeze.

Does this make any sense?

Windows at some point accesses the disks and buids some
tables, caches, etc. I don’t think I had indexing enabled
on my disks. But does it know right away about all
fragments? (I know that on OpenVMS this is stored in
INDEX.SYS file, which has a few limitations, but does not
even need to be contiguous.)

It looks like the OS has a problem with 92,000+ fragments
that causes some memory corruption and/or stepping over some
other vital data. Maybe the corruption is already in the
disk tables itself?

I have no idea what the architectural limits are, if any.
32K fragments? 64K?

In any case, getting rid of these fragments (by deleting
the file) WAS the fix. I think the fix would have worked
even if I defragmented the disk – ah, I’ve tried, but
the PC kepts freezing during defragging!

Alas, I can’t prove that this is a bug in NTFS or some other
component.

I should have maybe Ghosted the disk and kept on testing
to prove the hypothesis, but this had already cost me too
much in wasted time, sleep, health…

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]