[omniORB] Remote method blocks

Masaaki Sekiya sekiya at ydc.co.jp
Mon Nov 10 14:56:09 GMT 2008


Hi. 

I digged omniORB code by using gdb.
Blocking occurs in tcpAddress::Connect and blocking scenario is as below.

USE_NONBLOCKING_CONNECT is defined, so program goes to 
poll do-while loop (tcpAddress.cc:229-301) , and runs below line.

    int rc = poll(&fds,1,timeout);
    if (rc > 0 && fds.revents & POLLERR) {
      rc = 0;
    }
    
As the result of calling poll, fds.revents set to 0x8 (= POLLERR),
so rc is set to 0.
and when rc is 0, program continues to do-while loop as below.

    if (rc == 0) {
      // Time out!
#if defined(USE_FAKE_INTERRUPTABLE_RECV)
      continue;
      
This just makes a huge CPU comsuption.

Now, I have a question.
Why is rc set to 0 , when poll results in POLLERR ?
Is this behaviour on only HP-UX11iV3 ?

Thanks.




More information about the omniORB-list mailing list