[omniORB] [Bug?] Infinit loop in giopWorker & giopServer with CancelRequest message

Vasily Tchekalkin Bacek at yandex-team.ru
Tue Dec 2 11:08:07 GMT 2003


Hello.

Looks like i've found bug in omniORB when incoming CancelRequest message 
was arrived.

Situation is this:
1. In giopWorket main loop (giopWorker.cc, lines 206-220)
   do {
     {
       GIOP_S_Holder iops_holder(pd_strand,this);

       GIOP_S* iop_s = iops_holder.operator->();
       if (iop_s) {
         exit_on_error = !iop_s->dispatcher();
       }
       else {
         exit_on_error = 1;
       }
     }
     go = pd_server->notifyWkDone(this,exit_on_error);

   } while(go && !exit_on_error);


iop_s->dispatcher() always return 1 from GIOP_S::handleCancelRequest.

and pd_server->notifyWkDone(this,exit_on_error) always return 1 when 
threads manged from thread pool and last worker set connection to die. 
Lines 1014-1019 in giopServer.cc is:

       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.");
         return 1;
       }

So, when we have last worker and connection is dying first loop will 
never finished. And in my servers I have some threads thet eats all CPU :(

Can anyone help me with it?

-- 
Vasily Tchekalkin
Yandex development team.




More information about the omniORB-list mailing list