Problem:
- Product Name: VisiBroker for C
- Product Version: 7.0 SP4
- Product Component: Location Service
- Platform/OS Version: Solaris
The all_replica_descs() API hangs and the control does not come out from this API in a signal handler.
Resolution:
The all_replica_descs() API will require the ORB to contact the osagents to return all instances description for the specified repository id and named instances of the interface. VisiBroker ORB is multi-threaded and will use a thread in the thread pool to service the request to the osagents. When the signal is raised, the OS blocks all the other threads and only the signal handler will be running. The all_replica_descs() API cannot be executed in a separate thread. It becomes a deadlock.
The best practices is to write a signal handler code that must be quick to execute and does not block. An example is to change a flag or mutex.
For a full detailed explanation, please refer to [[wiki: Signal handling in VisiBroker for C application (Part One)]].
#VisiBroker
#Security