Deadlocks making CORBA calls. Threads/Ace Service Configurator. #1904
Replies: 3 comments 7 replies
-
In this case |
Beta Was this translation helpful? Give feedback.
-
Sorry for the delayed reply, I have been doing software archeology. (Also apologies if this appears twice, I thought I had already commented but my comments seem to have disappeared). To answer your questions Anyhow, I am pleased to know why things used to work, and now don't. I am not sure if this should be considered a bug in ACE or not. I assume there are not too many people with the same use cases, seeing the change is 16 years old!. I need to read up on the Gestalt stuff/look for examples. In particular the comments in that change log entry talk of dynamically loaded services using their own sets of service objects, in contrast to the ACE_Service_Config class that is dealing with a process-wide configuration state, which sounds like it might be something to look at. Cheers |
Beta Was this translation helpful? Give feedback.
-
I found some examples of using ACE_Service_Gestalt, instead of the (remaining) static methods in ACE_Service_Config class, based on some examples in the ACE/TAO code base. This works as expected, no deadlocks. I am evaluating this change in our business code. Cheers |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am porting a large software framework to TAO from another ORB, and I am getting deadlocks. The attached (contrived) example demonstrates this.
In words, we are using the ACE Service Configuration framework to bring up objects. They attempt to make CORBA calls (resolving other names, binding their own names etc) in separate threads. One thread holds the Service Registry recursive thread mutex in Service_Gestalt.cpp , in the initialize() method. Other threads attempting to make CORBA calls end up attempting to find ORB related services, and block waiting on that mutex. For "reasons", the first thread is waiting on the others to complete, and hence never releases that mutex.
Is this a case of "Just don't do that" ? Is there some way to preload the ORB so that later calls to bind, resolve_initial_references and other such calls don't need to find services?
Currently I am pulling things apart and trying to put them together so that all initialisation happens in one thread but it is a major undertaking, just wanting to check that I am overlooking something simple. The framework I am working with was originally written using ACE/TAO so unless it mutated a lot in recent years I am assuming things worked somehow back in history. Unfortunately it is so old everyone involved has retired/moved on.
deadlock.tar.gz
Beta Was this translation helpful? Give feedback.
All reactions