A handle leak occurs when the "CreateWindowStation" function is called in Windows Server 2003 if a non-English keyboard layout is used

Support for Windows Server 2003 ended on July 14, 2015

Microsoft ended support for Windows Server 2003 on July 14, 2015. This change has affected your software updates and security options. Learn what this means for you and how to stay protected.

This article has been archived. It is offered "as is" and will no longer be updated.
SYMPTOMS
Consider the following scenario:
  • You configure a non-English keyboard layout for a user on a computer that is running Windows Server 2003.
  • You run an application or a service by using the user account.
  • The application calls the CreateWindowStation function to create some Windows Station objects.
In this scenario, the memory usage and handle count of this application or this service keeps increasing. After a while, the paged pool is exhausted, and the following event might be logged in the System log: 
Event Type: Error
Event Source: Srv
Event Category: None
Event ID: 2020
Description: The server was unable to allocate from the system paged pool because the pool was empty.
 For example, you use Japanese keyboard Layout and install Subsystem for UNIX-Based Applications (SUA) on a computer that is running Windows Server 2003 Service Pack 2 (SP2). When you use some remote shell commands to run some Windows commands, the memory usage of the Psxss.exe process keeps increasing. 
CAUSE
This issue occurs because the CreateWindowStation API does not close all opened handles. Therefore, a handle leak occurs.
RESOLUTION

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must be running Windows Server 2003 Service Pack 2 (SP2).

For more information about how to obtain a Windows Server 2003 service pack, click the following article number to view the article in the Microsoft Knowledge Base:
889100 How to obtain the latest service pack for Windows Server 2003

Restart requirement

You must restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The English (United States) version of this hotfix installs files that have the attributes that are listed in the following tables. The dates and the times for these files are listed in Coordinated Universal Time (UTC). The dates and the times for these files on your local computer are displayed in your local time together with your current daylight saving time (DST) bias. Additionally, the dates and the times may change when you perform certain operations on the files.
Windows Server 2003 file information notes
  • In addition to the files that are listed in these tables, this hotfix also installs an associated security catalog file (KBnumber.cat) that is signed with a Microsoft digital signature.
For all supported x86-based versions of Windows Server 2003
File nameFile versionFile sizeDateTimePlatform
User32.dll5.2.3790.4709583,68013-May-201016:14x86
For all supported x64-based versions of Windows Server 2003
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
User32.dll5.2.3790.47091,086,46413-May-201001:30x64SP2Not Applicable
Wuser32.dll5.2.3790.4709603,13613-May-201001:30x86SP2WOW
For all supported IA-64-based versions of Windows Server 2003
File nameFile versionFile sizeDateTimePlatformSP requirementService branch
User32.dll5.2.3790.47091,475,07213-May-201001:28IA-64SP2Not Applicable
Wuser32.dll5.2.3790.4709603,13613-May-201001:28x86SP2WOW
WORKAROUND
To work around this issue, set the keyboard layout for the user to the standard English layout. To do this, follow these steps:
  1. In Registry Editor, locate the following registry subkey:
    HKEY_USERS\<user SID>\Keyboard Layout\Preload
  2. On the Edit menu, point to New, and then click DWORD Value.
  3. Name the new registry entry 1.
  4. Set the value of the 1 registry entry to 00000409
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
MORE INFORMATION
For more information about the CreateWindowStation function, visit the following Microsoft website:

For more information about Window Stations, visit the following Microsoft website: 
For more information about software update terminology, 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
Properties

Article ID: 2028586 - Last Review: 12/12/2015 08:23:25 - Revision: 1.0

Microsoft Windows Server 2003 R2 Datacenter Edition (32-Bit x86), Microsoft Windows Server 2003 R2 Datacenter x64 Edition, Microsoft Windows Server 2003 R2 Enterprise Edition (32-Bit x86), Microsoft Windows Server 2003 R2 Enterprise x64 Edition, Microsoft Windows Server 2003 R2 Standard Edition (32-bit x86), Microsoft Windows Server 2003 R2 Standard x64 Edition, Microsoft Windows Server 2003, Web Edition, Microsoft Windows Server 2003, Datacenter Edition (32-bit x86), Microsoft Windows Server 2003, Datacenter Edition for Itanium-Based Systems, Microsoft Windows Server 2003, Datacenter x64 Edition, Microsoft Windows Server 2003, Enterprise x64 Edition, Microsoft Windows Server 2003, Enterprise Edition (32-bit x86), Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems, Microsoft Windows Server 2003, Standard x64 Edition, Microsoft Windows Server 2003, Standard Edition (32-bit x86)

  • kbnosurvey kbarchive kbautohotfix kbqfe kbHotfixServer kbfix kbsurveynew kbbug KB2028586
Feedback