Bug 2033

Summary: shmiop broken on Windows
Product: TAO Reporter: Johnny Willemsen <jwillemsen>
Component: ORBAssignee: Johnny Willemsen <jwillemsen>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 1.4.3   
Hardware: x86   
OS: Windows 2000   

Description Johnny Willemsen 2005-01-18 14:13:25 CST
It seems shmiop is broken on windows. Both msvc and borland builds have this 
problem. Below is the test output that indicates things are broken. I am trying 
to look at this and make this bug as place holder.

TAO/tests/RTCORBA/Client_Protocol/run_test.pl



********** RTCORBA Client Protocol Policy Unit Test


Activated object one as 
<IOR:010000000d00000049444c3a546573743a312e30000000000200000000000000d5000000010
102000c00000031302e322e3132382e3434008d0b00002300000014010f004e53543a59ec41175e0
80001000000010000000000000001000000010000000004000000000000000800000001676832004
f415401000000140000000167683201000100000000000901010000000000024f41541c000000016
76832010000000c00000031302e322e3132382e3434008d0bffff020000003900000001676832010
000002b000000290000000167683201000000024f4154ffff0000ffff00000100010000000000010
00000000000000100000000000000024f4154e100000001010200110000007363617261622e72656
d6564792e6e6c00008e0b2300000014010f004e53543a59ec41175e0800010000000100000000000
00001000000010000000004000000000000000800000001676832004f41540100000014000000016
7683201000100000000000901010000000000024f415422000000016768320100000011000000736
3617261622e72656d6564792e6e6c00008e0bffff6832020000003900000001676832010000002b0
00000290000000167683201000000024f4154ffff0000ffff0000010001000000000001000000000
000000100000000>


Activated object two as 
<IOR:010000000d00000049444c3a546573743a312e300000000002000000000000008c000000010
102000c00000031302e322e3132382e3434008d0b6e6c1b00000014010f005253543a59ec41175e0
8000000000001000000010000000003000000000000000800000001676832004f415401000000140
000000104de0001000100000000000901010000000000024f41541c00000001676832010000000c0
0000031302e322e3132382e3434008d0bffff024f415496000000010102001100000073636172616
22e72656d6564792e6e6c00008e0b1b00000014010f005253543a59ec41175e08000000000001000
000010000000003000000000000000800000001676832004f415401000000140000000104de00010
00100000000000901010000000000024f41542200000001676832010000001100000073636172616
22e72656d6564792e6e6c00008e0bffff>

TAO (1216|2564) Loaded default protocol <IIOP_Factory>
TAO (1216|2564) Loaded default protocol <SHMIOP_Factory>
TAO (1216|2564) Loaded default protocol <DIOP_Factory>

Test 1
TAO (1216|2564) SHMIOP connection failed.
TAO (1216|2564) This is most likely due to a hostname lookup failure.
(1216|2564) EXCEPTION, Unexpected exception caught in ClientProtocolPolicy test 
client:
system exception, ID 'IDL:omg.org/CORBA/TRANSIENT:1.0'
OMG minor code (2), described as 'No usable profile in IOR.', completed = NO

ERROR: client returned 4294967295
ERROR: server timedout
ERROR: server returned -1

auto_run_tests_finished: TAO/tests/RTCORBA/Client_Protocol/run_test.pl Time:61s 
Result:0
Comment 1 Johnny Willemsen 2005-01-18 14:58:58 CST
It seems as the log says this is resulted to a bad dns setup. On the host 
scarab we have the domain remedy.nl, but ping scarab.remedy.nl gives unknown 
host. Ok, we can correct this, but for IIOP we default on windows always to ip 
addresses, so, why don't we do the same for SHMIOP?

The catior on our host:
decoding an IOR:
The Byte Order: Little Endian
The Type Id:    "IDL:Test:1.0"
Number of Profiles in IOR:      2
Profile number: 1
IIOP Version:   1.2
     Host Name: 10.2.128.44
     Port Number:       2957
     Object Key len:    27
     Object Key as hex:
     14 01 0f 00 52 53 54 3a 59 ec 41 17 5e 08 00 00
     00 00 00 01 00 00 00 01 00 00 00
     The Object Key as string:
     ....RST:Y.A.^..............
     The component <1> ID is 0 (TAG_ORB_TYPE)
             ORB Type: 1413566208 (TAO)
     The component <2> ID is 1 (TAG_CODE_SETS)
        Component Length 20
        The Component Byte Order:       Little Endian
        Native CodeSet for char:  Hex - 10001 Description -  ASCII
        Number of CCS for char 0
        Native CodeSet for wchar:  Hex - 10109 Description -  Unicode
        Number of CCS for wchar 0
     The component <3> ID is 1413566210 (TAO_TAG_ENDPOINTS)
             Endpoint #1:
             Host: 10.2.128.44
             Port: 2957
             Priority: -1
