[omniORB] high Windows sockets strike again

Renzo Tomaselli renzo.tomaselli at tecnotp.it
Thu Sep 23 17:07:14 BST 2004


Hi all,
    a couple of months ago I raised the issue of not being able to run
OmniORB 4.04 on some Windows platforms because of high socket numbers we
occasionally receive. Thus we switched back to 4.03.
Now it seems that a similar problem occurs from time to time even on 4.03.
We use our own alternative transport for security reasons, but that damned
tcp must stay there anyway for legacy reasons (Duncan says :-)
Then we noticed that from time to time, outgoing connections were performed
from tcp as well.
Following the whole story through the MSVC debugger, I noticed that
sometimes we get high socket numbers, (say higher than 3000). Since
FD_SETSIZE is set to 2048, then select fails.
This turned out to have our transport failing, which caused giopRope to
fallback to tcp, which got a lower socket number and connected successfully.
I'm considering to patch our transport by looping over socket() until I get
something < 2048, but I would prefer a cleaner solution.
I don't even know whether this approach would lead to a potential infinite
loop or not.
Btw, I guess that when having just one transport, this loop occurs anyway by
rolling over pd_address_in_use (see giopRope.cc, line 559).
Any comment is welcome,

Renzo Tomaselli




More information about the omniORB-list mailing list