Discussion:
[omniORB] Source of getaddrinfo delay
penfiel-stanford at yahoo.com ()
2009-03-25 03:08:57 UTC
Permalink
Hi

?

?? I am attempting to locate the source of the name
resolution delay when a useraccidentally enters an incorrect hostname to the
ORB_init function (from a commandline parameter).

?? I ran my client code with trace level set to
25 and I see that there is a small delaybefore the getaddrinfo failure is
reported. The problem is that on some UNIXcomputers this delay is small (5
seconds in my sample output below) and on other computers this delay is many
minutes. There are many timeout settings available inomniOrb, however, the
symptoms make me believe that the delay is systemrelated.

?? I?m sure someone has encountered this behavior.
Can anyone point me in the right direction in order to address (or further isolate) the delay issue?




Thanks in
advance for any insight you can provide into this issue!The omniOrb output is listed below.


?

Hugo

==========

omniORB:
Configuration file "/etc/omniORB.cfg" either does not exist or is not
a file. No settings read.

omniORB:
(0) 2009-03-23 11:31:32.501417: Distribution date: Tue Nov 28 13:27:23 GMT 2006
dgrisby

omniORB:
(0) 2009-03-23 11:31:32.501619: My addresses are:

omniORB:
127.0.0.1

omniORB:
11.47.12.140

omniORB:
(0) 2009-03-23 11:31:32.501700: Maximum supported GIOP version is 1.2

omniORB:
(0) 2009-03-23 11:31:32.501815: Native char code sets: ISO-8859-1 UTF-8.

omniORB:
(0) 2009-03-23 11:31:32.501827: Transmission char code sets: ISO-8859-1(1.2)
ISO-8859-1(1.1) ISO-8859-1(1.0) UTF-8(1.2) UTF-8(1.1).

omniORB:
(0) 2009-03-23 11:31:32.501840: Native wide char code sets: UTF-16.

omniORB:
(0) 2009-03-23 11:31:32.501846: Transmission wide char code sets: UTF-16(1.2).

omniORB:
(0) 2009-03-23 11:31:32.501877: Initialising omniDynamic library.

omniORB:
(0) 2009-03-23 11:31:32.502054: Current configuration is as follows:

omniORB:?? DefaultInitRef (file) =

omniORB:?? DefaultInitRef (args) =

omniORB:?? InitRef = NameService=corbaname::sasd:2003/NameService

omniORB:?? abortOnInternalError = 0

omniORB:?? abortOnNativeException = 0

omniORB:?? acceptBiDirectionalGIOP = 0

omniORB:?? acceptMisalignedTcIndirections = 0

omniORB:?? bootstrapAgentHostname =

omniORB:?? bootstrapAgentPort = 900

omniORB:?? clientCallTimeOutPeriod = 2000

omniORB:?? clientConnectTimeOutPeriod = 2000

omniORB:?? clientTransportRule = * unix,ssl,tcp

omniORB:?? configFile = /etc/omniORB.cfg

omniORB:?? connectionWatchImmediate = 0

omniORB:?? connectionWatchPeriod = 50000

omniORB:?? copyValuesInLocalCalls = 1

omniORB:?? diiThrowsSysExceptions = 0

omniORB:?? dumpConfiguration = 0

omniORB:?? endPoint = giop:tcp::

omniORB:?? endPointPublish = addr

omniORB:?? giopMaxMsgSize = 160000000

omniORB:?? giopTargetAddressMode = KeyAddr

omniORB:?? id = omniORB4

omniORB:?? idleThreadTimeout = 10

omniORB:?? inConScanPeriod = 15

omniORB:?? lcdMode = 0

omniORB:?? maxGIOPConnectionPerServer = 5

omniORB:?? maxGIOPVersion = 1.2

omniORB:?? maxInterleavedCallsPerConnection = 5

omniORB:?? maxServerThreadPerConnection = 100

omniORB:?? maxServerThreadPoolSize = 100

