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:30:18-142.174] [INFO] [8] (test_etcp_two_instances.c:253) main() === ETCP Two-Instance Connection Test ===
[03:30:18-142.196] [INFO] [256] (utun_instance.c:34) utun_instance_set_tun_init_enabled() TUN initialization disabled
[03:30:18-142.201] [INFO] [8] (test_etcp_two_instances.c:259) main() Creating server instance...
[03:30:18-142.205] [INFO] [8192] (socket_compat.c:54) socket_platform_init() POSIX socket subsystem ready
[03:30:18-142.223] [INFO] [1] (u_async.c:930) uasync_create() Using epoll for socket monitoring
[CONFIG DEBUG] Opening config file: /tmp/utun_test_ysqaNQ/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_ysqaNQ/server.conf
[CONFIG DEBUG] Successfully opened config file
[03:30:18-142.264] [INFO] [16] (secure_channel.c:174) sc_init_local_keys() sc_init_local_keys: public_key len=128, private_key len=64
[03:30:18-142.329] [INFO] [16] (secure_channel.c:188) sc_init_local_keys() sc_init_local_keys: keys initialized successfully
[03:30:18-142.340] [INFO] [1] (etcp_api.c:39) etcp_bind() etcp_bind: Bound ID 0 to callback 0x596e8f45b110 for instance 0x596ec7b6f4e0
[03:30:18-142.344] [INFO] [512] (routing.c:272) routing_create() Routing module initialized for instance
[03:30:18-142.347] [INFO] [512] (utun_instance.c:91) utun_instance_create() Routing module created
[03:30:18-142.351] [INFO] [256] (utun_instance.c:133) utun_instance_create() TUN initialization disabled - skipping TUN device setup
[03:30:18-142.354] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7b70830, hash_size=0
[03:30:18-142.358] [INFO] [1] (etcp_api.c:39) etcp_bind() etcp_bind: Bound ID 1 to callback 0x596e8f45a1c0 for instance 0x596ec7b6f4e0
[03:30:18-142.361] [INFO] [4096] (route_bgp.c:382) route_bgp_init() Route change callback registered
[03:30:18-142.365] [INFO] [4096] (route_bgp.c:385) route_bgp_init() BGP module initialized
[03:30:18-142.368] [INFO] [4096] (utun_instance.c:143) utun_instance_create() BGP module initialized
[03:30:18-142.371] [TRACE] [4] (etcp_connections.c:809) init_connections()
[03:30:18-142.375] [TRACE] [4] (etcp_connections.c:271) etcp_socket_add()
[03:30:18-142.387] [DEBUG] [8192] (socket_compat.c:97) socket_create_udp() Created UDP socket: 6
[03:30:18-142.401] [INFO] [8] (etcp_connections.c:342) etcp_socket_add() [ETCP] Successfully bound socket to local address, family=2
[03:30:18-142.407] [INFO] [4] (etcp_connections.c:364) etcp_socket_add() Registered ETCP socket with uasync
[03:30:18-142.411] [INFO] [8] (etcp_connections.c:366) etcp_socket_add() [ETCP] Socket 0x596ec7b704d0 registered and active
[03:30:18-142.415] [INFO] [4] (etcp_connections.c:837) init_connections() Initialized server test on 127.0.0.1:9011 (links: 0)
[03:30:18-142.418] [DEBUG] [4] (etcp_connections.c:844) init_connections() init_connections called, instance=0x596ec7b6f4e0, config=0x596ec7b6fdb0, clients=(nil), connections_count=0
[03:30:18-142.422] [INFO] [4] (etcp_connections.c:1020) init_connections() Initialized 0 connections
DEBUG: utun_instance_init() calling init_connections() for instance 0x596ec7b6f4e0
[03:30:18-142.427] [TRACE] [4] (etcp_connections.c:809) init_connections()
[03:30:18-142.430] [TRACE] [4] (etcp_connections.c:271) etcp_socket_add()
[03:30:18-142.436] [DEBUG] [8192] (socket_compat.c:97) socket_create_udp() Created UDP socket: 7
[03:30:18-142.443] [ERROR] [8] (etcp_connections.c:329) etcp_socket_add() [ETCP] Failed to bind socket to address family 2: Address already in use
[03:30:18-142.447] [ERROR] [8] (etcp_connections.c:335) etcp_socket_add() [ETCP] Failed to bind to 127.0.0.1:9011
[03:30:18-142.457] [ERROR] [8] (etcp_connections.c:820) init_connections() Failed to create socket for server test
[03:30:18-142.466] [DEBUG] [4] (etcp_connections.c:844) init_connections() init_connections called, instance=0x596ec7b6f4e0, config=0x596ec7b6fdb0, clients=(nil), connections_count=0
[03:30:18-142.470] [INFO] [4] (etcp_connections.c:1020) init_connections() Initialized 0 connections
DEBUG: init_connections() returned: 0
DEBUG: Connections initialized successfully, count=0
[03:30:18-142.475] [INFO] [8] (test_etcp_two_instances.c:280) main() Server instance ready (node_id=1111111111111111)
[03:30:18-142.478] [INFO] [8] (test_etcp_two_instances.c:283) main() Creating client instance...
[CONFIG DEBUG] Opening config file: /tmp/utun_test_ysqaNQ/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_ysqaNQ/client.conf
[CONFIG DEBUG] Successfully opened config file
[03:30:18-142.507] [INFO] [16] (secure_channel.c:174) sc_init_local_keys() sc_init_local_keys: public_key len=128, private_key len=64
[03:30:18-142.531] [INFO] [16] (secure_channel.c:188) sc_init_local_keys() sc_init_local_keys: keys initialized successfully
[03:30:18-142.537] [INFO] [1] (etcp_api.c:39) etcp_bind() etcp_bind: Bound ID 0 to callback 0x596e8f45b110 for instance 0x596ec7b73560
[03:30:18-142.541] [INFO] [512] (routing.c:272) routing_create() Routing module initialized for instance
[03:30:18-142.544] [INFO] [512] (utun_instance.c:91) utun_instance_create() Routing module created
[03:30:18-142.548] [INFO] [256] (utun_instance.c:133) utun_instance_create() TUN initialization disabled - skipping TUN device setup
[03:30:18-142.551] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7b74af0, hash_size=0
[03:30:18-142.554] [INFO] [1] (etcp_api.c:39) etcp_bind() etcp_bind: Bound ID 1 to callback 0x596e8f45a1c0 for instance 0x596ec7b73560
[03:30:18-142.558] [INFO] [4096] (route_bgp.c:382) route_bgp_init() Route change callback registered
[03:30:18-142.561] [INFO] [4096] (route_bgp.c:385) route_bgp_init() BGP module initialized
[03:30:18-142.564] [INFO] [4096] (utun_instance.c:143) utun_instance_create() BGP module initialized
[03:30:18-142.567] [TRACE] [4] (etcp_connections.c:809) init_connections()
[03:30:18-142.570] [TRACE] [4] (etcp_connections.c:271) etcp_socket_add()
[03:30:18-142.577] [DEBUG] [8192] (socket_compat.c:97) socket_create_udp() Created UDP socket: 7
[03:30:18-142.584] [INFO] [8] (etcp_connections.c:342) etcp_socket_add() [ETCP] Successfully bound socket to local address, family=2
[03:30:18-142.589] [INFO] [4] (etcp_connections.c:364) etcp_socket_add() Registered ETCP socket with uasync
[03:30:18-142.593] [INFO] [8] (etcp_connections.c:366) etcp_socket_add() [ETCP] Socket 0x596ec7b74910 registered and active
[03:30:18-142.596] [INFO] [4] (etcp_connections.c:837) init_connections() Initialized server test on 127.0.0.1:9012 (links: 0)
[03:30:18-142.599] [DEBUG] [4] (etcp_connections.c:844) init_connections() init_connections called, instance=0x596ec7b73560, config=0x596ec7b74230, clients=0x596ec7b74710, connections_count=0
[03:30:18-142.603] [INFO] [4] (etcp_connections.c:848) init_connections() Client test_client - keepalive=1, links=0x596ec7b74870, peer_key_len=128
[03:30:18-142.606] [TRACE] [8] (etcp.c:70) etcp_connection_create()
[03:30:18-142.610] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7b6e320, hash_size=0
[03:30:18-142.613] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7b70a80, hash_size=0
[03:30:18-142.621] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7b773d0, hash_size=1024
[03:30:18-142.627] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7b79470, hash_size=1024
[03:30:18-142.637] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7b7b510, hash_size=1024
[03:30:18-142.641] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7b7d5b0, hash_size=0
[03:30:18-142.644] [DEBUG] [8] (pkt_normalizer.c:35) pn_init() pn_init:[6882→????] init 0x596ec7b70eb0, mtu=1500
[03:30:18-142.648] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7b7d640, hash_size=0
[03:30:18-142.651] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7b7d6d0, hash_size=0
[03:30:18-142.655] [DEBUG] [512] (routing.c:297) routing_add_conn() routing_add_conn: deprecated, no action taken
[03:30:18-142.658] [DEBUG] [8] (etcp.c:128) etcp_connection_create() [6882→????] connection initialized. ETCP=0x596ec7b70eb0 mtu=1500, next_tx_id=1
[03:30:18-142.662] [TRACE] [8] (etcp.c:268) etcp_update_log_name()
[03:30:18-142.665] [INFO] [16] (etcp_connections.c:875) init_connections() init_connections: setting peer public key for client test_client
[03:30:18-143.051] [INFO] [16] (etcp_connections.c:880) init_connections() init_connections: successfully set peer public key for client test_client
[03:30:18-143.058] [TRACE] [4] (etcp_connections.c:400) etcp_link_new()
[03:30:18-143.061] [TRACE] [4] (etcp_connections.c:236) etcp_find_free_local_link_id()
[03:30:18-143.065] [TRACE] [4] (etcp_connections.c:142) sockaddr_hash()
[03:30:18-143.069] [TRACE] [4] (etcp_connections.c:186) insert_link()
[03:30:18-143.072] [TRACE] [4] (etcp_connections.c:171) realloc_links()
[03:30:18-143.075] [TRACE] [4] (etcp_connections.c:149) find_link_index()
[03:30:18-143.079] [INFO] [4] (etcp_connections.c:440) etcp_link_new() etcp_link_new: client link, calling etcp_link_send_init
[03:30:18-143.082] [TRACE] [4] (etcp_connections.c:44) etcp_link_send_init()
[03:30:18-143.085] [INFO] [4] (etcp_connections.c:45) etcp_link_send_init() etcp_link_send_init link=0x596ec7b8c850, is_server=0
[03:30:18-143.090] [INFO] [4] (etcp_connections.c:83) etcp_link_send_init() Sending INIT request to link, node_id=2459565876494606882, retry=0
[03:30:18-143.093] [INFO] [8] (etcp_connections.c:90) etcp_link_send_init() [ETCP] INIT sending to 127.0.0.1:9011, link=0x596ec7b8c850
[03:30:18-143.097] [TRACE] [4] (etcp_connections.c:473) etcp_encrypt_send()
[03:30:18-143.100] [TRACE] [8] (etcp.c:53) get_current_timestamp()
[03:30:18-143.103] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:30:18-143.107] [INFO] [8] (etcp_connections.c:487) etcp_encrypt_send() Encrypt start
[03:30:18-143.848] [INFO] [8] (etcp_connections.c:489) etcp_encrypt_send() Encrypt end
[03:30:18-143.879] [INFO] [4] (etcp_connections.c:929) init_connections() Created link 0x596ec7b8c850 for client test_client, socket=0x596ec7b74910
[03:30:18-143.884] [TRACE] [8] (etcp.c:268) etcp_update_log_name()
[03:30:18-143.888] [INFO] [16] (etcp_connections.c:948) init_connections() init_connections: setting peer public key for client test_client
[03:30:18-143.966] [INFO] [16] (etcp_connections.c:953) init_connections() init_connections: successfully set peer public key for client test_client
[03:30:18-143.970] [INFO] [4] (etcp_connections.c:1009) init_connections() Added connection 0x596ec7b70eb0 to instance, total count: 1
[03:30:18-143.973] [INFO] [4] (etcp_connections.c:1020) init_connections() Initialized 1 connections
DEBUG: utun_instance_init() calling init_connections() for instance 0x596ec7b73560
[03:30:18-143.978] [TRACE] [4] (etcp_connections.c:809) init_connections()
[03:30:18-143.981] [TRACE] [4] (etcp_connections.c:271) etcp_socket_add()
[03:30:18-143.990] [DEBUG] [8192] (socket_compat.c:97) socket_create_udp() Created UDP socket: 8
[03:30:18-143.998] [ERROR] [8] (etcp_connections.c:329) etcp_socket_add() [ETCP] Failed to bind socket to address family 2: Address already in use
[03:30:18-144.002] [ERROR] [8] (etcp_connections.c:335) etcp_socket_add() [ETCP] Failed to bind to 127.0.0.1:9012
[03:30:18-144.010] [ERROR] [8] (etcp_connections.c:820) init_connections() Failed to create socket for server test
[03:30:18-144.017] [DEBUG] [4] (etcp_connections.c:844) init_connections() init_connections called, instance=0x596ec7b73560, config=0x596ec7b74230, clients=0x596ec7b74710, connections_count=1
[03:30:18-144.021] [INFO] [4] (etcp_connections.c:848) init_connections() Client test_client - keepalive=1, links=0x596ec7b74870, peer_key_len=128
[03:30:18-144.024] [TRACE] [8] (etcp.c:70) etcp_connection_create()
[03:30:18-144.028] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bbbe20, hash_size=0
[03:30:18-144.031] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bbbeb0, hash_size=0
[03:30:18-144.037] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bbbf40, hash_size=1024
[03:30:18-144.044] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bbb150, hash_size=1024
[03:30:18-144.051] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bbadc0, hash_size=1024
[03:30:18-144.054] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bbb4e0, hash_size=0
[03:30:18-144.058] [DEBUG] [8] (pkt_normalizer.c:35) pn_init() pn_init:[6882→????] init 0x596ec7bbbcb0, mtu=1500
[03:30:18-144.062] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bbb710, hash_size=0
[03:30:18-144.065] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bbb300, hash_size=0
[03:30:18-144.068] [DEBUG] [512] (routing.c:297) routing_add_conn() routing_add_conn: deprecated, no action taken
[03:30:18-144.071] [DEBUG] [8] (etcp.c:128) etcp_connection_create() [6882→????] connection initialized. ETCP=0x596ec7bbbcb0 mtu=1500, next_tx_id=1
[03:30:18-144.075] [TRACE] [8] (etcp.c:268) etcp_update_log_name()
[03:30:18-144.079] [INFO] [16] (etcp_connections.c:875) init_connections() init_connections: setting peer public key for client test_client
[03:30:18-144.150] [INFO] [16] (etcp_connections.c:880) init_connections() init_connections: successfully set peer public key for client test_client
[03:30:18-144.154] [TRACE] [4] (etcp_connections.c:400) etcp_link_new()
[03:30:18-144.157] [TRACE] [4] (etcp_connections.c:236) etcp_find_free_local_link_id()
[03:30:18-144.161] [TRACE] [4] (etcp_connections.c:142) sockaddr_hash()
[03:30:18-144.164] [TRACE] [4] (etcp_connections.c:186) insert_link()
[03:30:18-144.167] [TRACE] [4] (etcp_connections.c:149) find_link_index()
[03:30:18-144.171] [INFO] [4] (etcp_connections.c:440) etcp_link_new() etcp_link_new: client link, calling etcp_link_send_init
[03:30:18-144.174] [TRACE] [4] (etcp_connections.c:44) etcp_link_send_init()
[03:30:18-144.177] [INFO] [4] (etcp_connections.c:45) etcp_link_send_init() etcp_link_send_init link=0x596ec7bc2520, is_server=0
[03:30:18-144.181] [INFO] [4] (etcp_connections.c:83) etcp_link_send_init() Sending INIT request to link, node_id=2459565876494606882, retry=0
[03:30:18-144.185] [INFO] [8] (etcp_connections.c:90) etcp_link_send_init() [ETCP] INIT sending to 127.0.0.1:9011, link=0x596ec7bc2520
[03:30:18-144.188] [TRACE] [4] (etcp_connections.c:473) etcp_encrypt_send()
[03:30:18-144.191] [TRACE] [8] (etcp.c:53) get_current_timestamp()
[03:30:18-144.195] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:30:18-144.198] [INFO] [8] (etcp_connections.c:487) etcp_encrypt_send() Encrypt start
[03:30:18-144.204] [INFO] [8] (etcp_connections.c:489) etcp_encrypt_send() Encrypt end
[03:30:18-144.215] [INFO] [4] (etcp_connections.c:929) init_connections() Created link 0x596ec7bc2520 for client test_client, socket=0x596ec7b74910
[03:30:18-144.218] [TRACE] [8] (etcp.c:268) etcp_update_log_name()
[03:30:18-144.222] [INFO] [16] (etcp_connections.c:948) init_connections() init_connections: setting peer public key for client test_client
[03:30:18-144.343] [INFO] [16] (etcp_connections.c:953) init_connections() init_connections: successfully set peer public key for client test_client
[03:30:18-144.351] [INFO] [4] (etcp_connections.c:1009) init_connections() Added connection 0x596ec7bbbcb0 to instance, total count: 2
[03:30:18-144.354] [INFO] [4] (etcp_connections.c:1020) init_connections() Initialized 2 connections
DEBUG: init_connections() returned: 0
DEBUG: Connections initialized successfully, count=2
[03:30:18-144.364] [INFO] [8] (test_etcp_two_instances.c:306) main() Client instance ready (node_id=2222222222222222)
[03:30:18-144.369] [INFO] [8] (test_etcp_two_instances.c:315) main() [TEST] Client socket bound to port 9012 (expected NAT port)
[03:30:18-144.372] [INFO] [8] (test_etcp_two_instances.c:321) main() Starting connection monitoring...
[03:30:18-144.375] [INFO] [8] (test_etcp_two_instances.c:326) main() Running event loop...
[03:30:18-144.378] [INFO] [8] (test_etcp_two_instances.c:329) main() Waiting 0.5 seconds for server initialization...
[03:30:18-144.381] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-144.386] [TRACE] [4] (etcp_connections.c:529) etcp_connections_read_callback_socket()
[03:30:18-144.392] [TRACE] [4] (etcp_connections.c:226) etcp_link_find_by_addr()
[03:30:18-144.395] [TRACE] [4] (etcp_connections.c:142) sockaddr_hash()
[03:30:18-144.398] [TRACE] [4] (etcp_connections.c:149) find_link_index()
[03:30:18-144.472] [TRACE] [8] (etcp.c:70) etcp_connection_create()
[03:30:18-144.476] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bc2e80, hash_size=0
[03:30:18-144.479] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bc2f10, hash_size=0
[03:30:18-144.487] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bc2fa0, hash_size=1024
[03:30:18-144.497] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bbb9f0, hash_size=1024
[03:30:18-144.504] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bc2400, hash_size=1024
[03:30:18-144.507] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bbb390, hash_size=0
[03:30:18-144.511] [DEBUG] [8] (pkt_normalizer.c:35) pn_init() pn_init:[3441→????] init 0x596ec7bc2d10, mtu=1500
[03:30:18-144.514] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bc2120, hash_size=0
[03:30:18-144.518] [DEBUG] [2] (ll_queue.c:37) queue_new() queue_new: created queue 0x596ec7bc21b0, hash_size=0
[03:30:18-144.521] [DEBUG] [512] (routing.c:297) routing_add_conn() routing_add_conn: deprecated, no action taken
[03:30:18-144.524] [DEBUG] [8] (etcp.c:128) etcp_connection_create() [3441→????] connection initialized. ETCP=0x596ec7bc2d10 mtu=1500, next_tx_id=1
[03:30:18-144.527] [TRACE] [8] (etcp.c:268) etcp_update_log_name()
[03:30:18-144.531] [DEBUG] [4] (etcp_connections.c:626) etcp_connections_read_callback_socket() New connection from 127.0.0.1:9012 peer_id=2459565876494606882 etcp=0x596ec7bc2d10
[03:30:18-144.535] [INFO] [4] (etcp_connections.c:631) etcp_connections_read_callback_socket() Added incoming connection 0x596ec7bc2d10 to instance, total count: 1
[03:30:18-144.538] [TRACE] [4] (etcp_connections.c:400) etcp_link_new()
[03:30:18-144.542] [TRACE] [4] (etcp_connections.c:236) etcp_find_free_local_link_id()
[03:30:18-144.545] [TRACE] [4] (etcp_connections.c:142) sockaddr_hash()
[03:30:18-144.548] [TRACE] [4] (etcp_connections.c:186) insert_link()
[03:30:18-144.551] [TRACE] [4] (etcp_connections.c:171) realloc_links()
[03:30:18-144.554] [TRACE] [4] (etcp_connections.c:149) find_link_index()
[03:30:18-144.557] [TRACE] [8] (etcp.c:258) etcp_conn_reset()
[03:30:18-144.561] [DEBUG] [4] (etcp_connections.c:670) etcp_connections_read_callback_socket() Sending INIT RESPONSE, link=0x596ec7bc9060, local_link_id=0, remote_link_id=0
[03:30:18-144.564] [INFO] [8] (etcp_connections.c:671) etcp_connections_read_callback_socket() [ETCP DEBUG] Send INIT RESPONSE
[03:30:18-144.567] [TRACE] [4] (etcp_connections.c:473) etcp_encrypt_send()
[03:30:18-144.572] [TRACE] [8] (etcp.c:53) get_current_timestamp()
[03:30:18-144.575] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:30:18-144.579] [INFO] [8] (etcp_connections.c:487) etcp_encrypt_send() Encrypt start
[03:30:18-144.584] [INFO] [8] (etcp_connections.c:489) etcp_encrypt_send() Encrypt end
[03:30:18-144.598] [INFO] [8] (etcp_loadbalancer.c:156) loadbalancer_link_ready() loadbalancer_link_ready: link=0x596ec7bc9060 now ready, notifying ETCP_CONN
[03:30:18-144.602] [TRACE] [8] (etcp.c:637) etcp_link_ready_callback()
[03:30:18-144.605] [TRACE] [8] (etcp.c:645) etcp_conn_process_send_queue()
[03:30:18-144.608] [TRACE] [8] (etcp.c:535) etcp_request_pkt()
[03:30:18-144.611] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:30:18-144.615] [TRACE] [8] (etcp.c:342) input_queue_try_resume()
[03:30:18-144.618] [DEBUG] [8] (etcp.c:350) input_queue_try_resume() [3441→6882] resume callbacks: inflight_bytes=0, input_len=0
[03:30:18-144.622] [INFO] [4096] (route_bgp.c:452) route_bgp_new_conn() Added connection 0x596ec7bc2d10 to senders_list
[03:30:18-144.625] [INFO] [4096] (route_bgp.c:338) route_bgp_send_table_to_conn_internal() Sending full routing table (0 routes) to connection
[03:30:18-144.629] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-144.633] [TRACE] [4] (etcp_connections.c:529) etcp_connections_read_callback_socket()
[03:30:18-144.637] [TRACE] [4] (etcp_connections.c:226) etcp_link_find_by_addr()
[03:30:18-144.640] [TRACE] [4] (etcp_connections.c:142) sockaddr_hash()
[03:30:18-144.644] [TRACE] [4] (etcp_connections.c:149) find_link_index()
[03:30:18-144.647] [INFO] [8] (etcp_connections.c:687) etcp_connections_read_callback_socket() Decrypt start
[03:30:18-144.655] [ERROR] [16] (etcp_connections.c:689) etcp_connections_read_callback_socket() etcp_connections_read_callback: failed to decrypt packet from node 1229782938247303441 len=105
[03:30:18-144.659] [ERROR] [8] (etcp_connections.c:801) etcp_connections_read_callback_socket() etcp_connections_read_callback: error 6
[03:30:18-144.662] [TRACE] [4] (etcp_connections.c:529) etcp_connections_read_callback_socket()
[03:30:18-144.666] [TRACE] [4] (etcp_connections.c:226) etcp_link_find_by_addr()
[03:30:18-144.670] [TRACE] [4] (etcp_connections.c:142) sockaddr_hash()
[03:30:18-144.673] [TRACE] [4] (etcp_connections.c:149) find_link_index()
[03:30:18-144.676] [INFO] [8] (etcp_connections.c:687) etcp_connections_read_callback_socket() Decrypt start
[03:30:18-144.680] [INFO] [8] (etcp_connections.c:696) etcp_connections_read_callback_socket() Decrypt end
[03:30:18-144.683] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:30:18-144.696] [TRACE] [8] (etcp.c:258) etcp_conn_reset()
[03:30:18-144.701] [INFO] [4] (etcp_connections.c:736) etcp_connections_read_callback_socket() [6882→0001] NAT address initialized: 127.0.0.1:9012
[03:30:18-144.705] [TRACE] [8] (etcp.c:268) etcp_update_log_name()
[03:30:18-144.708] [INFO] [8] (etcp_loadbalancer.c:156) loadbalancer_link_ready() loadbalancer_link_ready: link=0x596ec7b8c850 now ready, notifying ETCP_CONN
[03:30:18-144.711] [TRACE] [8] (etcp.c:637) etcp_link_ready_callback()
[03:30:18-144.715] [TRACE] [8] (etcp.c:645) etcp_conn_process_send_queue()
[03:30:18-144.718] [TRACE] [8] (etcp.c:535) etcp_request_pkt()
[03:30:18-144.721] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:30:18-144.724] [TRACE] [8] (etcp.c:342) input_queue_try_resume()
[03:30:18-144.727] [DEBUG] [8] (etcp.c:350) input_queue_try_resume() [6882→3441] resume callbacks: inflight_bytes=0, input_len=0
[03:30:18-144.731] [INFO] [4096] (route_bgp.c:452) route_bgp_new_conn() Added connection 0x596ec7b70eb0 to senders_list
[03:30:18-144.734] [INFO] [4096] (route_bgp.c:338) route_bgp_send_table_to_conn_internal() Sending full routing table (0 routes) to connection
[03:30:18-144.737] [INFO] [4] (etcp_connections.c:783) 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:30:18-144.741] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-145.806] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-146.876] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-147.946] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-149.034] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-150.116] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-151.183] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-152.251] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-153.313] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-154.391] [INFO] [8] (test_etcp_two_instances.c:129) monitor_connections() [SERVER] Link: peer=2222222222222222 initialized=1 type=server
[03:30:18-154.401] [INFO] [8] (test_etcp_two_instances.c:147) monitor_connections() [CLIENT] Link: peer=1 initialized=0 timer=active retry=1
[03:30:18-154.406] [INFO] [8] (test_etcp_two_instances.c:147) monitor_connections() [CLIENT] Link: peer=1111111111111111 initialized=1 timer=null retry=1
[03:30:18-154.411] [INFO] [8] (test_etcp_two_instances.c:156) monitor_connections() [CLIENT] Checking NAT fields...
[03:30:18-154.416] [INFO] [8] (test_etcp_two_instances.c:174) monitor_connections() [CLIENT] PASS: NAT address is set: 127.0.0.1:9012
[03:30:18-154.420] [INFO] [8] (test_etcp_two_instances.c:176) monitor_connections() [CLIENT] PASS: nat_changes_count=0, nat_hits_count=0
[03:30:18-154.424] [INFO] [8] (test_etcp_two_instances.c:196) monitor_connections() [CLIENT] PASS: NAT IP and port match exactly (127.0.0.1:9012)
[03:30:18-154.428] [INFO] [8] (test_etcp_two_instances.c:208) monitor_connections()
=== SUCCESS: Client connection established! ===
[03:30:18-154.432] [INFO] [8] (test_etcp_two_instances.c:212) monitor_connections() [TEST] Cancelling test timeout for immediate exit
[03:30:18-154.436] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-155.505] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-156.579] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-157.652] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-158.723] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-159.797] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-160.870] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-161.947] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-163.089] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-164.168] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-165.254] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-166.299] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-167.596] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-168.668] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-169.738] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-170.813] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-171.886] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-172.958] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-176.297] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-177.371] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-178.438] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-179.504] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-180.571] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-181.640] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-182.711] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-183.784] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-184.853] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-185.922] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-186.989] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-188.059] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-189.127] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-190.194] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-191.262] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-192.299] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-193.370] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-194.440] [TRACE] [4] (etcp_connections.c:112) etcp_link_init_timer_cbk()
[03:30:18-194.451] [TRACE] [4] (etcp_connections.c:44) etcp_link_send_init()
[03:30:18-194.465] [INFO] [4] (etcp_connections.c:45) etcp_link_send_init() etcp_link_send_init link=0x596ec7bc2520, is_server=0
[03:30:18-194.471] [INFO] [4] (etcp_connections.c:83) etcp_link_send_init() Sending INIT request to link, node_id=2459565876494606882, retry=1
[03:30:18-194.476] [INFO] [8] (etcp_connections.c:90) etcp_link_send_init() [ETCP] INIT sending to 127.0.0.1:9011, link=0x596ec7bc2520
[03:30:18-194.479] [TRACE] [4] (etcp_connections.c:473) etcp_encrypt_send()
[03:30:18-194.484] [TRACE] [8] (etcp.c:53) get_current_timestamp()
[03:30:18-194.487] [TRACE] [8] (etcp.c:43) get_current_time_units()
[03:30:18-194.491] [INFO] [8] (etcp_connections.c:487) etcp_encrypt_send() Encrypt start
[03:30:18-194.521] [INFO] [8] (etcp_connections.c:489) etcp_encrypt_send() Encrypt end
[03:30:18-194.556] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-194.562] [TRACE] [4] (etcp_connections.c:529) etcp_connections_read_callback_socket()
[03:30:18-194.568] [TRACE] [4] (etcp_connections.c:226) etcp_link_find_by_addr()
[03:30:18-194.571] [TRACE] [4] (etcp_connections.c:142) sockaddr_hash()
[03:30:18-194.575] [TRACE] [4] (etcp_connections.c:149) find_link_index()
[03:30:18-194.578] [INFO] [8] (etcp_connections.c:687) etcp_connections_read_callback_socket() Decrypt start
[03:30:18-194.585] [ERROR] [16] (etcp_connections.c:689) etcp_connections_read_callback_socket() etcp_connections_read_callback: failed to decrypt packet from node 1229782938247303441 len=105
[03:30:18-194.589] [ERROR] [8] (etcp_connections.c:801) etcp_connections_read_callback_socket() etcp_connections_read_callback: error 6
[03:30:18-194.593] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-195.656] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-196.724] [DEBUG] [1024] (u_async.c:684) uasync_poll() poll
[03:30:18-197.802] [INFO] [8] (test_etcp_two_instances.c:333) main() Starting connection attempts...
[03:30:18-197.812] [INFO] [8] (test_etcp_two_instances.c:350) main()
Cleaning up...
[03:30:18-197.816] [INFO] [8] (test_etcp_two_instances.c:351) main() [CLEANUP] ua=0x596ec7b6d4c0
[03:30:18-197.819] [INFO] [8] (test_etcp_two_instances.c:352) main() [CLEANUP] server_instance=0x596ec7b6f4e0, client_instance=0x596ec7b73560
[03:30:18-197.866] [INFO] [8] (test_etcp_two_instances.c:353) main() [CLEANUP] monitor_timeout_id=0x596ec7bc2300, test_timeout_id=(nil)
[03:30:18-197.870] [INFO] [8] (test_etcp_two_instances.c:357) main() [CLEANUP] Canceling monitor timeout on valid uasync
[03:30:18-197.873] [DEBUG] [1024] (u_async.c:426) uasync_cancel_timeout() uasync_cancel_timeout: not found in heap: ua=0x596ec7b6d4c0, t_id=0x596ec7bc2300, node=0x596ec7bc2300, expires=1771115418154 ms
[03:30:18-197.877] [INFO] [8] (test_etcp_two_instances.c:366) main() [CLEANUP] Timeouts canceled
[03:30:18-197.881] [INFO] [8] (test_etcp_two_instances.c:370) main() [CLEANUP] Shared uasync resources before destroy:
🔍 SHARED: UASYNC Resource Report for 0x596ec7b6d4c0
Timer Statistics: allocated=5, freed=3, active=2
Socket Statistics: allocated=2, freed=0, active=2
Timer: node=0x596ec7bbae80, expires=1771115418244 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:30:18-197.886] [INFO] [8] (test_etcp_two_instances.c:377) main() [CLEANUP] Destroying server instance 0x596ec7b6f4e0
[03:30:18-197.890] [INFO] [32] (utun_instance.c:153) utun_instance_destroy() [INSTANCE_DESTROY] Starting cleanup for instance 0x596ec7b6f4e0
🔍 [UTUN_INSTANCE LEAK DIAGNOSIS] Phase: BEFORE_CLEANUP
Instance: 0x596ec7b6f4e0
Node ID: 1229782938247303441
UA instance: 0x596ec7b6d4c0
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: 0x596ec7bc2d10
ETCP Sockets list: 0x596ec7b704d0
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:30:18-197.897] [INFO] [32] (utun_instance.c:162) utun_instance_destroy() [INSTANCE_DESTROY] Cleaning up ETCP sockets and connections
[03:30:18-197.909] [INFO] [32] (utun_instance.c:166) utun_instance_destroy() [INSTANCE_DESTROY] Removing socket 0x596ec7b704d0, fd=6
[03:30:18-197.912] [TRACE] [4] (etcp_connections.c:372) etcp_socket_remove()
[03:30:18-197.916] [INFO] [8] (etcp_connections.c:375) etcp_socket_remove() [ETCP] Removing socket 0x596ec7b704d0, socket_id=0x596ec7b6d570
[03:30:18-197.919] [INFO] [8] (etcp_connections.c:379) etcp_socket_remove() [ETCP] Removing socket from uasync, instance=0x596ec7b6f4e0, ua=0x596ec7b6d4c0
[03:30:18-197.925] [INFO] [8] (etcp_connections.c:382) etcp_socket_remove() [ETCP] Unregistered socket from uasync
[03:30:18-197.934] [INFO] [8] (etcp_connections.c:387) etcp_socket_remove() [ETCP] Closed socket
[03:30:18-197.937] [TRACE] [4] (etcp_connections.c:448) etcp_link_close()
[03:30:18-197.940] [TRACE] [4] (etcp_connections.c:210) remove_link()
[03:30:18-197.976] [TRACE] [4] (etcp_connections.c:149) find_link_index()
[03:30:18-197.980] [INFO] [32] (utun_instance.c:171) utun_instance_destroy() [INSTANCE_DESTROY] ETCP sockets cleanup complete
[03:30:18-197.983] [INFO] [32] (utun_instance.c:177) utun_instance_destroy() [INSTANCE_DESTROY] Closing connection 0x596ec7bc2d10
[03:30:18-197.986] [TRACE] [8] (etcp.c:136) etcp_connection_close()
[03:30:18-197.989] [DEBUG] [512] (routing.c:304) routing_del_conn() routing_del_conn: deprecated, no action taken
[03:30:18-197.993] [INFO] [4096] (route_bgp.c:471) route_bgp_remove_conn() Removing connection 0x596ec7bc2d10 from senders_list
[03:30:18-197.996] [INFO] [4096] (route_bgp.c:200) route_bgp_send_withdraw_for_conn() Sending withdraw for routes via conn 0x596ec7bc2d10 to all peers
[03:30:18-198.000] [INFO] [4096] (route_bgp.c:484) route_bgp_remove_conn() Connection 0x596ec7bc2d10 removed from senders_list
[03:30:18-198.004] [INFO] [512] (route_lib.c:425) route_table_delete() Removed 0 routes for connection 0x596ec7bc2d10
[03:30:18-198.008] [DEBUG] [512] (routing.c:304) routing_del_conn() routing_del_conn: deprecated, no action taken
[03:30:18-198.011] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bc2120, head=(nil), tail=(nil), count=0
[03:30:18-198.015] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bc21b0, head=(nil), tail=(nil), count=0
[03:30:18-198.019] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bc2e80, head=(nil), tail=(nil), count=0
[03:30:18-198.022] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bc2f10, head=(nil), tail=(nil), count=0
[03:30:18-198.025] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bc2fa0, head=(nil), tail=(nil), count=0
[03:30:18-198.029] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bbb9f0, head=(nil), tail=(nil), count=0
[03:30:18-198.032] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bbb390, head=(nil), tail=(nil), count=0
[03:30:18-198.036] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bc2400, head=(nil), tail=(nil), count=0
[03:30:18-198.039] [INFO] [32] (utun_instance.c:184) utun_instance_destroy() [INSTANCE_DESTROY] ETCP connections cleanup complete
[03:30:18-198.043] [INFO] [512] (routing.c:281) routing_destroy() Destroying routing module
[03:30:18-198.046] [INFO] [1] (etcp_api.c:62) etcp_unbind() etcp_unbind: Unbound ID 0 for instance 0x596ec7b6f4e0
[03:30:18-198.050] [INFO] [4096] (utun_instance.c:198) utun_instance_destroy() Destroying BGP module
[03:30:18-198.053] [INFO] [1] (etcp_api.c:62) etcp_unbind() etcp_unbind: Unbound ID 1 for instance 0x596ec7b6f4e0
[03:30:18-198.060] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7b70830, head=(nil), tail=(nil), count=0
[03:30:18-198.063] [INFO] [4096] (route_bgp.c:418) route_bgp_destroy() BGP module destroyed
[03:30:18-198.067] [INFO] [32] (utun_instance.c:205) utun_instance_destroy() [INSTANCE_DESTROY] Freeing configuration
[03:30:18-198.070] [INFO] [32] (utun_instance.c:212) utun_instance_destroy() [INSTANCE_DESTROY] Destroying packet pool
[03:30:18-198.074] [INFO] [32] (utun_instance.c:219) utun_instance_destroy() [INSTANCE_DESTROY] Destroying ack pool
[03:30:18-198.077] [INFO] [32] (utun_instance.c:226) utun_instance_destroy() [INSTANCE_DESTROY] Destroying data pool
[03:30:18-198.080] [INFO] [32] (utun_instance.c:241) utun_instance_destroy() [INSTANCE_DESTROY] Freeing instance memory
[03:30:18-198.083] [INFO] [32] (utun_instance.c:243) utun_instance_destroy() [INSTANCE_DESTROY] Instance destroyed completely
[03:30:18-198.087] [INFO] [8] (test_etcp_two_instances.c:382) main() [CLEANUP] Destroying client instance 0x596ec7b73560
[03:30:18-198.090] [INFO] [32] (utun_instance.c:153) utun_instance_destroy() [INSTANCE_DESTROY] Starting cleanup for instance 0x596ec7b73560
🔍 [UTUN_INSTANCE LEAK DIAGNOSIS] Phase: BEFORE_CLEANUP
Instance: 0x596ec7b73560
Node ID: 2459565876494606882
UA instance: 0x596ec7b6d4c0
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: 0x596ec7bbbcb0
ETCP Sockets list: 0x596ec7b74910
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:30:18-198.095] [INFO] [32] (utun_instance.c:162) utun_instance_destroy() [INSTANCE_DESTROY] Cleaning up ETCP sockets and connections
[03:30:18-198.098] [INFO] [32] (utun_instance.c:166) utun_instance_destroy() [INSTANCE_DESTROY] Removing socket 0x596ec7b74910, fd=7
[03:30:18-198.101] [TRACE] [4] (etcp_connections.c:372) etcp_socket_remove()
[03:30:18-198.105] [INFO] [8] (etcp_connections.c:375) etcp_socket_remove() [ETCP] Removing socket 0x596ec7b74910, socket_id=0x596ec7b6d5b8
[03:30:18-198.108] [INFO] [8] (etcp_connections.c:379) etcp_socket_remove() [ETCP] Removing socket from uasync, instance=0x596ec7b73560, ua=0x596ec7b6d4c0
[03:30:18-198.112] [INFO] [8] (etcp_connections.c:382) etcp_socket_remove() [ETCP] Unregistered socket from uasync
[03:30:18-198.119] [INFO] [8] (etcp_connections.c:387) etcp_socket_remove() [ETCP] Closed socket
[03:30:18-198.122] [TRACE] [4] (etcp_connections.c:448) etcp_link_close()
[03:30:18-198.125] [TRACE] [4] (etcp_connections.c:210) remove_link()
[03:30:18-198.128] [TRACE] [4] (etcp_connections.c:149) find_link_index()
[03:30:18-198.131] [INFO] [32] (utun_instance.c:171) utun_instance_destroy() [INSTANCE_DESTROY] ETCP sockets cleanup complete
[03:30:18-198.134] [INFO] [32] (utun_instance.c:177) utun_instance_destroy() [INSTANCE_DESTROY] Closing connection 0x596ec7bbbcb0
[03:30:18-198.137] [TRACE] [8] (etcp.c:136) etcp_connection_close()
[03:30:18-198.140] [DEBUG] [512] (routing.c:304) routing_del_conn() routing_del_conn: deprecated, no action taken
[03:30:18-198.144] [INFO] [4096] (route_bgp.c:471) route_bgp_remove_conn() Removing connection 0x596ec7bbbcb0 from senders_list
[03:30:18-198.147] [INFO] [4096] (route_bgp.c:200) route_bgp_send_withdraw_for_conn() Sending withdraw for routes via conn 0x596ec7bbbcb0 to all peers
[03:30:18-198.150] [INFO] [512] (route_lib.c:425) route_table_delete() Removed 0 routes for connection 0x596ec7bbbcb0
[03:30:18-198.153] [DEBUG] [512] (routing.c:304) routing_del_conn() routing_del_conn: deprecated, no action taken
[03:30:18-198.157] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bbb710, head=(nil), tail=(nil), count=0
[03:30:18-198.162] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bbb300, head=(nil), tail=(nil), count=0
[03:30:18-198.166] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bbbe20, head=(nil), tail=(nil), count=0
[03:30:18-198.169] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bbbeb0, head=(nil), tail=(nil), count=0
[03:30:18-198.173] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bbbf40, head=(nil), tail=(nil), count=0
[03:30:18-198.182] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bbb150, head=(nil), tail=(nil), count=0
[03:30:18-198.185] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bbb4e0, head=(nil), tail=(nil), count=0
[03:30:18-198.189] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7bbadc0, head=(nil), tail=(nil), count=0
[03:30:18-198.192] [TRACE] [4] (etcp_connections.c:448) etcp_link_close()
[03:30:18-198.195] [TRACE] [4] (etcp_connections.c:210) remove_link()
[03:30:18-198.198] [INFO] [32] (utun_instance.c:177) utun_instance_destroy() [INSTANCE_DESTROY] Closing connection 0x596ec7b70eb0
[03:30:18-198.202] [TRACE] [8] (etcp.c:136) etcp_connection_close()
[03:30:18-198.205] [DEBUG] [512] (routing.c:304) routing_del_conn() routing_del_conn: deprecated, no action taken
[03:30:18-198.208] [INFO] [4096] (route_bgp.c:471) route_bgp_remove_conn() Removing connection 0x596ec7b70eb0 from senders_list
[03:30:18-198.211] [INFO] [4096] (route_bgp.c:200) route_bgp_send_withdraw_for_conn() Sending withdraw for routes via conn 0x596ec7b70eb0 to all peers
[03:30:18-198.214] [INFO] [4096] (route_bgp.c:484) route_bgp_remove_conn() Connection 0x596ec7b70eb0 removed from senders_list
[03:30:18-198.217] [INFO] [512] (route_lib.c:425) route_table_delete() Removed 0 routes for connection 0x596ec7b70eb0
[03:30:18-198.221] [DEBUG] [512] (routing.c:304) routing_del_conn() routing_del_conn: deprecated, no action taken
[03:30:18-198.224] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7b7d640, head=(nil), tail=(nil), count=0
[03:30:18-198.227] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7b7d6d0, head=(nil), tail=(nil), count=0
[03:30:18-198.231] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7b6e320, head=(nil), tail=(nil), count=0
[03:30:18-198.234] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7b70a80, head=(nil), tail=(nil), count=0
[03:30:18-198.237] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7b773d0, head=(nil), tail=(nil), count=0
[03:30:18-198.241] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7b79470, head=(nil), tail=(nil), count=0
[03:30:18-198.244] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7b7d5b0, head=(nil), tail=(nil), count=0
[03:30:18-198.247] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7b7b510, head=(nil), tail=(nil), count=0
[03:30:18-198.251] [INFO] [32] (utun_instance.c:184) utun_instance_destroy() [INSTANCE_DESTROY] ETCP connections cleanup complete
[03:30:18-198.254] [INFO] [512] (routing.c:281) routing_destroy() Destroying routing module
[03:30:18-198.257] [INFO] [1] (etcp_api.c:62) etcp_unbind() etcp_unbind: Unbound ID 0 for instance 0x596ec7b73560
[03:30:18-198.261] [INFO] [4096] (utun_instance.c:198) utun_instance_destroy() Destroying BGP module
[03:30:18-198.264] [INFO] [1] (etcp_api.c:62) etcp_unbind() etcp_unbind: Unbound ID 1 for instance 0x596ec7b73560
[03:30:18-198.267] [DEBUG] [2] (ll_queue.c:62) queue_free() queue_free: freeing queue 0x596ec7b74af0, head=(nil), tail=(nil), count=0
[03:30:18-198.270] [INFO] [4096] (route_bgp.c:418) route_bgp_destroy() BGP module destroyed
[03:30:18-198.273] [INFO] [32] (utun_instance.c:205) utun_instance_destroy() [INSTANCE_DESTROY] Freeing configuration
[03:30:18-198.279] [INFO] [32] (utun_instance.c:212) utun_instance_destroy() [INSTANCE_DESTROY] Destroying packet pool
[03:30:18-198.303] [INFO] [32] (utun_instance.c:219) utun_instance_destroy() [INSTANCE_DESTROY] Destroying ack pool
[03:30:18-198.622] [INFO] [32] (utun_instance.c:226) utun_instance_destroy() [INSTANCE_DESTROY] Destroying data pool
[03:30:18-198.626] [INFO] [32] (utun_instance.c:241) utun_instance_destroy() [INSTANCE_DESTROY] Freeing instance memory
[03:30:18-198.630] [INFO] [32] (utun_instance.c:243) utun_instance_destroy() [INSTANCE_DESTROY] Instance destroyed completely
[03:30:18-198.633] [DEBUG] [1024] (u_async.c:1000) uasync_destroy() uasync_destroy: starting cleanup for ua=0x596ec7b6d4c0
🔍 BEFORE_DESTROY: UASYNC Resource Report for 0x596ec7b6d4c0
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:30:18-198.637] [ERROR] [32] (u_async.c:1007) uasync_destroy() Memory leaks detected before cleanup: timers 5/3, sockets 2/2
[03:30:18-198.641] [ERROR] [1024] (u_async.c:1009) uasync_destroy() Timer leak: allocated=5, freed=3, diff=2
[03:30:18-198.644] [ERROR] [1024] (u_async.c:1012) uasync_destroy() Socket leak: allocated=2, freed=2, diff=0
[03:30:18-198.647] [DEBUG] [32] (u_async.c:1048) uasync_destroy() Freed 0 socket nodes in destroy
[03:30:18-198.660] [DEBUG] [1024] (u_async.c:1081) uasync_destroy() uasync_destroy: completed successfully for ua=0x596ec7b6d4c0
[03:30:18-198.664] [INFO] [8192] (socket_compat.c:60) socket_platform_cleanup() POSIX socket cleanup completed
[03:30:18-198.904] [INFO] [8] (test_etcp_two_instances.c:396) main()
=== TEST PASSED ===