About Terminal Server, Citrix, Delphi and other stuff
16 Apr
A few days ago I was troubleshooting some strange problems on a Citrix Server. After some investigation (I will write about that later) it was clear to me that there was a shortage of System Page Table Entries (PTE’s). Using perfmon you can see how many free System PTE’s are available:

Any value below 5000 is not good, values below 2000 are critical. In my case it wasn’t possible to view processes with Task Manager anymore.
Next I used WinDbg and attached to the Kernel (you can do that with File | Kernel Debug | Local | OK) and issued the !vm command:
WinDbg shows us a warning that a lot of PTE allocations have failed, we can also see that there’s enough Paged Pool and Non Paged Pool available.
So how do we find the guilty driver (usually it’s a driver)?
First we need to set a key in the registry
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Modify the following value to either 0 (disabled) or 1 (enabled).
Value Name: TrackPtes
Value Type: REG_DWORD
Value Data: 1
Radix: Hex
Then we need to reboot and attach WinDbg again and issue the command !sysptes 4
This gives the following error however on Windows 2003: Unable to get System PTE individual lock consumer information. It happens because the public symbol files from Microsoft’s Symbol Server do not include the _PTE_TRACKER structure:
typedef struct _PTE_TRACKER {
LIST_ENTRY ListEntry;
PMDL Mdl; PFN_NUMBER Count;
PVOID SystemVa;
PVOID StartVa;
ULONG Offset;
ULONG Length;
PFN_NUMBER Page;
struct {
ULONG IoMapping: 1;
ULONG Matched: 1;
ULONG CacheAttribute : 2;
ULONG Spare : 28;
};
PVOID CallingAddress;
PVOID CallersCaller;
} PTE_TRACKER, *PPTE_TRACKER;PTE_TRACKER PteTracker;
If you have Visual Studio installed you can add this structure to the PDB with the following command:
cl.exe /Zi /Gz /c /Fdntkrpamp /I”.\headers” /D_X86_=1 PteTracker.c
Or you can download the modified pdb: modified ntkrpamp.pdb (386)
.NET .NET FrameWork Active Directory Altiris Automation Manager bug Citrix datastore Dell Delphi Excel Exchange Exchange2003 Exchange2010 Hack HP iOS Java LinkedIn Linux Lync Office Office 2010 Outlook Passat Password PowerPoint PowerShell RES RNS510 SasLibEx Security Terminal Server ThinApp TSAdminEx Unattended VBS VCDS Vista Visual Basic VMWare Volkswagen Windows PE Wordpress XenApp
WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.
2 Responses for "Unable to get System PTE individual lock consumer information error when using !sysptes 4 in WinDbg"
Does anyone have a modified PDB for Windows 2003 R2 Std/Ent, or can someone help as when using VS08 and WDK 7.1 I get hundreds of errors from cl.exe complaining aboutthe headers referenced from the WDK?
I’ll even donate if you can help with the compilation Remko.
Geoff
I delight in, result in I found exactly what I used to be taking a look for.
You’ve ended my 4 day long hunt! God Bless you man. Have a nice day. Bye
Leave a reply