omniORB:?? maxSocketRecv = 2147483647

omniORB:?? maxSocketSend = 2147483647

omniORB:?? nativeCharCodeSet = ISO-8859-1

omniORB:?? nativeWCharCodeSet = UTF-16

omniORB:?? objectTableSize = 0

omniORB:?? offerBiDirectionalGIOP = 0

omniORB:?? oneCallPerConnection = 1

omniORB:?? outConScanPeriod = 15

omniORB:?? poaHoldRequestTimeout = 0

omniORB:?? poaUniquePersistentSystemIds = 1

omniORB:?? principal = [Null]

omniORB:?? scanGranularity = 5

omniORB:?? serverCallTimeOutPeriod = 0

omniORB:?? serverTransportRule = * unix,ssl,tcp

omniORB:?? strictIIOP = 1

omniORB:?? supportBootstrapAgent = 0

omniORB:?? supportCurrent = 1

omniORB:?? supportPerThreadTimeOut = 0

omniORB:?? tcAliasExpand = 0

omniORB:?? threadPerConnectionLowerLimit = 9000

omniORB:?? threadPerConnectionPolicy = 1

omniORB:?? threadPerConnectionUpperLimit = 10000

omniORB:?? threadPoolWatchConnection = 1

omniORB:?? traceExceptions = 1

omniORB:?? traceFile = [stderr]

omniORB:?? traceInvocationReturns = 0

omniORB:?? traceInvocations = 1

omniORB:?? traceLevel = 25

omniORB:?? traceThreadId = 1

omniORB:?? traceTime = 1

omniORB:?? unixTransportDirectory = /tmp/omni-%u

omniORB:?? unixTransportPermission =? 777

omniORB:?? useTypeCodeIndirections = 1

omniORB:?? verifyObjectExistsAndType = 1

omniORB:
(0) 2009-03-23 11:31:32.502432: Creating ref to remote: key<NameService>

?target id?????
: IDL:omg.org/CORBA/Object:1.0

?most derived id:

