=== PKT Normalizer + ETCP Test === Testing with 100 packets of random sizes (10-2000 bytes) Total data to transfer: 104431 bytes (1.02 KB average per packet) Creating server... [CONFIG DEBUG] Opening config file: /tmp/utun_test_5DpiUN/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_5DpiUN/server.conf [CONFIG DEBUG] Successfully opened config file Server created, waiting for connection... Creating client... [CONFIG DEBUG] Opening config file: /tmp/utun_test_5DpiUN/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_5DpiUN/client.conf [CONFIG DEBUG] Successfully opened config file Client created Sending 100 packets in each direction via normalizer... Connection check: client=1, server=1 Connections: client=0x5b22583e4290, server=0x5b22584292d0 DEBUG: client_pn=(nil), client_instance->connections=0x5b22583e4290 Creating client normalizer... Client normalizer created (frag_size=1400) DEBUG: server_pn=(nil), server_instance->connections=0x5b22584292d0 Creating server normalizer... Server normalizer created (frag_size=1400) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=0/100 Starting forward transfer (client -> server) via normalizer... DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) DEBUG send_packets_fwd: client_instance=0x5b22583e0420, client_pn=0x5b2258428250, packets_sent_fwd=100/100 DEBUG send_packets_fwd: early return (instance=0x5b22583e0420, pn=0x5b2258428250, sent=100) Forward transfer completed: 100/100 packets in 22.74 ms Starting backward transfer (server -> client) via normalizer... DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 DEBUG check_received_packets_back: client_instance=0x5b22583e0420, client_pn=0x5b2258428250 Backward transfer completed: 100/100 packets in 27.06 ms === SUCCESS: Bidirectional transfer via normalizer completed! === Forward (client->server): 100/100 packets in 22.74 ms Backward (server->client): 100/100 packets in 27.06 ms Total time: 50.86 ms Cleaning up... 🔍 [UTUN_INSTANCE LEAK DIAGNOSIS] Phase: BEFORE_CLEANUP Instance: 0x5b22583dbc90 Node ID: 1229782938247303441 UA instance: 0x5b22583db490 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: 0x5b22584292d0 ETCP Sockets list: 0x5b22583dd330 ⚠️ 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 🔍 [UTUN_INSTANCE LEAK DIAGNOSIS] Phase: BEFORE_CLEANUP Instance: 0x5b22583e0420 Node ID: 2459565876494606882 UA instance: 0x5b22583db490 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: 0x5b22583e4290 ETCP Sockets list: 0x5b22583e17d0 ⚠️ 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 🔍 BEFORE_DESTROY: UASYNC Resource Report for 0x5b22583db490 Timer Statistics: allocated=331, freed=310, active=21 Socket Statistics: allocated=2, freed=2, active=0 Timer: node=0x5b2258429240, expires=1771115418489 ms, cancelled=0 Timer: node=0x5b225844be20, expires=1771115418494 ms, cancelled=0 Timer: node=0x5b2258428940, expires=1771115418492 ms, cancelled=0 Timer: node=0x5b2258442020, expires=1771115418498 ms, cancelled=0 Timer: node=0x5b2258429210, expires=1771115418502 ms, cancelled=0 Timer: node=0x5b2258404e40, expires=1771115418506 ms, cancelled=0 Timer: node=0x5b2258448a10, expires=1771115418496 ms, cancelled=0 Timer: node=0x5b2258438e60, expires=1771115418518 ms, cancelled=0 Timer: node=0x5b2258427fa0, expires=1771115418504 ms, cancelled=0 Timer: node=0x5b225843c0c0, expires=1771115418508 ms, cancelled=0 Timer: node=0x5b2258429150, expires=1771115418513 ms, cancelled=0 Timer: node=0x5b225844bbd0, expires=1771115418533 ms, cancelled=0 Timer: node=0x5b2258427d60, expires=1771115418536 ms, cancelled=0 Timer: node=0x5b2258444600, expires=1771115418500 ms, cancelled=0 Timer: node=0x5b225843bf20, expires=1771115418516 ms, cancelled=0 Timer: node=0x5b22584284a0, expires=1771115418520 ms, cancelled=0 Timer: node=0x5b22584280c0, expires=1771115418524 ms, cancelled=0 Timer: node=0x5b22584501f0, expires=1771115418526 ms, cancelled=0 Timer: node=0x5b2258439780, expires=1771115418530 ms, cancelled=0 Timer: node=0x5b225843be00, expires=1771115418528 ms, cancelled=0 Active timers in heap: 20 Socket array capacity: 16, active: 0 Total active sockets: 0 🔚 BEFORE_DESTROY: End of resource report [03:30:18-439.537] [ERROR] [32] (u_async.c:1007) uasync_destroy() Memory leaks detected before cleanup: timers 331/310, sockets 2/2 [03:30:18-439.592] [ERROR] [1024] (u_async.c:1009) uasync_destroy() Timer leak: allocated=331, freed=310, diff=21 [03:30:18-439.597] [ERROR] [1024] (u_async.c:1012) uasync_destroy() Socket leak: allocated=2, freed=2, diff=0 === TEST PASSED === All 100 packets transmitted in each direction via normalizer