[omniORB] omniOrbPOA deadlock

Renzo Tomaselli renzo.tomaselli@tecnotp.it
Mon, 9 Jul 2001 17:21:39 +0200

Hi all,
    there seems to be a deadlock in poa.cc which is due to the actual usage
of servant_activator_lock.
The sequence is:

1. A servant is deactivated and this invokes an etherealize method on its
servant activator. Before this occurrs,
the method omniOrbPOA::Etherealiser::doit() locks servant_activator_lock.
2. During etherealization some cleanup is performed by app. code; this
involves activating another servant through its servant activator. Although
colocated, the involved objref identity is remote, so that a receiving
thread wrapper must dispatch the request.
3. This is done in omniOrbPOA::dispatch_to_sa() method, which int turn tries
to lock servant_activator_lock and at this point we are blocked forever.

All of this seems due to the strange identity switch of objrefs when the
connected servant is deactivated: they switch from local to remote, so that
next invokation goes through the normal marshalling procedure of remote
objects and it calls back, although objref and servant are colocated.
I feel this influences performance of servants managed by a servant
activator, and even worse by servant locators. Beside the actual deadlock
off course.
                                             Renzo Tomaselli
TecnoTP s.n.c. Special Information System Design
Maso Pelauchi I38050 Ronchi Valsugana,  Trento TN  ITALY
Tel. +39 0461 773164      Fax. +39 0461 771514
e-mail: renzo.tomaselli@tecnotp.it