Summary: | tss resources of ORB_Core are leaking (never cleaned up) | ||
---|---|---|---|
Product: | TAO | Reporter: | Martin Cornelius <Martin.Cornelius> |
Component: | ORB | Assignee: | Vladimir Zykov <vladimir.zykov> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 1.5.1 | ||
Hardware: | other | ||
OS: | other | ||
Bug Depends on: | 846 | ||
Bug Blocks: | |||
Attachments: | Proposed fix |
Description
Martin Cornelius
2006-05-11 07:27:12 CDT
Looks fine to me. Thanks Martin! Wed Apr 25 08:52:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> * tao/ORB_Core.cpp: Cleanup TSS resources in the destructor. This fixes bugzilla bug 2533. Thanks to Martin Cornelius <Martin dot Cornelius at smiths-heimann dot com> for reporting this. * tao/Cleanup_Func_Registry.h: * tao/PI/ORBInitInfo.cpp: Layout changes Thu Apr 26 05:48:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> Reverted the change below, this breaks the Portable_Interceptors/Slot and Portable_Interceptors/Bug_2510_Regression tests on linux Wed Apr 25 08:52:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> * tao/ORB_Core.cpp: Cleanup TSS resources in the destructor. This fixes bugzilla bug 2533. Thanks to Martin Cornelius <Martin dot Cornelius at smiths-heimann dot com> for reporting this. reassign to reporter, can you make an updated patch, this one causes some regression tests to fail Created attachment 1303 [details]
Proposed fix
We faced the same problem but we think that the fix must be different. In particular a good place for cleaning tss resources is ORB_Core::destroy(). The reason is stated in the patch but here is a copy of that explanation.
// Clean TSS resources. This cannot be done in shutdown() since the later
// can be called during an upcall and once it's done it will remove
// resources such as PICurrent that are required after the upcall. And this
// cannot be postponed to TAO_ORB_Core's destructor as fini() needs access
// to orb core and what is more important orb core can be destroyed too late
// when some required libraries are already unloaded and we'll get
// 'pure virtual method called' during cleanup.
Reproducers for this leak are Portable_Interceptors/Slot, Portable_Interceptors/Bug_2510_Regression, Portable_Interceptors/PICurrent.
Committed a fix in revision 91153. Wed Jul 21 09:57:34 UTC 2010 Vladimir Zykov <vladimir.zykov@prismtech.com> * tao/ORB_Core_TSS_Resources.cpp: * tao/ORB_Core.cpp: * tao/ORB_Core.inl: * tao/ORB_Core_TSS_Resources.h: * tao/ORB_Core.h: Fixed bug 2533. Now ORB_Core's TSS resources are cleaned during orb destroy. * tests/Portable_Interceptors/Slot/driver.cpp: Explicitely destroy orb since doing this implicitely when main() returns is too late. Added depends. |