The information in this article applies to:
This article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice. No formal product support is available from Microsoft for this Beta product. For information about obtaining support for a Beta release, please see the documentation included with the Beta product files, or check the Web location from which you downloaded the release. SUMMARY
Kernel pool corruption has been difficult to debug in Windows NT because
typically the system crashes before you can find the culprit. Some common
causes of kernel pool corruption include:
MORE INFORMATION
The "special pool" feature causes a complete page of memory to be allocated
for each request that matches the specified tag or allocation size. Kernel
Special Pool is only in effect when the requested allocation size is less
than PAGE_SIZE.
Overrun Detection vs. Underrun DetectionOverrun detection (the default) is a check to ensure that you do not access past your memory allocation. This is accomplished by 8-byte aligning the request to the end of the allocated page and marking the page as no-access following the allocation. If you try to access past the end of the allocated pool, a system trap occurs.Underrun detection is a check to insure that you do not access memory in front of the memory allocation. This is accomplished by aligning the request at the beginning of the allocated page and marking the page as no- access before the allocation. If you try to access prior to the beginning of the allocated page, a system trap occurs. In both cases, single-byte corruption within the alignment portion of the page is also detected. If it exists, this slush space, which is less than the alignment size-8 bytes, is at the end of the page for overruns or in the rest of the page for underruns. Corruption in these portions of the page causes a bug check upon release of the memory instead of at the time of the bad access because these cannot be enforced using existing hardware mechanisms. Kernel Special Pool CharacteristicsThe following summarizes characteristics of the kernel special pool:
Methods for Specifying Pool AllocationsThere are two methods that you can use to specify pool allocations:
Enabling Kernel Special PoolThere are two different ways to enable Kernel Special Pool. Each requires a you to restart the operating system.
Pool Corruption Debugging StrategiesYou might need to focus on a specific pool tag if it looks like the beginning or end of your allocation is corrupted. For a corruption at the beginning, you have to find the tag of the allocation before the corrupted one and focus on it. For a corruption at the end, you have to find the tag of the allocation after the corrupted one and focus on it. It might be difficult to find the correct tag for an overrun, because the corruption will likely invalidate the pool header that has control information.If you are unsure of the corrupting component, but you are sure of the allocation size that is causing problems, you can set the PoolTag value in the registry to the size that corresponds to the size range that the corrupter might be using. If you do this, memory management will allocate these blocks in the special pool. Look at the header prior to the one you think is corrupted. That might be the one that is overwriting past the end of its allocation and corrupting your allocation. If the end of your pool allocation seems corrupted (possibly caused by the next allocation writing backward over your allocation), then you can set PoolTag to the size of the next block and also set PoolTagOverruns to zero to enable underrun detection. Debugging Failures for Special PoolIf some kernel component writes beyond the limit of the block allocated, a memory fault occurs. The typical bug check is 0x50 (PAGE_FAULT_IN_NONPAGED_AREA) or 0xA (IRQL_NOT_LESS_OR_EQUAL) and the top of the stack should be similar to the following:
This indicates a high probability that the "Module" code accesses memory beyond what is allocated. Conclusion
REFERENCESSee the Windows NT DDK for additional driver and debugging information.
Keywords : kbDDK kbDebug kbNTOS400 kbWinOS2000 |
Last Reviewed: March 5, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |