Microsoft KB Archive/244765

= PRB: COM+ Application May Not Respond When You Call Out ObjectControl's Deactivate =

Article ID: 244765

Article Last Modified on 12/5/2007

-

APPLIES TO


 * Microsoft COM+ 1.0
 * Microsoft COM+ 1.5

-



This article was previously published under Q244765



SYMPTOMS
In COM+, when you make a call to another object from an object's IObjectControl::Deactivate method, the application may return RPC_S_CALLPENDING, report error "CONTEXT_E_SYNCH_TIMEOUT", and stop responding.

DCOM calls, including Release, are not allowed to other COM+ object instances in Deactivate. If you don't follow this rule, your COM+ application may stop responding.



RESOLUTION
To avoid deadlocks, do not make calls to other objects, including "Release", from ObjectControl::Deactivate.



STATUS
This behavior is by design.



MORE INFORMATION
In COM+ applications, do not call other components or release them while in Deactivate because this can cause the application to stop responding.

Components developed for Microsoft Transaction Server may have this problem if you have not followed this rule.

Consider an example in which:

Components A and C are in application AppA and

Component B is in application AppB


 * 1) Component A (which requires a new transaction) creates B (which supports the transaction).
 * 2) B creates C (supports the transaction).
 * 3) A calls SetComplete.
 * 4) B gets Deactivate and calls C while in Deactivate.

When component B calls component C while component B is in Deactivate, then application A waits in CoWaitForMultipleHandles, which times out after 3 minutes with RPC_S_CALLPENDING, and therefore the CONTEXT_E_SYNCH_TIMEOUT error occurs.

Keywords: kberrmsg kbprb KB244765

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.