Discussion:
[omniORB] catching exceptions in _remove_ref
Teemu Torma
2007-03-14 17:07:25 UTC
Permalink
I've had couple of instances over the years when a servant destructor
leaks an exception when poa calls _remove_ref, causing the shutdown to
hang. Destructors should not throw, but bugs infestations happen
sometimes during development.

These cases a bit hard to find and debug, and since letting the
exception propagate does never any good, why not just log and ignore
them?

The attached patch does this in one case, there are potentially others
too, and the logging could be more noisy to not go unnoticed.

Teemu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: omniorb-remove-ref.patch
Type: text/x-diff
Size: 607 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070314/cb2e5ebe/omniorb-remove-ref.bin
Duncan Grisby
2007-04-05 21:38:44 UTC
Permalink
Post by Teemu Torma
I've had couple of instances over the years when a servant destructor
leaks an exception when poa calls _remove_ref, causing the shutdown to
hang. Destructors should not throw, but bugs infestations happen
sometimes during development.
These cases a bit hard to find and debug, and since letting the
exception propagate does never any good, why not just log and ignore
them?
The attached patch does this in one case, there are potentially others
too, and the logging could be more noisy to not go unnoticed.
Thanks for the idea. Instead of modifying places that call _remove_ref,
I've added a catch-all to the implementation of _remove_ref that deletes
the servant. That will definitely catch all cases.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Continue reading on narkive:
Loading...