[omniORB] EAGAIN

Sai-Lai Lo S.Lo@orl.co.uk
Wed, 17 Jun 1998 10:19:56 +0100 (BST)


>>>>> Rick H Wesson writes:

> i had to patch lib/omniORB2/tcpSocketMTfactory.cc at line 656 
> from
>       if (errno == EINTR)
> to
>       if (errno == EINTR || errno == EAGAIN)

> for the clients to work properly in snapshot_980410, cliients were
> throwing COMM_FAILURE because ::recv would return EAGAIN, meaning
> there was nothing to read on the socket, when omnoORB thought
> there was something.

> this only relates to Solaris 2.6 on sparc. now all the tests and
> applications run fine. 


Thanks for the report.

Could you describe what is the problem you are having before you apply the
patch?

It is not obvious to me why recv would ever return -1 with EAGAIN because
the socket is not set to non-blocking.

OK, on solaris, the socket was set to non-blocking before connect(2) is
called. But once the connection succeed, the socket is set back to
blocking. So the problem you are having may be related to the fcntl(2)
calls that change the blocking behaviour of the socket.

Could you verify this by undoing your patch and remove the code-block in 
tcpSocketMTfactory.cc: realConnect() that change the blocking behaviour in
connect(2)? 

Regards,

Sai-Lai

-- 
Dr. Sai-Lai Lo                          |       Research Scientist
                                        |
E-mail:         S.Lo@orl.co.uk          |       Olivetti & Oracle Research Lab
                                        |       24a Trumpington Street
Tel:            +44 223 343000          |       Cambridge CB2 1QA
Fax:            +44 223 313542          |       ENGLAND