Profile number: 2
SHMIOP Version: 1.2
     Host Name: scarab.remedy.nl
     Port Number:       2958
     Object Key len:    27
     Object Key as hex:
     14 01 0f 00 52 53 54 3a 59 ec 41 17 5e 08 00 00
     00 00 00 01 00 00 00 01 00 00 00
     The Object Key as string:
     ....RST:Y.A.^..............
     The component <1> ID is 0 (TAG_ORB_TYPE)
             ORB Type: 1413566208 (TAO)
     The component <2> ID is 1 (TAG_CODE_SETS)
        Component Length 20
        The Component Byte Order:       Little Endian
        Native CodeSet for char:  Hex - 10001 Description -  ASCII
        Number of CCS for char 0
        Native CodeSet for wchar:  Hex - 10109 Description -  Unicode
        Number of CCS for wchar 0
     The component <3> ID is 1413566210 (TAO_TAG_ENDPOINTS)
             Endpoint #1:
             Host: scarab.remedy.nl
             Port: 2958
             Priority: -1
Comment 2 Johnny Willemsen 2005-01-19 07:08:47 CST
Martin found that the DNS server on our subnet for the build system was crashed 
resulting in the fact that DNS didn't work. I keep this bug open, we will 
change the SHMIOP code that it looks at the dotted decimal addresses setting 
and use that, so that on windows also shmiop uses ip addresses by default.
Comment 3 Johnny Willemsen 2005-01-19 07:08:57 CST
accept
Comment 4 Johnny Willemsen 2005-01-20 11:26:42 CST
Did some work on this, but now on the connector side I have a problem that it 
thinks that I am not connecting to the same host.

********** RTCORBA Client Protocol Policy Unit Test


Activated object one as 
<IOR:010000000d00000049444c3a546573743a312e30000000000200000000000000d1000000010
102000a000000313
02e352e302e3533006e0e2300000014010f004e53543dd8ef41f6ef0500010000000100000000000
0000100000001000000000400000000000000080
0000001596832004f415401000000140000000159683201000100000000000901010000000000024
f41541a00000001596832010000000a000000313
02e352e302e3533006e0effff0000020000003900000001596832010000002b00000029000000015
9683201000000024f4154ffff0000ffff0000010
001000000000001000000000000000100000000000000024f4154d1000000010102000a000000313
2372e302e302e31006f0e2300000014010f004e5
3543dd8ef41f6ef05000100000001000000000000000100000001000000000400000000000000080
0000001596832004f41540100000014000000015
9683201000100000000000901010000000000024f41541a00000001596832010000000a000000313
2372e302e302e31006f0effff000002000000390
0000001596832010000002b000000290000000159683201000000024f4154ffff0000ffff0000010
001000000000001000000000000000100000000>



Activated object two as 
<IOR:010000000d00000049444c3a546573743a312e3000000000020000000000000086000000010
102000a000000313
02e352e302e3533006e0e1b00000014010f005253543dd8ef41f6ef0500000000000100000001000
0000103000000000000000800000001596832004
f415401000000140000000104de0001000100000000000901010000000000024f41541a000000015
96832010000000a00000031302e352e302e35330
06e0effff0000024f415486000000010102000a0000003132372e302e302e31006f0e1b000000140
10f005253543dd8ef41f6ef05000000000001000
000010000000103000000000000000800000001596832004f415401000000140000000104de00010
00100000000000901010000000000024f41541a0
0000001596832010000000a0000003132372e302e302e31006f0effff>

TAO (3772|1408) Loaded default protocol <IIOP_Factory>
TAO (3772|1408) Loaded default protocol <SHMIOP_Factory>
TAO (3772|1408) Loaded default protocol <DIOP_Factory>

     Test 1
TAO (3772|1408) - Transport_Cache_Manager::fill_set_i, current_size = 0, 
cache_maximum = 512
TAO (3772|1408) - SHMIOP_Connector::make_connection, looking for SHMIOP 
connection.
(3772|1408) MEM_Connector can't connect to localhost:3695 which is not a local 
endpoint (local address is localhost:0)
TAO (3772|1408) - SHMIOP_Connector::make_connection, connection to 
<127.0.0.1:3695> failed (errno: Error 0
)
(3772|1408) EXCEPTION, Unexpected exception caught in ClientProtocolPolicy test 
client:
system exception, ID 'IDL:omg.org/CORBA/TRANSIENT:1.0'
OMG minor code (2), described as 'No usable profile in IOR.', completed = NO

ERROR: client returned 4294967295
Terminating on signal SIGINT(2)

C:\ACE\latest\ACE_wrappers\TAO\tests\RTCORBA\Client_Protocol>
Comment 5 Johnny Willemsen 2005-01-21 08:29:44 CST
Fixed.

Fri Jan 21 13:19:12 UTC 2005  Johnny Willemsen  <jwillemsen@remedy.nl>

        * tao/Strategies/SHMIOP_Acceptor.cpp:
          When ORBDottedDecimalAddresses is set to 1, then also respect
          this for SHMIOP. The endpoint created then also contains the
          ip address instead of the hostname. This is the same behaviour
          as for IIOP. On Windows we default to using ip addresses because
          DNS is often broken on Windows systems, SHMIOP didn't respected
          this behaviour which caused test failures on our Windows build
          systems at the moment our DNS server was crashed. This fixes
          bugzilla bug [2033].