IIS Access Violates Calling Local COM Server

Last reviewed: March 6, 1998
Article ID: Q182110
The information in this article applies to:
  • Microsoft Windows NT Server version 4.0
  • Microsoft Internet Information Server versions 3.0 and 4.0

SYMPTOMS

Internet Information Server (IIS) may access violate when using an in- process COM object to expose methods for a local COM server that is running as a service. The access violation is more likely to occur on multi- processor servers that are extremely busy. The access violation will occur in seemingly unrelated areas because the problem affects several areas of the COM support code.

The debug stack will look similar to the following example:

   Example Stack:
   DbgBreakPoint
   RtlpBreakPointHeap
   RtlpValidateHeapEntry
   RtlDebugSizeHeap
   RtlSizeHeap
   CRetailMalloc_GetSize
   MemSize(void * 0xfeeefeee)
   MemFree(void * 0xfeeefeee)
   CTypeLib2::~CTypeLib2() line 56 + 15 bytes
   CTypeLib2::`scalar deleting destructor'() + 20 bytes
   CTypeLib2::Release(CTypeLib2 * const 0x0344e428)
   CTypeInfo2::Release(CTypeInfo2 * const 0x0344eac8)
   CreateRealProxy
   CProxyWrapper::Connect
   ConnectIPIDEntry@CStdMarsha
   MakeCliIPIDEntry@CStdMarshal
   UnmarshalIPID@CStdMarshal
   RemQIAndUnmarshal@CStdMarshal
   QueryRemoteInterfaces@CStdMarshal
   QueryMultipleInterfaces@CInternalUnk
   QueryInterface@CInternalUnk@CStdIdentity
   CreateInstance
   CreateInstance
   ::FinalConstruct()

CAUSE

The ref count for a contained local servers Type Library can be incorrectly set when the OLE automation code is set to multithreading. As a result, the Type Library is released too soon.

The access violation occurs when the in-process object creates or references methods in the local server after the Type Library has been released.

This problem only occurs when the multiprocessor IIS computer is under stress and the time frame of the ref counter is incorrectly set too small.

RESOLUTION

A fix was made to the Oleaut32.dll file to add additional thread synchronization so that the ref counter is protected when it is under stress.

STATUS

Microsoft has confirmed this to be a problem in Windows NT version 4.0. A supported fix is now available, but has not been fully regression-tested and should be applied only to systems experiencing this specific problem. Unless you are severely impacted by this specific problem, Microsoft recommends that you wait for the next Service Pack that contains this fix. Contact Microsoft Technical Support for more information.

Version           : WINNT:3.0,4.0
Platform          : winnt
Issue type        : kbbug
Solution Type     : kbfix


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 6, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.