omniORB:
(0) 2009-03-23 11:31:32.502472: Initial reference `NameService' resolved from
-ORBInitRef argument / ORB registration.




omniORB:
(0) 2009-03-23 11:31:32.502554: Invoke '_is_a' on remote:
key<NameService>

omniORB:
(0) 2009-03-23 11:31:32.502721: Client attempt to connect to giop:tcp:sasd:2003

omniORB:
(1) 2009-03-23 11:31:32.502786: AsyncInvoker: thread id = 1 has started. Total
threads = 1

omniORB:
(1) 2009-03-23 11:31:32.502880: Scavenger task execute.

omniORB:
(0) 2009-03-23 11:31:37.580819: getaddrinfo failed for node 'sasd', port 2003:
Name or service not known

omniORB:
(0) 2009-03-23 11:31:37.580870: Switch rope to use address giop:tcp:sasd:2003

omniORB:
(0) 2009-03-23 11:31:37.580886: Unable to open new connection:
giop:tcp:sasd:2003

omniORB:
(0) 2009-03-23 11:31:37.580897: throw giopStream::CommFailure from
giopStream.cc:1148(0,NO,TRANSIENT_CallTimedout)

omniORB:
(0) 2009-03-23 11:31:37.593621: Released 131 stub TypeCodes from
'AllEnumsCORBA_DYN.cpp'.

omniORB:
(0) 2009-03-23 11:31:37.593647: Released 1 stub TypeCode from
'Pingable_DYN.cpp'.

omniORB:
(0) 2009-03-23 11:31:37.593658: Released 1 stub TypeCode from
'Shutdownable_DYN.cpp'.

omniORB:
(0) 2009-03-23 11:31:37.593667: Released 1 stub TypeCode from
'Versionable_DYN.cpp'.

omniORB:
(0) 2009-03-23 11:31:37.593748: Released 37 stub TypeCodes from
'Minerva_DYN.cpp'.

omniORB:
(0) 2009-03-23 11:31:37.593899: Released 93 stub TypeCodes from
'SwitchControl_DYN.cpp'.

omniORB:
(0) 2009-03-23 11:31:37.594016: Released 60 stub TypeCodes from
'dynException.cc'.

omniORB:
(0) 2009-03-23 11:31:37.594041: Released 2 stub TypeCodes from 'policy.cc'.

omniORB:
(0) 2009-03-23 11:31:37.594057: Released 1 stub TypeCode from
'unknownUserExn.cc'.

omniORB:
(0) 2009-03-23 11:31:37.594076: Released 7 stub TypeCodes from 'poastub.cc'.

omniORB:
(0) 2009-03-23 11:31:37.594088: Released 4 stub TypeCodes from
'bootstrapDynSK.cc'.

omniORB:
(0) 2009-03-23 11:31:37.594133: Released 39 stub TypeCodes from
'corbaidlDynSK.cc'.

omniORB:
(0) 2009-03-23 11:31:37.594410: Released 84 stub TypeCodes from 'irDynSK.cc'.

omniORB:
(0) 2009-03-23 11:31:37.594451: Released 21 stub TypeCodes from
'NamingDynSK.cc'.

omniORB:
(0) 2009-03-23 11:31:37.594464: Released 2 stub TypeCodes from 'boxesDynSK.cc'.

omniORB:
(0) 2009-03-23 11:31:37.594477: Unregister value factory for
'IDL:omg.org/CORBA/WStringValue:1.0'.

omniORB:
(0) 2009-03-23 11:31:37.594490: Unregister value factory for
'IDL:omg.org/CORBA/StringValue:1.0'.

omniORB:
(0) 2009-03-23 11:31:37.594526: omniRemoteIdentity deleted.

omniORB:
(0) 2009-03-23 11:31:37.594547: ObjRef() -- deleted.

omniORB:
(0) 2009-03-23 11:31:37.594736: ORB not destroyed; no final clean-up.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090324/2d2bc082/attachment-0001.htm
Michael
2009-03-25 06:40:12 UTC
Permalink
Hi

what kind of unix are you using. More importantly what does your DNS
configuration look like (e.g. /etc/resolv.conf). It is also important to
know if the DNS server configured (if any, some unices try localhost
otherwise) is reachable or not. It would be also interesting to know
what kind of DNS server you're contacting. Depending on how the server
reacts having long timeouts are possible. A possible scenario is a dns
cache that is configured to resolve only to specific client IP
addresses, so your requests will be silently dropped (in the end it's
UDP), this is not uncommon and I think it is in fact not omniORB related
in any way (it has always been that way). I would suggest you try to
reproduce your issues using a small C program or e.g. the host command
on the command line and try to fix your host configuration. If you're
only using a known subset of hostnames you might want to filter within
your application.

If you cannot fix your overall DNS setup, you can also set a timeout and
limit the number of attempts in /etc/resolv.conf and/or
/etc/nsswitch.conf (depending on your OS, use man resolv.conf / man
nsswitch.conf).

Example entry in resolv.conf for FreeBSD limiting timeout to 3 seconds
and 5 attempts (the default values are 5 second timeout * 30, so this
means a maximum retry period of 150 seconds):
nameserver 192.168.1.1
nameserver 10.0.0.1
options timeout:3 attempts:5

You don't want to tune this too heavily, because you don't want to lose
queries + the problem you're heaving shouldn't happen in a sane DNS
environment anyway.

br
michael
Post by penfiel-stanford at yahoo.com ()
Hi
I am attempting to locate the source of the name
resolution delay when a useraccidentally enters an incorrect hostname to the
ORB_init function (from a commandline parameter).
I ran my client code with trace level set to
25 and I see that there is a small delaybefore the getaddrinfo failure is
reported. The problem is that on some UNIXcomputers this delay is small (5
seconds in my sample output below) and on other computers this delay is many
minutes. There are many timeout settings available inomniOrb, however, the
symptoms make me believe that the delay is systemrelated.
I?m sure someone has encountered this behavior.
Can anyone point me in the right direction in order to address (or further isolate) the delay issue?
Thanks in
advance for any insight you can provide into this issue!The omniOrb output is listed below.
Hugo
==========
Configuration file "/etc/omniORB.cfg" either does not exist or is not
a file. No settings read.
(0) 2009-03-23 11:31:32.501417: Distribution date: Tue Nov 28 13:27:23 GMT 2006
dgrisby
127.0.0.1
11.47.12.140
(0) 2009-03-23 11:31:32.501700: Maximum supported GIOP version is 1.2
(0) 2009-03-23 11:31:32.501815: Native char code sets: ISO-8859-1 UTF-8.
(0) 2009-03-23 11:31:32.501827: Transmission char code sets: ISO-8859-1(1.2)
ISO-8859-1(1.1) ISO-8859-1(1.0) UTF-8(1.2) UTF-8(1.1).
(0) 2009-03-23 11:31:32.501840: Native wide char code sets: UTF-16.
(0) 2009-03-23 11:31:32.501846: Transmission wide char code sets: UTF-16(1.2).
(0) 2009-03-23 11:31:32.501877: Initialising omniDynamic library.
omniORB: DefaultInitRef (file) =
omniORB: DefaultInitRef (args) =
omniORB: InitRef = NameService=corbaname::sasd:2003/NameService
omniORB: abortOnInternalError = 0
omniORB: abortOnNativeException = 0
omniORB: acceptBiDirectionalGIOP = 0
omniORB: acceptMisalignedTcIndirections = 0
omniORB: bootstrapAgentHostname =
omniORB: bootstrapAgentPort = 900
omniORB: clientCallTimeOutPeriod = 2000
omniORB: clientConnectTimeOutPeriod = 2000
omniORB: clientTransportRule = * unix,ssl,tcp
omniORB: configFile = /etc/omniORB.cfg
omniORB: connectionWatchImmediate = 0
omniORB: connectionWatchPeriod = 50000
omniORB: copyValuesInLocalCalls = 1
omniORB: diiThrowsSysExceptions = 0
omniORB: dumpConfiguration = 0
omniORB: endPointPublish = addr
omniORB: giopMaxMsgSize = 160000000
omniORB: giopTargetAddressMode = KeyAddr
omniORB: id = omniORB4
omniORB: idleThreadTimeout = 10
omniORB: inConScanPeriod = 15
omniORB: lcdMode = 0
omniORB: maxGIOPConnectionPerServer = 5
omniORB: maxGIOPVersion = 1.2
omniORB: maxInterleavedCallsPerConnection = 5
omniORB: maxServerThreadPerConnection = 100
omniORB: maxServerThreadPoolSize = 100
omniORB: maxSocketRecv = 2147483647
omniORB: maxSocketSend = 2147483647
omniORB: nativeCharCodeSet = ISO-8859-1
omniORB: nativeWCharCodeSet = UTF-16
omniORB: objectTableSize = 0
omniORB: offerBiDirectionalGIOP = 0
omniORB: oneCallPerConnection = 1
omniORB: outConScanPeriod = 15
omniORB: poaHoldRequestTimeout = 0
omniORB: poaUniquePersistentSystemIds = 1
omniORB: principal = [Null]
omniORB: scanGranularity = 5
omniORB: serverCallTimeOutPeriod = 0
omniORB: serverTransportRule = * unix,ssl,tcp
omniORB: strictIIOP = 1
omniORB: supportBootstrapAgent = 0
omniORB: supportCurrent = 1
omniORB: supportPerThreadTimeOut = 0
omniORB: tcAliasExpand = 0
omniORB: threadPerConnectionLowerLimit = 9000
omniORB: threadPerConnectionPolicy = 1
omniORB: threadPerConnectionUpperLimit = 10000
omniORB: threadPoolWatchConnection = 1
omniORB: traceExceptions = 1
omniORB: traceFile = [stderr]
omniORB: traceInvocationReturns = 0
omniORB: traceInvocations = 1
omniORB: traceLevel = 25
omniORB: traceThreadId = 1
omniORB: traceTime = 1
omniORB: unixTransportDirectory = /tmp/omni-%u
omniORB: unixTransportPermission = 777
omniORB: useTypeCodeIndirections = 1
omniORB: verifyObjectExistsAndType = 1
(0) 2009-03-23 11:31:32.502432: Creating ref to remote: key<NameService>
target id
: IDL:omg.org/CORBA/Object:1.0
(0) 2009-03-23 11:31:32.502472: Initial reference `NameService' resolved from
-ORBInitRef argument / ORB registration.
key<NameService>
(0) 2009-03-23 11:31:32.502721: Client attempt to connect to giop:tcp:sasd:2003
(1) 2009-03-23 11:31:32.502786: AsyncInvoker: thread id = 1 has started. Total
threads = 1
(1) 2009-03-23 11:31:32.502880: Scavenger task execute.
Name or service not known
(0) 2009-03-23 11:31:37.580870: Switch rope to use address giop:tcp:sasd:2003
giop:tcp:sasd:2003
(0) 2009-03-23 11:31:37.580897: throw giopStream::CommFailure from
giopStream.cc:1148(0,NO,TRANSIENT_CallTimedout)
(0) 2009-03-23 11:31:37.593621: Released 131 stub TypeCodes from
'AllEnumsCORBA_DYN.cpp'.
(0) 2009-03-23 11:31:37.593647: Released 1 stub TypeCode from
'Pingable_DYN.cpp'.
(0) 2009-03-23 11:31:37.593658: Released 1 stub TypeCode from
'Shutdownable_DYN.cpp'.
(0) 2009-03-23 11:31:37.593667: Released 1 stub TypeCode from
'Versionable_DYN.cpp'.
(0) 2009-03-23 11:31:37.593748: Released 37 stub TypeCodes from
'Minerva_DYN.cpp'.
(0) 2009-03-23 11:31:37.593899: Released 93 stub TypeCodes from
'SwitchControl_DYN.cpp'.
(0) 2009-03-23 11:31:37.594016: Released 60 stub TypeCodes from
'dynException.cc'.
(0) 2009-03-23 11:31:37.594041: Released 2 stub TypeCodes from 'policy.cc'.
(0) 2009-03-23 11:31:37.594057: Released 1 stub TypeCode from
'unknownUserExn.cc'.
(0) 2009-03-23 11:31:37.594076: Released 7 stub TypeCodes from 'poastub.cc'.
(0) 2009-03-23 11:31:37.594088: Released 4 stub TypeCodes from
'bootstrapDynSK.cc'.
(0) 2009-03-23 11:31:37.594133: Released 39 stub TypeCodes from
'corbaidlDynSK.cc'.
(0) 2009-03-23 11:31:37.594410: Released 84 stub TypeCodes from 'irDynSK.cc'.
(0) 2009-03-23 11:31:37.594451: Released 21 stub TypeCodes from
'NamingDynSK.cc'.
(0) 2009-03-23 11:31:37.594464: Released 2 stub TypeCodes from 'boxesDynSK.cc'.
(0) 2009-03-23 11:31:37.594477: Unregister value factory for
'IDL:omg.org/CORBA/WStringValue:1.0'.
(0) 2009-03-23 11:31:37.594490: Unregister value factory for
'IDL:omg.org/CORBA/StringValue:1.0'.
(0) 2009-03-23 11:31:37.594526: omniRemoteIdentity deleted.
(0) 2009-03-23 11:31:37.594547: ObjRef() -- deleted.
(0) 2009-03-23 11:31:37.594736: ORB not destroyed; no final clean-up.
------------------------------------------------------------------------
_______________________________________________
omniORB-list mailing list
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
Loading...