Bug 2996 - Locking ORBInitializer Registry is done on multiple places with different locks
Summary: Locking ORBInitializer Registry is done on multiple places with different locks
Status: RESOLVED INVALID
Alias: None
Product: TAO
Classification: Unclassified
Component: ORB (show other bugs)
Version: 1.5.9
Hardware: All All
: P1 major
Assignee: DOC Center Support List (internal)
URL:
Depends on: 2994
Blocks:
  Show dependency tree
 
Reported: 2007-07-18 06:50 CDT by Johnny Willemsen
Modified: 2007-07-18 06:57 CDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johnny Willemsen 2007-07-18 06:50:56 CDT
We can obtain the ORBInitializer registry throug the ORB or through PortableInterceptor::register_orb_initializer. When going through the ORB the orb lock is hold during the loading of the PI library, when going through the register_orb_initializer the static object lock is hold. This could lead to a double load, the ORB should also do a double checked locking on the static lock to my idea. Any other ideas?

In the ORB:
  ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
                    0);


In PI:
      ACE_MT (ACE_GUARD (TAO_SYNCH_RECURSIVE_MUTEX,
                         guard,
                         *ACE_Static_Object_Lock::instance ()));
Comment 1 Johnny Willemsen 2007-07-18 06:57:28 CDT
invalid, not the registry is locked