Article ID: 169404 - View products that this article applies to.
This article was previously published under Q169404
A directory in which files are repeatedly created and deleted eventually becomes corrupt. Subsequent attempts to access files in the directory or to create or delete files in the directory yield pop-up window indicating that the directory is corrupt and instructing the user to run CHKDSK.
When CHKDSK is run, it generates output like the following (although the specific file record segments affected will vary):
Deleting corrupt attribute record (16, "") from file record segment 286. Deleting corrupt attribute record (32, "") from file record segment 286. Deleting corrupt attribute record (48, "") from file record segment 286. Deleting corrupt attribute record (80, "") from file record segment 286. Deleting corrupt attribute record (144, $I30) from file record segment 286. Deleting corrupt file record segment 286. Deleting orphan file record segment 8628. Deleting index entry DirectoryName in index $I30 of file 244. CHKDSK is recovering lost files.
Multiple attributes associated with a given file have the same attribute instance tag value. This is only likely to happen in directories where many files are repeatedly added and deleted in an "unbalanced" way.
To resolve this problem, you can do one of the following:
Microsoft has confirmed this to be a problem in Windows NT version 3.51. A supported fix is now available, but has not been fully regression tested and should be applied only to systems experiencing this specific problem. Unless you are severely impacted by this specific problem, Microsoft recommends that you wait for the next Service Pack that contains this fix. Contact Microsoft Technical Support for more information.
Microsoft has confirmed that this is a problem in Windows NT 4.0 and Windows NT Server 4.0, Terminal Server Edition. This problem was first corrected in Windows NT 4.0 Service Pack 4.0 and Windows NT Server 4.0, Terminal Server Edition Service Pack 4.
Attribute entries within an NTFS File Record Segment (FRS) are labeled with an "instance tag" that must be unique for the attributes in a given FRS. The value for an attribute instance tag is generated when an attribute is created. Thus, typical instance tag values range from 0 to about 10 on most files.
If an attribute is deleted and recreated, it receives a new instance tag. Each time a new instance tag is needed, NTFS increments a counter associated with the FRS in question and uses the next previously unused value. Thus, instance tags can grow without bound if attributes are repeatedly destroyed and recreated.
For the vast majority of files and directories, the scheme described above does not result in any problems because, once created, FRS attributes tend not to be deleted and recreated. There is one scenario that is known to be an exception. If many files are repeatedly added to a directory and then deleted from the directory in such a way that the "binary tree" that indexes the directory becomes unbalanced, the "index root" attribute for the directory is repeatedly destroyed and re-created. Because instance tags are only 16 bits in size, this means that instance tags can be duplicated after a directory index has been rebalanced 65,535 times. Note that even if instance tags are duplicated, the directory will not be considered corrupt unless, at some point, it contained a sufficiently large enough number of files. Therefore this problem may be difficult to reproduce except in directories containing large numbers of files.
Article ID: 169404 - Last Review: November 1, 2006 - Revision: 1.3
Contact us for more help
Connect with Answer Desk for expert help.