[omniORB] SIGSEGV in omniFinalCleanup::~omniFinalCleanup

Duncan Grisby duncan at grisby.org
Thu Aug 12 11:43:37 BST 2004


On Tuesday 10 August, "Rene van 't Veen" wrote:

> I've got a problem in that I keep getting a SIGSEGV in
> omniFinalCleanup::~omniFinalCleanup (Linux, 2.4.18), which is called when
> the dynamic shared object (omniORB4.so) unloads during exit() processing.
> The problem appears to revolve arround cleaning up the references that have
> been added with registerNilCorbaObject(), because these references have been
> added from another dynamic shared object (of my own making) that is unloaded
> *before* omniORB4.so is unloaded. The problem doesn't occur if the code that
> does the corba calls is linked statically - but that would invalidate the
> design, because the CORBA calling code is a plugin, loaded and unloaded at
> runtime.

The root of the problem is that, as you say, your .so has been
unloaded before the omniORB library tries to delete some objects whose
code lives in your .so. To avoid the problem, define
OMNI_UNLOADABLE_STUBS when you compile the SK.cc files. That will
cause the nil objects to be deleted when your .so is unloaded. Make
sure that you don't have any nil object references in _vars that
survive after your .so has unloaded, otherwise you'll (possibly)
segfault when they try to access the nil.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list