[omniORB] Patch for omniORB 4.0.3

Serguei Kolos Serguei.Kolos at cern.ch
Thu Feb 26 17:05:27 GMT 2004


Hello

The problem:
Server is running in thread pool model.
A request arrives to the server and is started to be processed. If at 
that moment
the server calls ORB::shutdown before the request processing has been 
finished then
the server hangs in the giopServer::deactivate() (line 527: 
pd_cond.wait();). This happens
because the worker for that connection calls 
notifyWkDone(this,exit_on_error) with exit_on_error=0
(giopWorker.cc line 218) since the request has been processed 
successfully, but then
nobody notice that this connection has been shutdown.

The patch, which solves the problem is attached at the end. I'm not sure 
that this is the best solution,
but it works.
Cheers,
Sergei

*** giopServer-new.cc   Thu Feb 26 16:51:42 2004
--- giopServer.cc       Mon Oct 20 18:11:12 2003
***************
*** 1011,1017 ****
      {
        omni_tracedmutex_lock sync(pd_lock);
 
!       if (conn->pd_n_workers == 1 && ( conn->pd_dying || pd_state == 
INFLUX )) {
        // Connection is dying. Go round again so this thread spots
        // the condition.
        omniORB::logs(25, "Last worker sees connection is dying.");
--- 1011,1017 ----
      {
        omni_tracedmutex_lock sync(pd_lock);
 
!       if (conn->pd_n_workers == 1 && conn->pd_dying) {
        // Connection is dying. Go round again so this thread spots
        // the condition.
        omniORB::logs(25, "Last worker sees connection is dying.");





More information about the omniORB-list mailing list