Skip to main content

Summary

Orbix 3.3.12 server tries to make a remote call when _bind() with "localhost" is invoked from the main thread. This is the reason for the hang. There is no hang encountered if this call is invoked from a separate thread.

Environment

Product: Orbix
Version: 3.3.12
Platform: AIX 6.1 & 7.1

Question/Problem Description

In 3.3.12, when the multi-homed support is enabled, why the _bind() call with "localhost" as host in the server hangs? In 3.3.11, there is no issue with using _bind() with "localhost".

Multi-homed support parameters:
Orbix.IT_ENABLE_MULTI_HOMED_SUPPORT = "YES";
Orbix.IT_LOCAL_ HOST = "10.x.x.x";
Orbix.IT_LOCAL_ ADDR_ LIST = "10.x.x.x";

Error Message

The stack trace when the hang was observed:

.() at 0x11c510ee0
_event_wait(??, ??) at 0xd0511f4c
_cond_wait_local(??, ??, ??) at 0xd05202b8
_cond_wait(??, ??, ??) at 0xd05208c4
pthread_cond_wait(??, ??) at 0xd052155c

IT_MT_ConditionVarImpl::wait(IT_MT_LockImpl*)(0x2014a420, 0x2014b160) at 0xd73c85c8

IT_MT_ConditionVar::wait(IT_MT_Lock&)(0x20149a78, 0x2014ae78) at 0xd73c73e4

IT_Channel::searchForReply(unsigned long,unsigned long,CORBA::SystemException*&,unsigned char)(0x2014abf0, 0xa, 0xffffffff, 0x2ff21cd0, 0x0) at 0xd74879b4

IT_Channel::findReply(unsigned long,unsigned long,ChannelMessage*&)(0x2014abf0, 0xa, 0xffffffff, 0x2ff21d9c) at 0xd7489344

IOPProtocol::locateObject(CORBA::Object*,char*&,CORBA::Environment&)(0x20039d38, 0x2014855c, 0x2ff21ee8, 0x2011c810) at 0xd7399ab4

IT_ObjectImpl::_IT_PING(CORBA::Environment&)(0x20149aa0, 0x2011c810) at 0xd737dfe4

CORBA::Object::_IT_PING(CORBA::Environment&)(0x2014855c, 0x2011c810) at 0xd74602c0

IT_FactoryTableImpl::bind(const char*,const char*,const char*,const char*,CORBA::Object*&,const CORBA::Context&,CORBA::Environment&)(0x20119610,0x1001b720, 0x2013fcc8, 0x1001b8c0, 0x1001b8c0, 0x2ff222bc, 0x2ff223e0, 0x2011c810) at 0xd747b370
.............
main(0x2, 0x2ff22694) at 0x10001840


Remote call logs when localhost is used:


[IT_OrbixTCP_IPvX_SockLayer::startConnection()]: current address is: 127.0.0.1

[OrbixTCPChannel::connectTo()]: connecting to host: localhost, port: 2619, attempts: 10

[OrbixTCPChannel::connectTo()]: connecting to host: localhost, attempts: 10, ex: 0

....

[IT_OrbixTCP_IPvX_SockLayer::getAddrInfo()]: calling getaddrinfo() with host: 127.0.0.1, port: 0
gridserver[IT_OrbixTCP_IPvX_SockLayer::getAddrInfo()]: after  IT_HAL_InetAddr::parse_hostname(host),
host: 127.0.0.1@192.168.100.104 New IIOP Connection (localhost:2619) ]

[ObjectReferenceImpl::extractPort(const TaggedProfile* tp)]: returning port: 1570

[ 14:49:37.149 gridserver@192.168.100.104  Outgoing IOP(10) LocateRequest for object key :\\localhost:gridserver:grid::IR:grid ]

....

Resolution

The change in the behaviour was due to the support of IPv6 feature in Orbix 3.3.12.  As part of this change, the networking sub-system of Orbix 3.3.x needed a re-design to support IPv6 communications. During this re-design, it was decided that localhost should be filtered out when creating references to avoid accidentally creating a reference that is only useful on the local machine. Because of this change, when a lookup based on localhost was done the reference would not be returned and a remote connection is attempted (which loops back to the ORB making the call and hence blocks unless called from a separate thread).

So, the solution is to add 127.0.0.1 to the IT_LOCAL_ADDR_LIST parameter and by adding it, the localhost is added to this reference table and results in it returning this reference during the lookup called from _bind avoiding the remote call and no hang is encountered.

Modified multi-homed support parameters:
Orbix.IT_ENABLE_MULTI_HOMED_SUPPORT = "YES";
Orbix.IT_LOCAL_ HOST = "10.x.x.x";
Orbix.IT_LOCAL_ ADDR_ LIST = "10.x.x.x:127.0.0.1";

SI: 2793020


#KnowledgeDocs
#3.3.12
#IT_LOCAL_ADDR_LIST
#Orbix