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



The information in this article 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.

Modification Type:MajorLast Reviewed:2/20/2002
Keywords:kbDSupport kberrmsg kbprb KB244765