Microsoft KB Archive/244795

= FIX: Private Bytes Leak in MTS When a COM Exception Is Raised in a Method Call =

Article ID: 244795

Article Last Modified on 4/7/2006

-

APPLIES TO


 * Microsoft Transaction Services 2.0

-



This article was previously published under Q244795



SYMPTOMS
In Microsoft Transaction Server (MTS) 2.0, a memory leak can occur when a method of a component takes [in/out] parameters and the method raises a COM exception (such as a Microsoft Visual Basic error).

The result is that the private bytes of the MTX process will grow after a method call that raises a COM exception. The size of the memory increase will depend on the size of the [in/out] parameters.



CAUSE
This bug is caused by a problem in the implementation of the COM error handling specification in COM objects hosted. The problem lies in the behavior of the MTS proxy mechanism, which nulls the pointer prior to the return without releasing the memory held by the pointer. Because no error message appears, this error may not be immediately apparent.



RESOLUTION
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.



STATUS
Microsoft has confirmed that this is a problem in Microsoft Transaction Server 2.0.



MORE INFORMATION
The reason that this problem is only seen in Microsoft Transaction Server is that there is no equivalent proxy mechanism in normal COM. Because this problem only affects Transaction Server objects, you can determine if this is the cause of the leak by running the same component (where possible) outside of Transaction Server. If it still shows a leak without Transaction Server present, then there is another problem.

