Microsoft KB Archive/906212

= FIX: File contents may be lost when separate threads perform the WriteFile operation and the MoveFile operation on the same file at the same time in Windows CE .NET 4.2 =

Article ID: 906212

Article Last Modified on 7/25/2006

-

APPLIES TO


 * Microsoft Windows CE .NET 4.2

-





SYMPTOMS
In Microsoft Windows CE .NET 4.2, when separate threads perform the WriteFile operation and the MoveFile operation on the same file at the same time, some of the file contents may be lost. When you examine the removable media on which this problem occurs by using the Microsoft Windows XP Chkdsk tool, the Chkdsk tool reports lost clusters in one or more chains.



CAUSE
When a file that is open is moved or renamed, the in-progress changes to the file size information may be overwritten with old values by another thread. The part of the file that was recently added to the end of the file becomes disconnected from the chain of clusters that belong to the file.



Software update information
A supported software update is now available from Microsoft as Windows CE 4.2 Core OS QFE 906212. To resolve this problem immediately, click the following article number for information about obtaining Windows CE Platform Builder and core operating system software updates:

837392 How to locate core operating system fixes for Microsoft Windows CE Platform Builder products

Prerequisites
This update is supported only if all previous updates for this product are also installed.

Restart requirement
After you install this update, you must perform a clean build of the whole platform. To clean the platform, click Clean on the Build menu. To build the platform, click Build Platform on the Build menu. You do not have to restart the computer after you apply this update.

Update replacement information
This update does not replace any other updates.

File information
The English version of this package has the file attributes (or later file attributes) that are listed in the following table.   Date         Time   Size       File name --  27-Aug-2005  00:33  8,167,424  Wincepb42-050826-kb906212-armv4.msi 27-Aug-2005 00:33  8,170,496  Wincepb42-050826-kb906212-armv4i.msi 27-Aug-2005 00:33  8,207,872  Wincepb42-050826-kb906212-mipsii.msi 27-Aug-2005 00:33  8,207,872  Wincepb42-050826-kb906212-mipsii_fp.msi 27-Aug-2005 00:33  8,224,768  Wincepb42-050826-kb906212-mipsiv.msi 27-Aug-2005 00:34  8,225,280  Wincepb42-050826-kb906212-mipsiv_fp.msi 27-Aug-2005 00:33  8,114,688  Wincepb42-050826-kb906212-sh3.msi 27-Aug-2005 00:33  8,112,128  Wincepb42-050826-kb906212-sh4.msi 27-Aug-2005 00:33  8,015,360  Wincepb42-050826-kb906212-x86.msi The English version of this update has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.   Date         Time   Size     File name Path: Public\Common\Oak\Lib\Armv4\Debug 18-Aug-2005 21:14  652,194  Fatfsd.lib 18-Aug-2005 21:14  738,022  Tfat.lib

Path: Public\Common\Oak\Lib\Armv4\Retail 18-Aug-2005 21:14  374,196  Fatfsd.lib 18-Aug-2005 21:14  415,498  Tfat.lib

Path: Public\Common\Oak\Lib\Armv4i\Debug 18-Aug-2005 21:15  652,868  Fatfsd.lib 18-Aug-2005 21:15  738,820  Tfat.lib

Path: Public\Common\Oak\Lib\Armv4i\Retail 18-Aug-2005 21:14  374,644  Fatfsd.lib 18-Aug-2005 21:14  415,994  Tfat.lib

Path: Public\Common\Oak\Lib\Mipsii\Debug 18-Aug-2005 21:15  667,684  Fatfsd.lib 18-Aug-2005 21:15  753,124  Tfat.lib

Path: Public\Common\Oak\Lib\Mipsii\Retail 18-Aug-2005 21:15  382,916  Fatfsd.lib 18-Aug-2005 21:15  424,840  Tfat.lib

Path: Public\Common\Oak\Lib\Mipsii_fp\Debug 18-Aug-2005 21:15  667,826  Fatfsd.lib 18-Aug-2005 21:15  753,214  Tfat.lib

Path: Public\Common\Oak\Lib\Mipsii_fp\Retail 18-Aug-2005 21:15  383,054  Fatfsd.lib 18-Aug-2005 21:15  424,992  Tfat.lib

Path: Public\Common\Oak\Lib\Mipsiv\Debug 18-Aug-2005 21:16  676,042  Fatfsd.lib 18-Aug-2005 21:16  763,406  Tfat.lib

Path: Public\Common\Oak\Lib\Mipsiv\Retail 18-Aug-2005 21:15  385,672  Fatfsd.lib 18-Aug-2005 21:16  428,402  Tfat.lib

Path: Public\Common\Oak\Lib\Mipsiv_fp\Debug 18-Aug-2005 21:16  676,184  Fatfsd.lib 18-Aug-2005 21:16  763,496  Tfat.lib

Path: Public\Common\Oak\Lib\Mipsiv_fp\Retail 18-Aug-2005 21:16  385,812  Fatfsd.lib 18-Aug-2005 21:16  428,552  Tfat.lib

Path: Public\Common\Oak\Lib\Sh3\Debug 18-Aug-2005 21:16  572,784  Fatfsd.lib 18-Aug-2005 21:16  645,724  Tfat.lib

Path: Public\Common\Oak\Lib\Sh3\Retail 18-Aug-2005 21:16  348,612  Fatfsd.lib 18-Aug-2005 21:16  385,562  Tfat.lib

Path: Public\Common\Oak\Lib\Sh4\Debug 18-Aug-2005 21:17  572,430  Fatfsd.lib 18-Aug-2005 21:17  645,342  Tfat.lib

Path: Public\Common\Oak\Lib\Sh4\Retail 18-Aug-2005 21:17  347,856  Fatfsd.lib 18-Aug-2005 21:17  384,776  Tfat.lib

Path: Public\Common\Oak\Lib\X86\Debug 18-Aug-2005 21:14  559,284  Fatfsd.lib 18-Aug-2005 21:14  631,198  Tfat.lib

Path: Public\Common\Oak\Lib\X86\Retail 18-Aug-2005 21:14  308,774  Fatfsd.lib 18-Aug-2005 21:14  341,694  Tfat.lib



WORKAROUND
To work around this problem, applications should synchronize operations to the same file. Therefore, operations that write to the file contents are not performed at the same time as operations that rename the file.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



MORE INFORMATION
For more information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Keywords: kbbug kbfix kbqfe kbpubtypekc KB906212

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.