[omniORB] AIX: pure virtual method called

Renzo Tomaselli renzo.tomaselli at tecnotp.it
Wed Nov 12 12:22:19 GMT 2003


Hi,
    we just ported our architecture to AIX 5.2 through g++ 3.3.1, while
OmniORB version is 4.02, standard sources. The same runs fine on Windows
(msvc 6.0), Solaris (g++ 3.2.3), Linux (3.2.0).
Apparently everything was ok on AIX too, but then we got random failures
after throwing user exceptions. In short, an user exception is thrown from a
servant (say throw NotFound()) and caught by the caller in the same process
(although in a different shlib).
If the caller waits for a while, then it tries to access any exception
virtual method (say _NP_repoId), the process dies reporting "pure virtual
method called".
While we don't really need to call such a virtual method, it's a simple test
to understand the original crash. This occurred by calling _NP_marshal in
giopImpl12::sendUserException(), while trying to report the exception back
to the client process.
The involved servant is managed by a servant activator, thus it's destroyed
by the etherealization queue thread. For some reasons, this thread appears
to invalidate the exception (or its virtual table) located on the stack of
the main thread (just my guess, there are other waiting threads which seem
unrelated).
Indeed, if during the catch step we wait and then throw again a quite new
exception, things work properly.
Here's the tail of level 25 trace (servant is <C3271.2.ad.1a>):

I axserver omniORB  Creating ref to local: root/YacomPOA<C3271.2.ad.1a>\n
target id      :
     IDL:omg.org/CORBA/Object:1.0\n most derived id:
IDL:BigBang/Yacom/ControlledItem:1.0
I axserver omniORB  ObjRef(IDL:BigBang/Yacom/ControlledItem:1.0) -- deleted.
I axserver omniORB  State root/YacomPOA<C3271.2.ad.1a> (active) ->
deactivating
I axserver omniORB  Object is still busy -- etherealise later.
I axserver omniORB  POA(YacomPOA) etherealising object
root/YacomPOA<C3271.2.ad.1a>
    (deactivating).\n id: IDL:BigBang/Yacom/ControlledItem:1.0
I axserver omniORB  State root/YacomPOA<C3271.2.ad.1a> (deactivating) ->
etherealising
I axserver omniORB  RefCountServantBase has zero ref count -- deleted.
I axserver omniORB  Removing root/YacomPOA<C3271.2.ab.5> (etherealising)
from object table
I axserver omniORB  Object table entry root/YacomPOA<C3271.2.ab.5> (dead)
deleted.
I axserver omniORB  RefCountServantBase has zero ref count -- deleted.
I axserver omniORB  Removing root/YacomPOA<C3271.2.ac.6> (etherealising)
from object table
I axserver omniORB  Object table entry root/YacomPOA<C3271.2.ac.6> (dead)
deleted.
I axserver omniORB  RefCountServantBase has zero ref count -- deleted.
I axserver omniORB  Removing root/YacomPOA<C3271.2.ad.1a> (etherealising)
from object table
pure virtual method called
./axserver.sh: 20422 IOT/Abort trap(coredump)

While I guess this is an AIX (or AIX thread lib) related issue, any
suggestion is highly appreciated.
Thanks,

Renzo Tomaselli





More information about the omniORB-list mailing list