Bug 3561 - orb->destroy() in overridden ACE_Service_Object::fini causes crash
Summary: orb->destroy() in overridden ACE_Service_Object::fini causes crash
Status: NEW
Alias: None
Product: TAO
Classification: Unclassified
Component: ORB (show other bugs)
Version: 1.6.7
Hardware: All All
: P3 minor
Assignee: DOC Center Support List (internal)
URL:
Depends on:
Blocks:
 
Reported: 2009-01-29 09:17 CST by Jeff Parsons
Modified: 2010-09-16 07:59 CDT (History)
1 user (show)

See Also:


Attachments
example code + svc.conf file entry + comments (2.17 KB, text/plain)
2009-01-29 11:23 CST, Jeff Parsons
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Parsons 2009-01-29 09:17:06 CST
As far as I've been able to determine, the lifetime of the ORB_Core entry in the ORB table is handled by ACE_Object_Manager, which executes its own fini() call at exit time. So if a call to ORB::destroy is made in the body of an overridden ACE_Service_Object::fini, it seems that the ACE_Object_Manager::fini is executed first, so when the destroy() call tries to enter a critical section, it finds that its lock has been already destroyed and a crash occurs.

However, if, in the code block where ACE_Service_Config::open is called, there is a matching call to ACE_Service_Config::close, the order of destruction is then correct and all is well. We certainly want to document this behavior, and make it more user friendly if possible. Attachment with code snips will follow shortly.
Comment 1 Jeff Parsons 2009-01-29 11:23:56 CST
Created attachment 1065 [details]
example code + svc.conf file entry + comments
Comment 2 Johnny Willemsen 2010-09-16 07:59:32 CDT
pool