Defect in Microsoft Windows 2000 Service Pack 4

severely impacts PROFITstar®, PROFITability®, and PROFITstar Portfolio™

versions prior to 2004c.08 when attempting to restore data to network drives

Date created: Oct 29, 2004

Last updated: Jan 13, 2005

Intended audience: IT professionals and end users

This document is available in electronic form at:

http://www.profitstar.com/dev/Win2KNetBug.pdf

Summary

Several clients have reported problems restoring backups to network drives. The restore process sometimes fails, with errors like “Corrupt file—other than header”. Frequently, the root cause of these errors is a defect in Windows 2000 Service Pack 4 that causes data corruption. Files written to the network drive are erroneously truncated in certain cases, resulting in loss of data. A workaround to this Microsoft problem has been introduced in PROFITstar, PROFITability, and PROFITstar Portfolio version 2004c.08. The workaround will be carried forward to all future versions.

IMPORTANT: The restore process does not always fail with an error message when this data corruption occurs. Since the operating system masks the problem (see the details below), corruption may go undetected and unreported. However, program errors due to corrupted data may occur in subsequent program sessions.

Who is affected?

Data is at risk of corruption when all of the following conditions are true:

·  The workstation is running Windows 2000 Service Pack 4.

·  Data is shared on a network drive via Client for Microsoft Networks.

·  The relevant hotfix from Microsoft has not been installed on the workstation.

Note that this is a client-side, not a server-side, problem. It does not matter what operating system is running on the server where the shared data resides. What matters is what operating system is running on the workstation (client). Only Windows 2000 Service Pack 4 is affected by this problem. Other operating systems in the 32-bit Windows family, like Windows 98 and Windows XP, are not affected.

Data that is stored on the local drive is not at risk, as long as it is not accessed via a network share. In other words, when data is in directories that are not shared as network resources, that data is not affected by the Windows 2000 Service Pack 4 network bug.

Our testing to date indicates that only drives accessed through Client for Microsoft Networks are at risk. We have tested data shared on a Netware server, accessed via Microsoft’s Client Service for Netware. No file corruption was found.

What exactly is the problem?

Microsoft has defined a network file sharing protocol called the Server Message Block (SMB) protocol. Windows 2000 Service Pack 4 implements the SMB protocol in its client-side network layer. However, the implementation incorrectly processes certain operations that are performed on files that are open for writing.

Specifically, if data is written to an open file, and the file attributes are changed before the file is closed, the data is not written completely to the file. After the file is closed, its length is shorter than expected. The data that failed to write is lost, and no error message is raised by the operating system.

In PROFITstar, PROFITability, and PROFITstar Portfolio, backup files are created in an industry-standard file compression format known as the ZIP format. Profitstar’s restore operation decompresses zipped files and writes them to the target directory specified by the user. In versions prior to 2004c.08, file attributes for the unzipped files were set before closing the file. Correct operating system behavior in this scenario is that file attributes are updated without affecting any data that has been written. However, the Windows 2000 Service Pack 4 bug causes some files to be written only partially—some data at the end of the file is lost.

How does version 2004c.08 work around the problem?

Effective with version 2004c.08 of PROFITstar, PROFITability, and PROFITstar Portfolio, a workaround to the Windows 2000 Service Pack 4 network bug has been introduced. When decompressing zipped files during a restore operation, setting the file attributes is deferred until after the output file is closed. This prevents file truncation under the at-risk scenario described above.

Where to go for more information

The Windows 2000 Service Pack 4 network bug, including information about an available hotfix, is documented by Microsoft at

http://support.microsoft.com/default.aspx?scid=kb;en-us;826482

A technical overview of Microsoft’s SMB protocol is at the following URL. (There are no spaces in the URL, but there are underscores.)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/microsoft_smb_protocol_and_cifs_protocol_overview.asp

We have developed a simple program called WriteBugTester to detect the Windows 2000 Service Pack 4 network problem. The executable and documentation files are available on Profitstar’s web site at the following URL. Simply unzip the files to the location of your choice and follow the instructions in the documentation.

http://www.profitstar.com/dev/WriteBugTester.zip

If you have further questions, please contact your Profitstar Client Support representative.

Author: Kent Donnelly

Director of Development

Profitstar Inc.

Omaha, NE

Windows 2000 SP4 Network Defect

Page 2 of 3