You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

528 lines
46 KiB

[03:05:50-315.460] [INFO] [8] (test_etcp_two_instances.c:253) main() === ETCP Two-Instance Connection Test ===
[03:05:50-315.481] [INFO] [256] (utun_instance.c:34) utun_instance_set_tun_init_enabled() TUN initialization disabled
[03:05:50-315.486] [INFO] [8] (test_etcp_two_instances.c:259) main() Creating server instance...
[03:05:50-315.490] [INFO] [8192] (socket_compat.c:54) socket_platform_init() POSIX socket subsystem ready
[03:05:50-315.502] [INFO] [1] (u_async.c:930) uasync_create() Using epoll for socket monitoring
[CONFIG DEBUG] Opening config file: /tmp/utun_test_al45hN/server.conf
[CONFIG DEBUG] Successfully opened config file
[CONFIG DEBUG] Checking config - priv_key='67b705a92b41bcaae105af2d6a17743faa7b26ccebba8b3b9b0af05e9cd1d5fb' (len=64), pub_key='1c55e4ccae7c4470707759086738b10681bf88b81f198cc2ab54a647d1556e17c65e6b1833e0c771e5a39382c03067c388915a4c732191bc130480f20f8e00b9' (len=128), node_id=1229782938247303441
[CONFIG DEBUG] Validation results - need_priv_key=0, need_pub_key=0, need_node_id=0
[CONFIG DEBUG] Opening config file: /tmp/utun_test_al45hN/server.conf
[CONFIG DEBUG] Successfully opened config file
[03:05:50-315.542] [INFO] [16] (secure_channel.c:174) sc_init_local_keys() sc_init_local_keys: public_key len=128, private_key len=64
[03:05:50-315.593] [INFO] [16] (secure_channel.c:188) sc_init_local_keys() sc_init_local_keys: keys initialized successfully
[03:05:50-315.603] [INFO] [1] (etcp_api.c:39) etcp_bind() etcp_bind: Bound ID 0 to callback 0x57c7c6255110 for instance 0x57c7fa35f4e0
[03:05:50-315.608] [INFO] [512] (routing.c:272) routing_create() Routing module initialized for instance
[03:05:50-315.611] [INFO] [512] (utun_instance.c:91) utun_instance_create() Routing module created
[03:05:50-315.615] [INFO] [256] (utun_instance.c:133) utun_instance_create() TUN initialization disabled - skipping TUN device setup
[03:05:50-315.618] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa360830, hash_size=0
[03:05:50-315.622] [INFO] [1] (etcp_api.c:39) etcp_bind() etcp_bind: Bound ID 1 to callback 0x57c7c62541c0 for instance 0x57c7fa35f4e0
[03:05:50-315.625] [INFO] [4096] (route_bgp.c:382) route_bgp_init() Route change callback registered
[03:05:50-315.629] [INFO] [4096] (route_bgp.c:385) route_bgp_init() BGP module initialized
[03:05:50-315.632] [INFO] [4096] (utun_instance.c:143) utun_instance_create() BGP module initialized
[03:05:50-315.635] [TRACE] [4] (etcp_connections.c:807) init_connections()
[03:05:50-315.639] [TRACE] [4] (etcp_connections.c:269) etcp_socket_add()
[03:05:50-315.650] [DEBUG] [8192] (socket_compat.c:97) socket_create_udp() Created UDP socket: 6
[03:05:50-315.663] [INFO] [8] (etcp_connections.c:340) etcp_socket_add() [ETCP] Successfully bound socket to local address, family=2
[03:05:50-315.668] [INFO] [4] (etcp_connections.c:362) etcp_socket_add() Registered ETCP socket with uasync
[03:05:50-315.672] [INFO] [8] (etcp_connections.c:364) etcp_socket_add() [ETCP] Socket 0x57c7fa3604d0 registered and active
[03:05:50-315.676] [INFO] [4] (etcp_connections.c:835) init_connections() Initialized server test on 127.0.0.1:9011 (links: 0)
[03:05:50-315.679] [DEBUG] [4] (etcp_connections.c:842) init_connections() init_connections called, instance=0x57c7fa35f4e0, config=0x57c7fa35fdb0, clients=(nil), connections_count=0
[03:05:50-315.683] [INFO] [4] (etcp_connections.c:1018) init_connections() Initialized 0 connections
DEBUG: utun_instance_init() calling init_connections() for instance 0x57c7fa35f4e0
[03:05:50-315.688] [TRACE] [4] (etcp_connections.c:807) init_connections()
[03:05:50-315.691] [TRACE] [4] (etcp_connections.c:269) etcp_socket_add()
[03:05:50-315.697] [DEBUG] [8192] (socket_compat.c:97) socket_create_udp() Created UDP socket: 7
[03:05:50-315.705] [ERROR] [8] (etcp_connections.c:327) etcp_socket_add() [ETCP] Failed to bind socket to address family 2: Address already in use
[03:05:50-315.709] [ERROR] [8] (etcp_connections.c:333) etcp_socket_add() [ETCP] Failed to bind to 127.0.0.1:9011
[03:05:50-315.718] [ERROR] [8] (etcp_connections.c:818) init_connections() Failed to create socket for server test
[03:05:50-315.726] [DEBUG] [4] (etcp_connections.c:842) init_connections() init_connections called, instance=0x57c7fa35f4e0, config=0x57c7fa35fdb0, clients=(nil), connections_count=0
[03:05:50-315.730] [INFO] [4] (etcp_connections.c:1018) init_connections() Initialized 0 connections
DEBUG: init_connections() returned: 0
DEBUG: Connections initialized successfully, count=0
[03:05:50-315.735] [INFO] [8] (test_etcp_two_instances.c:280) main() Server instance ready (node_id=1111111111111111)
[03:05:50-315.739] [INFO] [8] (test_etcp_two_instances.c:283) main() Creating client instance...
[CONFIG DEBUG] Opening config file: /tmp/utun_test_al45hN/client.conf
[CONFIG DEBUG] Successfully opened config file
[CONFIG DEBUG] Checking config - priv_key='4813d31d28b7e9829247f488c6be7672f2bdf61b2508333128e386d1759afed2' (len=64), pub_key='c594f33c91f3a2222795c2c110c527bf214ad1009197ce14556cb13df3c461b3c373bed8f205a8dd1fc0c364f90bf471d7c6f5db49564c33e4235d268569ac71' (len=128), node_id=2459565876494606882
[CONFIG DEBUG] Validation results - need_priv_key=0, need_pub_key=0, need_node_id=0
[CONFIG DEBUG] Opening config file: /tmp/utun_test_al45hN/client.conf
[CONFIG DEBUG] Successfully opened config file
[03:05:50-315.767] [INFO] [16] (secure_channel.c:174) sc_init_local_keys() sc_init_local_keys: public_key len=128, private_key len=64
[03:05:50-315.790] [INFO] [16] (secure_channel.c:188) sc_init_local_keys() sc_init_local_keys: keys initialized successfully
[03:05:50-315.797] [INFO] [1] (etcp_api.c:39) etcp_bind() etcp_bind: Bound ID 0 to callback 0x57c7c6255110 for instance 0x57c7fa363560
[03:05:50-315.800] [INFO] [512] (routing.c:272) routing_create() Routing module initialized for instance
[03:05:50-315.804] [INFO] [512] (utun_instance.c:91) utun_instance_create() Routing module created
[03:05:50-315.807] [INFO] [256] (utun_instance.c:133) utun_instance_create() TUN initialization disabled - skipping TUN device setup
[03:05:50-315.810] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa364af0, hash_size=0
[03:05:50-315.813] [INFO] [1] (etcp_api.c:39) etcp_bind() etcp_bind: Bound ID 1 to callback 0x57c7c62541c0 for instance 0x57c7fa363560
[03:05:50-315.817] [INFO] [4096] (route_bgp.c:382) route_bgp_init() Route change callback registered
[03:05:50-315.820] [INFO] [4096] (route_bgp.c:385) route_bgp_init() BGP module initialized
[03:05:50-315.823] [INFO] [4096] (utun_instance.c:143) utun_instance_create() BGP module initialized
[03:05:50-315.826] [TRACE] [4] (etcp_connections.c:807) init_connections()
[03:05:50-315.829] [TRACE] [4] (etcp_connections.c:269) etcp_socket_add()
[03:05:50-315.836] [DEBUG] [8192] (socket_compat.c:97) socket_create_udp() Created UDP socket: 7
[03:05:50-315.843] [INFO] [8] (etcp_connections.c:340) etcp_socket_add() [ETCP] Successfully bound socket to local address, family=2
[03:05:50-315.848] [INFO] [4] (etcp_connections.c:362) etcp_socket_add() Registered ETCP socket with uasync
[03:05:50-315.851] [INFO] [8] (etcp_connections.c:364) etcp_socket_add() [ETCP] Socket 0x57c7fa364910 registered and active
[03:05:50-315.855] [INFO] [4] (etcp_connections.c:835) init_connections() Initialized server test on 127.0.0.1:9012 (links: 0)
[03:05:50-315.858] [DEBUG] [4] (etcp_connections.c:842) init_connections() init_connections called, instance=0x57c7fa363560, config=0x57c7fa364230, clients=0x57c7fa364710, connections_count=0
[03:05:50-315.862] [INFO] [4] (etcp_connections.c:846) init_connections() Client test_client - keepalive=1, links=0x57c7fa364870, peer_key_len=128
[03:05:50-315.865] [TRACE] [8] (etcp.c:70) etcp_connection_create()
[03:05:50-315.869] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa35e320, hash_size=0
[03:05:50-315.872] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa360a80, hash_size=0
[03:05:50-315.882] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3673d0, hash_size=1024
[03:05:50-315.898] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa369470, hash_size=1024
[03:05:50-315.909] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa36b510, hash_size=1024
[03:05:50-315.912] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa36d5b0, hash_size=0
[03:05:50-315.916] [DEBUG] [8] (pkt_normalizer.c:35) pn_init() pn_init:[6882→????] init 0x57c7fa360eb0, mtu=1500
[03:05:50-315.920] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa36d640, hash_size=0
[03:05:50-315.923] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa36d6d0, hash_size=0
[03:05:50-315.926] [DEBUG] [512] (routing.c:297) routing_add_conn() routing_add_conn: deprecated, no action taken
[03:05:50-315.929] [DEBUG] [8] (etcp.c:128) etcp_connection_create() [6882→????] connection initialized. ETCP=0x57c7fa360eb0 mtu=1500, next_tx_id=1
[03:05:50-315.933] [TRACE] [8] (etcp.c:268) etcp_update_log_name()
[03:05:50-315.937] [INFO] [16] (etcp_connections.c:873) init_connections() init_connections: setting peer public key for client test_client
[03:05:50-316.327] [INFO] [16] (etcp_connections.c:878) init_connections() init_connections: successfully set peer public key for client test_client
[03:05:50-316.337] [TRACE] [4] (etcp_connections.c:398) etcp_link_new()
[03:05:50-316.341] [TRACE] [4] (etcp_connections.c:234) etcp_find_free_local_link_id()
[03:05:50-316.345] [TRACE] [4] (etcp_connections.c:140) sockaddr_hash()
[03:05:50-316.348] [TRACE] [4] (etcp_connections.c:184) insert_link()
[03:05:50-316.352] [TRACE] [4] (etcp_connections.c:169) realloc_links()
[03:05:50-316.355] [TRACE] [4] (etcp_connections.c:147) find_link_index()
[03:05:50-316.358] [INFO] [4] (etcp_connections.c:438) etcp_link_new() etcp_link_new: client link, calling etcp_link_send_init
[03:05:50-316.361] [TRACE] [4] (etcp_connections.c:42) etcp_link_send_init()
[03:05:50-316.365] [INFO] [4] (etcp_connections.c:43) etcp_link_send_init() etcp_link_send_init link=0x57c7fa37c850, is_server=0
[03:05:50-316.369] [INFO] [4] (etcp_connections.c:81) etcp_link_send_init() Sending INIT request to link, node_id=2459565876494606882, retry=0
[03:05:50-316.373] [INFO] [8] (etcp_connections.c:88) etcp_link_send_init() [ETCP] INIT sending to 127.0.0.1:9011, link=0x57c7fa37c850
[03:05:50-316.376] [TRACE] [4] (etcp_connections.c:471) etcp_encrypt_send()
[03:05:50-316.382] [TRACE] [8] (etcp.c:53) get_current_timestamp()
[03:05:50-316.386] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:05:50-316.389] [INFO] [8] (etcp_connections.c:485) etcp_encrypt_send() Encrypt start
[03:05:50-317.072] [INFO] [8] (etcp_connections.c:487) etcp_encrypt_send() Encrypt end
[03:05:50-317.101] [INFO] [4] (etcp_connections.c:927) init_connections() Created link 0x57c7fa37c850 for client test_client, socket=0x57c7fa364910
[03:05:50-317.105] [TRACE] [8] (etcp.c:268) etcp_update_log_name()
[03:05:50-317.109] [INFO] [16] (etcp_connections.c:946) init_connections() init_connections: setting peer public key for client test_client
[03:05:50-317.186] [INFO] [16] (etcp_connections.c:951) init_connections() init_connections: successfully set peer public key for client test_client
[03:05:50-317.190] [INFO] [4] (etcp_connections.c:1007) init_connections() Added connection 0x57c7fa360eb0 to instance, total count: 1
[03:05:50-317.194] [INFO] [4] (etcp_connections.c:1018) init_connections() Initialized 1 connections
DEBUG: utun_instance_init() calling init_connections() for instance 0x57c7fa363560
[03:05:50-317.198] [TRACE] [4] (etcp_connections.c:807) init_connections()
[03:05:50-317.202] [TRACE] [4] (etcp_connections.c:269) etcp_socket_add()
[03:05:50-317.210] [DEBUG] [8192] (socket_compat.c:97) socket_create_udp() Created UDP socket: 8
[03:05:50-317.218] [ERROR] [8] (etcp_connections.c:327) etcp_socket_add() [ETCP] Failed to bind socket to address family 2: Address already in use
[03:05:50-317.221] [ERROR] [8] (etcp_connections.c:333) etcp_socket_add() [ETCP] Failed to bind to 127.0.0.1:9012
[03:05:50-317.228] [ERROR] [8] (etcp_connections.c:818) init_connections() Failed to create socket for server test
[03:05:50-317.236] [DEBUG] [4] (etcp_connections.c:842) init_connections() init_connections called, instance=0x57c7fa363560, config=0x57c7fa364230, clients=0x57c7fa364710, connections_count=1
[03:05:50-317.239] [INFO] [4] (etcp_connections.c:846) init_connections() Client test_client - keepalive=1, links=0x57c7fa364870, peer_key_len=128
[03:05:50-317.243] [TRACE] [8] (etcp.c:70) etcp_connection_create()
[03:05:50-317.246] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3abe20, hash_size=0
[03:05:50-317.249] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3abeb0, hash_size=0
[03:05:50-317.256] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3abf40, hash_size=1024
[03:05:50-317.263] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3ab150, hash_size=1024
[03:05:50-317.270] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3aadc0, hash_size=1024
[03:05:50-317.274] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3ab4e0, hash_size=0
[03:05:50-317.277] [DEBUG] [8] (pkt_normalizer.c:35) pn_init() pn_init:[6882→????] init 0x57c7fa3abcb0, mtu=1500
[03:05:50-317.281] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3ab710, hash_size=0
[03:05:50-317.300] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3ab300, hash_size=0
[03:05:50-317.309] [DEBUG] [512] (routing.c:297) routing_add_conn() routing_add_conn: deprecated, no action taken
[03:05:50-317.312] [DEBUG] [8] (etcp.c:128) etcp_connection_create() [6882→????] connection initialized. ETCP=0x57c7fa3abcb0 mtu=1500, next_tx_id=1
[03:05:50-317.316] [TRACE] [8] (etcp.c:268) etcp_update_log_name()
[03:05:50-317.319] [INFO] [16] (etcp_connections.c:873) init_connections() init_connections: setting peer public key for client test_client
[03:05:50-317.394] [INFO] [16] (etcp_connections.c:878) init_connections() init_connections: successfully set peer public key for client test_client
[03:05:50-317.398] [TRACE] [4] (etcp_connections.c:398) etcp_link_new()
[03:05:50-317.401] [TRACE] [4] (etcp_connections.c:234) etcp_find_free_local_link_id()
[03:05:50-317.405] [TRACE] [4] (etcp_connections.c:140) sockaddr_hash()
[03:05:50-317.408] [TRACE] [4] (etcp_connections.c:184) insert_link()
[03:05:50-317.411] [TRACE] [4] (etcp_connections.c:147) find_link_index()
[03:05:50-317.414] [INFO] [4] (etcp_connections.c:438) etcp_link_new() etcp_link_new: client link, calling etcp_link_send_init
[03:05:50-317.417] [TRACE] [4] (etcp_connections.c:42) etcp_link_send_init()
[03:05:50-317.420] [INFO] [4] (etcp_connections.c:43) etcp_link_send_init() etcp_link_send_init link=0x57c7fa3b2520, is_server=0
[03:05:50-317.424] [INFO] [4] (etcp_connections.c:81) etcp_link_send_init() Sending INIT request to link, node_id=2459565876494606882, retry=0
[03:05:50-317.428] [INFO] [8] (etcp_connections.c:88) etcp_link_send_init() [ETCP] INIT sending to 127.0.0.1:9011, link=0x57c7fa3b2520
[03:05:50-317.431] [TRACE] [4] (etcp_connections.c:471) etcp_encrypt_send()
[03:05:50-317.434] [TRACE] [8] (etcp.c:53) get_current_timestamp()
[03:05:50-317.437] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:05:50-317.441] [INFO] [8] (etcp_connections.c:485) etcp_encrypt_send() Encrypt start
[03:05:50-317.447] [INFO] [8] (etcp_connections.c:487) etcp_encrypt_send() Encrypt end
[03:05:50-317.458] [INFO] [4] (etcp_connections.c:927) init_connections() Created link 0x57c7fa3b2520 for client test_client, socket=0x57c7fa364910
[03:05:50-317.461] [TRACE] [8] (etcp.c:268) etcp_update_log_name()
[03:05:50-317.465] [INFO] [16] (etcp_connections.c:946) init_connections() init_connections: setting peer public key for client test_client
[03:05:50-317.532] [INFO] [16] (etcp_connections.c:951) init_connections() init_connections: successfully set peer public key for client test_client
[03:05:50-317.536] [INFO] [4] (etcp_connections.c:1007) init_connections() Added connection 0x57c7fa3abcb0 to instance, total count: 2
[03:05:50-317.539] [INFO] [4] (etcp_connections.c:1018) init_connections() Initialized 2 connections
DEBUG: init_connections() returned: 0
DEBUG: Connections initialized successfully, count=2
[03:05:50-317.548] [INFO] [8] (test_etcp_two_instances.c:306) main() Client instance ready (node_id=2222222222222222)
[03:05:50-317.553] [INFO] [8] (test_etcp_two_instances.c:315) main() [TEST] Client socket bound to port 9012 (expected NAT port)
[03:05:50-317.556] [INFO] [8] (test_etcp_two_instances.c:321) main() Starting connection monitoring...
[03:05:50-317.559] [INFO] [8] (test_etcp_two_instances.c:326) main() Running event loop...
[03:05:50-317.562] [INFO] [8] (test_etcp_two_instances.c:329) main() Waiting 0.5 seconds for server initialization...
[03:05:50-317.566] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-317.570] [TRACE] [4] (etcp_connections.c:527) etcp_connections_read_callback_socket()
[03:05:50-317.576] [TRACE] [4] (etcp_connections.c:224) etcp_link_find_by_addr()
[03:05:50-317.580] [TRACE] [4] (etcp_connections.c:140) sockaddr_hash()
[03:05:50-317.583] [TRACE] [4] (etcp_connections.c:147) find_link_index()
[03:05:50-317.652] [TRACE] [8] (etcp.c:70) etcp_connection_create()
[03:05:50-317.656] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3b2e80, hash_size=0
[03:05:50-317.660] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3b2f10, hash_size=0
[03:05:50-317.667] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3b2fa0, hash_size=1024
[03:05:50-317.674] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3ab9f0, hash_size=1024
[03:05:50-317.681] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3b2400, hash_size=1024
[03:05:50-317.684] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3ab390, hash_size=0
[03:05:50-317.688] [DEBUG] [8] (pkt_normalizer.c:35) pn_init() pn_init:[3441→????] init 0x57c7fa3b2d10, mtu=1500
[03:05:50-317.691] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3b2120, hash_size=0
[03:05:50-317.694] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x57c7fa3b21b0, hash_size=0
[03:05:50-317.698] [DEBUG] [512] (routing.c:297) routing_add_conn() routing_add_conn: deprecated, no action taken
[03:05:50-317.701] [DEBUG] [8] (etcp.c:128) etcp_connection_create() [3441→????] connection initialized. ETCP=0x57c7fa3b2d10 mtu=1500, next_tx_id=1
[03:05:50-317.704] [TRACE] [8] (etcp.c:268) etcp_update_log_name()
[03:05:50-317.708] [DEBUG] [4] (etcp_connections.c:624) etcp_connections_read_callback_socket() New connection from 127.0.0.1:9012 peer_id=2459565876494606882 etcp=0x57c7fa3b2d10
[03:05:50-317.712] [INFO] [4] (etcp_connections.c:629) etcp_connections_read_callback_socket() Added incoming connection 0x57c7fa3b2d10 to instance, total count: 1
[03:05:50-317.715] [TRACE] [4] (etcp_connections.c:398) etcp_link_new()
[03:05:50-317.719] [TRACE] [4] (etcp_connections.c:234) etcp_find_free_local_link_id()
[03:05:50-317.722] [TRACE] [4] (etcp_connections.c:140) sockaddr_hash()
[03:05:50-317.725] [TRACE] [4] (etcp_connections.c:184) insert_link()
[03:05:50-317.728] [TRACE] [4] (etcp_connections.c:169) realloc_links()
[03:05:50-317.731] [TRACE] [4] (etcp_connections.c:147) find_link_index()
[03:05:50-317.734] [TRACE] [8] (etcp.c:258) etcp_conn_reset()
[03:05:50-317.737] [DEBUG] [4] (etcp_connections.c:668) etcp_connections_read_callback_socket() Sending INIT RESPONSE, link=0x57c7fa3b9060, local_link_id=0, remote_link_id=0
[03:05:50-317.741] [INFO] [8] (etcp_connections.c:669) etcp_connections_read_callback_socket() [ETCP DEBUG] Send INIT RESPONSE
[03:05:50-317.744] [TRACE] [4] (etcp_connections.c:471) etcp_encrypt_send()
[03:05:50-317.748] [TRACE] [8] (etcp.c:53) get_current_timestamp()
[03:05:50-317.751] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:05:50-317.754] [INFO] [8] (etcp_connections.c:485) etcp_encrypt_send() Encrypt start
[03:05:50-317.759] [INFO] [8] (etcp_connections.c:487) etcp_encrypt_send() Encrypt end
[03:05:50-317.772] [INFO] [8] (etcp_loadbalancer.c:156) loadbalancer_link_ready() loadbalancer_link_ready: link=0x57c7fa3b9060 now ready, notifying ETCP_CONN
[03:05:50-317.776] [TRACE] [8] (etcp.c:637) etcp_link_ready_callback()
[03:05:50-317.779] [TRACE] [8] (etcp.c:645) etcp_conn_process_send_queue()
[03:05:50-317.782] [TRACE] [8] (etcp.c:535) etcp_request_pkt()
[03:05:50-317.785] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:05:50-317.789] [TRACE] [8] (etcp.c:342) input_queue_try_resume()
[03:05:50-317.792] [DEBUG] [8] (etcp.c:350) input_queue_try_resume() [3441→6882] resume callbacks: inflight_bytes=0, input_len=0
[03:05:50-317.795] [INFO] [4096] (route_bgp.c:452) route_bgp_new_conn() Added connection 0x57c7fa3b2d10 to senders_list
[03:05:50-317.799] [INFO] [4096] (route_bgp.c:338) route_bgp_send_table_to_conn_internal() Sending full routing table (0 routes) to connection
[03:05:50-317.803] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-317.807] [TRACE] [4] (etcp_connections.c:527) etcp_connections_read_callback_socket()
[03:05:50-317.812] [TRACE] [4] (etcp_connections.c:224) etcp_link_find_by_addr()
[03:05:50-317.815] [TRACE] [4] (etcp_connections.c:140) sockaddr_hash()
[03:05:50-317.818] [TRACE] [4] (etcp_connections.c:147) find_link_index()
[03:05:50-317.821] [INFO] [8] (etcp_connections.c:685) etcp_connections_read_callback_socket() Decrypt start
[03:05:50-317.829] [ERROR] [16] (etcp_connections.c:687) etcp_connections_read_callback_socket() etcp_connections_read_callback: failed to decrypt packet from node 1229782938247303441 len=105
[03:05:50-317.833] [ERROR] [8] (etcp_connections.c:799) etcp_connections_read_callback_socket() etcp_connections_read_callback: error 6
[03:05:50-317.836] [TRACE] [4] (etcp_connections.c:527) etcp_connections_read_callback_socket()
[03:05:50-317.841] [TRACE] [4] (etcp_connections.c:224) etcp_link_find_by_addr()
[03:05:50-317.844] [TRACE] [4] (etcp_connections.c:140) sockaddr_hash()
[03:05:50-317.847] [TRACE] [4] (etcp_connections.c:147) find_link_index()
[03:05:50-317.850] [INFO] [8] (etcp_connections.c:685) etcp_connections_read_callback_socket() Decrypt start
[03:05:50-317.854] [INFO] [8] (etcp_connections.c:694) etcp_connections_read_callback_socket() Decrypt end
[03:05:50-317.858] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:05:50-317.861] [TRACE] [8] (etcp.c:258) etcp_conn_reset()
[03:05:50-317.864] [INFO] [4] (etcp_connections.c:734) etcp_connections_read_callback_socket() [6882→0001] NAT address initialized: 127.0.0.1:9012
[03:05:50-317.868] [TRACE] [8] (etcp.c:268) etcp_update_log_name()
[03:05:50-317.871] [INFO] [8] (etcp_loadbalancer.c:156) loadbalancer_link_ready() loadbalancer_link_ready: link=0x57c7fa37c850 now ready, notifying ETCP_CONN
[03:05:50-317.874] [TRACE] [8] (etcp.c:637) etcp_link_ready_callback()
[03:05:50-317.877] [TRACE] [8] (etcp.c:645) etcp_conn_process_send_queue()
[03:05:50-317.880] [TRACE] [8] (etcp.c:535) etcp_request_pkt()
[03:05:50-317.883] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:05:50-317.887] [TRACE] [8] (etcp.c:342) input_queue_try_resume()
[03:05:50-317.898] [DEBUG] [8] (etcp.c:350) input_queue_try_resume() [6882→3441] resume callbacks: inflight_bytes=0, input_len=0
[03:05:50-317.901] [INFO] [4096] (route_bgp.c:452) route_bgp_new_conn() Added connection 0x57c7fa360eb0 to senders_list
[03:05:50-317.905] [INFO] [4096] (route_bgp.c:338) route_bgp_send_table_to_conn_internal() Sending full routing table (0 routes) to connection
[03:05:50-317.908] [INFO] [4] (etcp_connections.c:781) etcp_connections_read_callback_socket() etcp client: Link initialized successfully! Server node_id=1229782938247303441, mtu=0, local_link_id=0, remote_link_id=0
[03:05:50-317.911] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-318.979] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-320.052] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-321.126] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-322.202] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-323.283] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-324.385] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-325.459] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-326.546] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-327.643] [INFO] [8] (test_etcp_two_instances.c:129) monitor_connections() [SERVER] Link: peer=2222222222222222 initialized=1 type=server
[03:05:50-327.658] [INFO] [8] (test_etcp_two_instances.c:147) monitor_connections() [CLIENT] Link: peer=1 initialized=0 timer=active retry=1
[03:05:50-327.665] [INFO] [8] (test_etcp_two_instances.c:147) monitor_connections() [CLIENT] Link: peer=1111111111111111 initialized=1 timer=null retry=1
[03:05:50-327.670] [INFO] [8] (test_etcp_two_instances.c:156) monitor_connections() [CLIENT] Checking NAT fields...
[03:05:50-327.677] [INFO] [8] (test_etcp_two_instances.c:174) monitor_connections() [CLIENT] PASS: NAT address is set: 127.0.0.1:9012
[03:05:50-327.682] [INFO] [8] (test_etcp_two_instances.c:176) monitor_connections() [CLIENT] PASS: nat_changes_count=0, nat_hits_count=0
[03:05:50-327.687] [INFO] [8] (test_etcp_two_instances.c:196) monitor_connections() [CLIENT] PASS: NAT IP and port match exactly (127.0.0.1:9012)
[03:05:50-327.692] [INFO] [8] (test_etcp_two_instances.c:208) monitor_connections()
=== SUCCESS: Client connection established! ===
[03:05:50-327.697] [INFO] [8] (test_etcp_two_instances.c:212) monitor_connections() [TEST] Cancelling test timeout for immediate exit
[03:05:50-327.703] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-328.785] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-329.879] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-330.959] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-332.038] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-333.130] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-335.084] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-336.169] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-337.240] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-338.306] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-339.386] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-340.466] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-341.544] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-343.778] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-344.861] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-346.343] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-347.417] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-348.486] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-351.295] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-352.366] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-353.432] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-354.497] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-355.572] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-356.645] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-357.726] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-358.874] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-360.312] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-361.951] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-363.048] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-364.172] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-366.638] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-367.744] [TRACE] [4] (etcp_connections.c:110) etcp_link_init_timer_cbk()
[03:05:50-367.757] [TRACE] [4] (etcp_connections.c:42) etcp_link_send_init()
[03:05:50-367.761] [INFO] [4] (etcp_connections.c:43) etcp_link_send_init() etcp_link_send_init link=0x57c7fa3b2520, is_server=0
[03:05:50-367.767] [INFO] [4] (etcp_connections.c:81) etcp_link_send_init() Sending INIT request to link, node_id=2459565876494606882, retry=1
[03:05:50-367.789] [INFO] [8] (etcp_connections.c:88) etcp_link_send_init() [ETCP] INIT sending to 127.0.0.1:9011, link=0x57c7fa3b2520
[03:05:50-367.792] [TRACE] [4] (etcp_connections.c:471) etcp_encrypt_send()
[03:05:50-367.797] [TRACE] [8] (etcp.c:53) get_current_timestamp()
[03:05:50-367.801] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:05:50-367.804] [INFO] [8] (etcp_connections.c:485) etcp_encrypt_send() Encrypt start
[03:05:50-367.838] [INFO] [8] (etcp_connections.c:487) etcp_encrypt_send() Encrypt end
[03:05:50-367.863] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-367.869] [TRACE] [4] (etcp_connections.c:527) etcp_connections_read_callback_socket()
[03:05:50-367.876] [TRACE] [4] (etcp_connections.c:224) etcp_link_find_by_addr()
[03:05:50-367.879] [TRACE] [4] (etcp_connections.c:140) sockaddr_hash()
[03:05:50-367.882] [TRACE] [4] (etcp_connections.c:147) find_link_index()
[03:05:50-367.886] [INFO] [8] (etcp_connections.c:685) etcp_connections_read_callback_socket() Decrypt start
[03:05:50-367.892] [ERROR] [16] (etcp_connections.c:687) etcp_connections_read_callback_socket() etcp_connections_read_callback: failed to decrypt packet from node 1229782938247303441 len=105
[03:05:50-367.896] [ERROR] [8] (etcp_connections.c:799) etcp_connections_read_callback_socket() etcp_connections_read_callback: error 6
[03:05:50-367.900] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-368.964] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-370.033] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-371.104] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-372.175] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-373.246] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-374.301] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:05:50-375.369] [INFO] [8] (test_etcp_two_instances.c:333) main() Starting connection attempts...
[03:05:50-375.376] [INFO] [8] (test_etcp_two_instances.c:350) main()
Cleaning up...
[03:05:50-375.380] [INFO] [8] (test_etcp_two_instances.c:351) main() [CLEANUP] ua=0x57c7fa35d4c0
[03:05:50-375.383] [INFO] [8] (test_etcp_two_instances.c:352) main() [CLEANUP] server_instance=0x57c7fa35f4e0, client_instance=0x57c7fa363560
[03:05:50-375.387] [INFO] [8] (test_etcp_two_instances.c:353) main() [CLEANUP] monitor_timeout_id=0x57c7fa3b2300, test_timeout_id=(nil)
[03:05:50-375.391] [INFO] [8] (test_etcp_two_instances.c:357) main() [CLEANUP] Canceling monitor timeout on valid uasync
[03:05:50-375.394] [DEBUG] [1024] (u_async.c:426) uasync_cancel_timeout() uasync_cancel_timeout: not found in heap: ua=0x57c7fa35d4c0, t_id=0x57c7fa3b2300, node=0x57c7fa3b2300, expires=1771113950327 ms
[03:05:50-375.398] [INFO] [8] (test_etcp_two_instances.c:366) main() [CLEANUP] Timeouts canceled
[03:05:50-375.401] [INFO] [8] (test_etcp_two_instances.c:370) main() [CLEANUP] Shared uasync resources before destroy:
🔍 SHARED: UASYNC Resource Report for 0x57c7fa35d4c0
Timer Statistics: allocated=5, freed=3, active=2
Socket Statistics: allocated=2, freed=0, active=2
Timer: node=0x57c7fa3aae80, expires=1771113950417 ms, cancelled=0
Active timers in heap: 1
Socket array capacity: 16, active: 2
Socket: fd=6, active=1
Socket: fd=7, active=1
Total active sockets: 2
🔚 SHARED: End of resource report
[03:05:50-375.406] [INFO] [8] (test_etcp_two_instances.c:377) main() [CLEANUP] Destroying server instance 0x57c7fa35f4e0
[03:05:50-375.410] [INFO] [32] (utun_instance.c:153) utun_instance_destroy() [INSTANCE_DESTROY] Starting cleanup for instance 0x57c7fa35f4e0
🔍 [UTUN_INSTANCE LEAK DIAGNOSIS] Phase: BEFORE_CLEANUP
Instance: 0x57c7fa35f4e0
Node ID: 1229782938247303441
UA instance: 0x57c7fa35d4c0
Running: 0
📊 STRUCTURE COUNTS:
ETCP Sockets: 1 active
ETCP Connections: 1 active
ETCP Links: 2 total
🔧 RESOURCE STATUS:
Memory Pool: ALLOCATED
TUN Interface: NULL
TUN FD: -1
Connections list: 0x57c7fa3b2d10
ETCP Sockets list: 0x57c7fa3604d0
⚠️ POTENTIAL LEAKS:
❌ Memory Pool not freed
❌ 1 ETCP sockets still allocated
❌ 1 ETCP connections still allocated
❌ 2 ETCP links still allocated
📋 RECOMMENDATIONS:
→ Call memory_pool_destroy() before freeing instance
→ Iterate and call etcp_socket_remove() for each socket
→ Iterate and call etcp_connection_close() for each connection
[03:05:50-375.416] [INFO] [32] (utun_instance.c:162) utun_instance_destroy() [INSTANCE_DESTROY] Cleaning up ETCP sockets and connections
[03:05:50-375.428] [INFO] [32] (utun_instance.c:166) utun_instance_destroy() [INSTANCE_DESTROY] Removing socket 0x57c7fa3604d0, fd=6
[03:05:50-375.432] [TRACE] [4] (etcp_connections.c:370) etcp_socket_remove()
[03:05:50-375.435] [INFO] [8] (etcp_connections.c:373) etcp_socket_remove() [ETCP] Removing socket 0x57c7fa3604d0, socket_id=0x57c7fa35d570
[03:05:50-375.438] [INFO] [8] (etcp_connections.c:377) etcp_socket_remove() [ETCP] Removing socket from uasync, instance=0x57c7fa35f4e0, ua=0x57c7fa35d4c0
[03:05:50-375.444] [INFO] [8] (etcp_connections.c:380) etcp_socket_remove() [ETCP] Unregistered socket from uasync
[03:05:50-375.453] [INFO] [8] (etcp_connections.c:385) etcp_socket_remove() [ETCP] Closed socket
[03:05:50-375.457] [TRACE] [4] (etcp_connections.c:446) etcp_link_close()
[03:05:50-375.460] [TRACE] [4] (etcp_connections.c:208) remove_link()
[03:05:50-375.463] [TRACE] [4] (etcp_connections.c:147) find_link_index()
[03:05:50-375.467] [INFO] [32] (utun_instance.c:171) utun_instance_destroy() [INSTANCE_DESTROY] ETCP sockets cleanup complete
[03:05:50-375.470] [INFO] [32] (utun_instance.c:177) utun_instance_destroy() [INSTANCE_DESTROY] Closing connection 0x57c7fa3b2d10
[03:05:50-375.473] [TRACE] [8] (etcp.c:136) etcp_connection_close()
[03:05:50-375.477] [DEBUG] [512] (routing.c:304) routing_del_conn() routing_del_conn: deprecated, no action taken
[03:05:50-375.480] [INFO] [4096] (route_bgp.c:471) route_bgp_remove_conn() Removing connection 0x57c7fa3b2d10 from senders_list
[03:05:50-375.484] [INFO] [4096] (route_bgp.c:200) route_bgp_send_withdraw_for_conn() Sending withdraw for routes via conn 0x57c7fa3b2d10 to all peers
[03:05:50-375.488] [INFO] [4096] (route_bgp.c:484) route_bgp_remove_conn() Connection 0x57c7fa3b2d10 removed from senders_list
[03:05:50-375.491] [INFO] [512] (route_lib.c:425) route_table_delete() Removed 0 routes for connection 0x57c7fa3b2d10
[03:05:50-375.495] [DEBUG] [512] (routing.c:304) routing_del_conn() routing_del_conn: deprecated, no action taken
[03:05:50-375.498] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3b2120, head=(nil), tail=(nil), count=0
[03:05:50-375.502] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3b21b0, head=(nil), tail=(nil), count=0
[03:05:50-375.506] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3b2e80, head=(nil), tail=(nil), count=0
[03:05:50-375.509] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3b2f10, head=(nil), tail=(nil), count=0
[03:05:50-375.512] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3b2fa0, head=(nil), tail=(nil), count=0
[03:05:50-375.516] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3ab9f0, head=(nil), tail=(nil), count=0
[03:05:50-375.520] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3ab390, head=(nil), tail=(nil), count=0
[03:05:50-375.523] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3b2400, head=(nil), tail=(nil), count=0
[03:05:50-375.526] [INFO] [32] (utun_instance.c:184) utun_instance_destroy() [INSTANCE_DESTROY] ETCP connections cleanup complete
[03:05:50-375.530] [INFO] [512] (routing.c:281) routing_destroy() Destroying routing module
[03:05:50-375.533] [INFO] [1] (etcp_api.c:62) etcp_unbind() etcp_unbind: Unbound ID 0 for instance 0x57c7fa35f4e0
[03:05:50-375.537] [INFO] [4096] (utun_instance.c:198) utun_instance_destroy() Destroying BGP module
[03:05:50-375.540] [INFO] [1] (etcp_api.c:62) etcp_unbind() etcp_unbind: Unbound ID 1 for instance 0x57c7fa35f4e0
[03:05:50-375.547] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa360830, head=(nil), tail=(nil), count=0
[03:05:50-375.550] [INFO] [4096] (route_bgp.c:418) route_bgp_destroy() BGP module destroyed
[03:05:50-375.553] [INFO] [32] (utun_instance.c:205) utun_instance_destroy() [INSTANCE_DESTROY] Freeing configuration
[03:05:50-375.557] [INFO] [32] (utun_instance.c:212) utun_instance_destroy() [INSTANCE_DESTROY] Destroying packet pool
[03:05:50-375.560] [INFO] [32] (utun_instance.c:219) utun_instance_destroy() [INSTANCE_DESTROY] Destroying ack pool
[03:05:50-375.564] [INFO] [32] (utun_instance.c:226) utun_instance_destroy() [INSTANCE_DESTROY] Destroying data pool
[03:05:50-375.567] [INFO] [32] (utun_instance.c:241) utun_instance_destroy() [INSTANCE_DESTROY] Freeing instance memory
[03:05:50-375.570] [INFO] [32] (utun_instance.c:243) utun_instance_destroy() [INSTANCE_DESTROY] Instance destroyed completely
[03:05:50-375.573] [INFO] [8] (test_etcp_two_instances.c:382) main() [CLEANUP] Destroying client instance 0x57c7fa363560
[03:05:50-375.576] [INFO] [32] (utun_instance.c:153) utun_instance_destroy() [INSTANCE_DESTROY] Starting cleanup for instance 0x57c7fa363560
🔍 [UTUN_INSTANCE LEAK DIAGNOSIS] Phase: BEFORE_CLEANUP
Instance: 0x57c7fa363560
Node ID: 2459565876494606882
UA instance: 0x57c7fa35d4c0
Running: 0
📊 STRUCTURE COUNTS:
ETCP Sockets: 1 active
ETCP Connections: 2 active
ETCP Links: 3 total
🔧 RESOURCE STATUS:
Memory Pool: ALLOCATED
TUN Interface: NULL
TUN FD: -1
Connections list: 0x57c7fa3abcb0
ETCP Sockets list: 0x57c7fa364910
⚠️ POTENTIAL LEAKS:
❌ Memory Pool not freed
❌ 1 ETCP sockets still allocated
❌ 2 ETCP connections still allocated
❌ 3 ETCP links still allocated
📋 RECOMMENDATIONS:
→ Call memory_pool_destroy() before freeing instance
→ Iterate and call etcp_socket_remove() for each socket
→ Iterate and call etcp_connection_close() for each connection
[03:05:50-375.581] [INFO] [32] (utun_instance.c:162) utun_instance_destroy() [INSTANCE_DESTROY] Cleaning up ETCP sockets and connections
[03:05:50-375.584] [INFO] [32] (utun_instance.c:166) utun_instance_destroy() [INSTANCE_DESTROY] Removing socket 0x57c7fa364910, fd=7
[03:05:50-375.588] [TRACE] [4] (etcp_connections.c:370) etcp_socket_remove()
[03:05:50-375.591] [INFO] [8] (etcp_connections.c:373) etcp_socket_remove() [ETCP] Removing socket 0x57c7fa364910, socket_id=0x57c7fa35d5b8
[03:05:50-375.594] [INFO] [8] (etcp_connections.c:377) etcp_socket_remove() [ETCP] Removing socket from uasync, instance=0x57c7fa363560, ua=0x57c7fa35d4c0
[03:05:50-375.598] [INFO] [8] (etcp_connections.c:380) etcp_socket_remove() [ETCP] Unregistered socket from uasync
[03:05:50-375.604] [INFO] [8] (etcp_connections.c:385) etcp_socket_remove() [ETCP] Closed socket
[03:05:50-375.607] [TRACE] [4] (etcp_connections.c:446) etcp_link_close()
[03:05:50-375.610] [TRACE] [4] (etcp_connections.c:208) remove_link()
[03:05:50-375.614] [TRACE] [4] (etcp_connections.c:147) find_link_index()
[03:05:50-375.617] [INFO] [32] (utun_instance.c:171) utun_instance_destroy() [INSTANCE_DESTROY] ETCP sockets cleanup complete
[03:05:50-375.620] [INFO] [32] (utun_instance.c:177) utun_instance_destroy() [INSTANCE_DESTROY] Closing connection 0x57c7fa3abcb0
[03:05:50-375.623] [TRACE] [8] (etcp.c:136) etcp_connection_close()
[03:05:50-375.626] [DEBUG] [512] (routing.c:304) routing_del_conn() routing_del_conn: deprecated, no action taken
[03:05:50-375.629] [INFO] [4096] (route_bgp.c:471) route_bgp_remove_conn() Removing connection 0x57c7fa3abcb0 from senders_list
[03:05:50-375.633] [INFO] [4096] (route_bgp.c:200) route_bgp_send_withdraw_for_conn() Sending withdraw for routes via conn 0x57c7fa3abcb0 to all peers
[03:05:50-375.636] [INFO] [512] (route_lib.c:425) route_table_delete() Removed 0 routes for connection 0x57c7fa3abcb0
[03:05:50-375.639] [DEBUG] [512] (routing.c:304) routing_del_conn() routing_del_conn: deprecated, no action taken
[03:05:50-375.642] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3ab710, head=(nil), tail=(nil), count=0
[03:05:50-375.648] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3ab300, head=(nil), tail=(nil), count=0
[03:05:50-375.652] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3abe20, head=(nil), tail=(nil), count=0
[03:05:50-375.655] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3abeb0, head=(nil), tail=(nil), count=0
[03:05:50-375.658] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3abf40, head=(nil), tail=(nil), count=0
[03:05:50-375.662] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3ab150, head=(nil), tail=(nil), count=0
[03:05:50-375.665] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3ab4e0, head=(nil), tail=(nil), count=0
[03:05:50-375.669] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3aadc0, head=(nil), tail=(nil), count=0
[03:05:50-375.672] [TRACE] [4] (etcp_connections.c:446) etcp_link_close()
[03:05:50-375.675] [TRACE] [4] (etcp_connections.c:208) remove_link()
[03:05:50-375.679] [INFO] [32] (utun_instance.c:177) utun_instance_destroy() [INSTANCE_DESTROY] Closing connection 0x57c7fa360eb0
[03:05:50-375.682] [TRACE] [8] (etcp.c:136) etcp_connection_close()
[03:05:50-375.685] [DEBUG] [512] (routing.c:304) routing_del_conn() routing_del_conn: deprecated, no action taken
[03:05:50-375.688] [INFO] [4096] (route_bgp.c:471) route_bgp_remove_conn() Removing connection 0x57c7fa360eb0 from senders_list
[03:05:50-375.691] [INFO] [4096] (route_bgp.c:200) route_bgp_send_withdraw_for_conn() Sending withdraw for routes via conn 0x57c7fa360eb0 to all peers
[03:05:50-375.694] [INFO] [4096] (route_bgp.c:484) route_bgp_remove_conn() Connection 0x57c7fa360eb0 removed from senders_list
[03:05:50-375.698] [INFO] [512] (route_lib.c:425) route_table_delete() Removed 0 routes for connection 0x57c7fa360eb0
[03:05:50-375.701] [DEBUG] [512] (routing.c:304) routing_del_conn() routing_del_conn: deprecated, no action taken
[03:05:50-375.704] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa36d640, head=(nil), tail=(nil), count=0
[03:05:50-375.707] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa36d6d0, head=(nil), tail=(nil), count=0
[03:05:50-375.711] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa35e320, head=(nil), tail=(nil), count=0
[03:05:50-375.714] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa360a80, head=(nil), tail=(nil), count=0
[03:05:50-375.718] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa3673d0, head=(nil), tail=(nil), count=0
[03:05:50-375.721] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa369470, head=(nil), tail=(nil), count=0
[03:05:50-375.725] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa36d5b0, head=(nil), tail=(nil), count=0
[03:05:50-375.728] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa36b510, head=(nil), tail=(nil), count=0
[03:05:50-375.731] [INFO] [32] (utun_instance.c:184) utun_instance_destroy() [INSTANCE_DESTROY] ETCP connections cleanup complete
[03:05:50-375.734] [INFO] [512] (routing.c:281) routing_destroy() Destroying routing module
[03:05:50-375.738] [INFO] [1] (etcp_api.c:62) etcp_unbind() etcp_unbind: Unbound ID 0 for instance 0x57c7fa363560
[03:05:50-375.741] [INFO] [4096] (utun_instance.c:198) utun_instance_destroy() Destroying BGP module
[03:05:50-375.744] [INFO] [1] (etcp_api.c:62) etcp_unbind() etcp_unbind: Unbound ID 1 for instance 0x57c7fa363560
[03:05:50-375.752] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x57c7fa364af0, head=(nil), tail=(nil), count=0
[03:05:50-375.757] [INFO] [4096] (route_bgp.c:418) route_bgp_destroy() BGP module destroyed
[03:05:50-375.762] [INFO] [32] (utun_instance.c:205) utun_instance_destroy() [INSTANCE_DESTROY] Freeing configuration
[03:05:50-375.772] [INFO] [32] (utun_instance.c:212) utun_instance_destroy() [INSTANCE_DESTROY] Destroying packet pool
[03:05:50-375.777] [INFO] [32] (utun_instance.c:219) utun_instance_destroy() [INSTANCE_DESTROY] Destroying ack pool
[03:05:50-375.781] [INFO] [32] (utun_instance.c:226) utun_instance_destroy() [INSTANCE_DESTROY] Destroying data pool
[03:05:50-375.784] [INFO] [32] (utun_instance.c:241) utun_instance_destroy() [INSTANCE_DESTROY] Freeing instance memory
[03:05:50-375.787] [INFO] [32] (utun_instance.c:243) utun_instance_destroy() [INSTANCE_DESTROY] Instance destroyed completely
[03:05:50-375.790] [DEBUG] [1024] (u_async.c:1000) uasync_destroy() uasync_destroy: starting cleanup for ua=0x57c7fa35d4c0
🔍 BEFORE_DESTROY: UASYNC Resource Report for 0x57c7fa35d4c0
Timer Statistics: allocated=5, freed=3, active=2
Socket Statistics: allocated=2, freed=2, active=0
Active timers in heap: 0
Socket array capacity: 16, active: 0
Total active sockets: 0
🔚 BEFORE_DESTROY: End of resource report
[03:05:50-375.795] [ERROR] [32] (u_async.c:1007) uasync_destroy() Memory leaks detected before cleanup: timers 5/3, sockets 2/2
[03:05:50-375.798] [ERROR] [1024] (u_async.c:1009) uasync_destroy() Timer leak: allocated=5, freed=3, diff=2
[03:05:50-375.801] [ERROR] [1024] (u_async.c:1012) uasync_destroy() Socket leak: allocated=2, freed=2, diff=0
[03:05:50-375.805] [DEBUG] [32] (u_async.c:1048) uasync_destroy() Freed 0 socket nodes in destroy
[03:05:50-375.818] [DEBUG] [1024] (u_async.c:1081) uasync_destroy() uasync_destroy: completed successfully for ua=0x57c7fa35d4c0
[03:05:50-375.821] [INFO] [8192] (socket_compat.c:60) socket_platform_cleanup() POSIX socket cleanup completed
[03:05:50-375.944] [INFO] [8] (test_etcp_two_instances.c:396) main()
=== TEST PASSED ===