openziti / ziti-tunnel-sdk-c

Apache License 2.0
43 stars 16 forks source link

ziti-edge-tunnel segfault #394

Closed qrkourier closed 2 years ago

qrkourier commented 2 years ago

video intro to debug setup in https://youtu.be/S88hR-RHMO8

kbingham@mira:~$ sudo /usr/bin/valgrind.bin --log-file=/tmp/ziti-edge-tunnel-0.18.10.valgrind --verbose /opt/openziti/bin/ziti-edge-tunnel run --verbose 4 --dns-ip-range=100.112.0.0/12 --identity-dir=/opt/openziti/etc/identities &> /tmp/ziti-edge-tunnel-0.18.10.log
Segmentation fault

ZET log

[        0.000]    INFO ziti_log_set_level set log level: ziti_log_lvl=2 &ziti_log_lvl = 0x20b350
Error: Invalid prefix for given prefix length.
[        0.000]   ERROR ziti-edge-tunnel:utils.c:30 run_command_va() cmd{ip route add 100.64.0.1/10 dev tun0} failed: 512/17/File exists

[        0.220]    INFO ziti_log_set_level set log level: ziti_log_lvl=2 &ziti_log_lvl = 0x20b350
[        2.194]   ERROR ziti-sdk:channel.c:240 check_connecting_state() ch[0] state check: timer not active!
[        3.179]   ERROR tunnel-sdk:tunnel_tcp.c:170 on_tcp_client_err() client=tcp:192.168.0.116:41334 err=-14, terminating connection
[        3.181]   ERROR tunnel-sdk:tunnel_tcp.c:170 on_tcp_client_err() client=tcp:192.168.0.116:41342 err=-14, terminating connection
[        3.181]   ERROR ziti-sdk:channel.c:484 dispatch_message() ch[0] received message without conn_id or for unknown connection ct[ED71] conn_id[8]
[        3.186]   ERROR tunnel-sdk:tunnel_tcp.c:170 on_tcp_client_err() client=tcp:192.168.0.116:41338 err=-14, terminating connection
[        3.188]   ERROR ziti-sdk:channel.c:484 dispatch_message() ch[0] received message without conn_id or for unknown connection ct[ED72] conn_id[9]
[        3.188]   ERROR ziti-sdk:channel.c:484 dispatch_message() ch[0] received message without conn_id or for unknown connection ct[ED72] conn_id[9]
[        3.188]   ERROR ziti-sdk:channel.c:484 dispatch_message() ch[0] received message without conn_id or for unknown connection ct[ED71] conn_id[9]

Valgrind log

==80089== Memcheck, a memory error detector
==80089== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==80089== Using Valgrind-3.18.1-42b08ed5bd-20211015 and LibVEX; rerun with -h for copyright info
==80089== Command: /opt/openziti/bin/ziti-edge-tunnel run --verbose 4 --dns-ip-range=100.112.0.0/12 --identity-dir=/opt/openziti/etc/identities
==80089== Parent PID: 80088
==80089== 
--80089-- 
--80089-- Valgrind options:
--80089--    --log-file=/tmp/ziti-edge-tunnel-0.18.10.valgrind
--80089--    --verbose
--80089-- Contents of /proc/version:
--80089--   Linux version 5.17.5-76051705-generic (jenkins@warp.pop-os.org) (gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #202204271406~1653440576~22.04~6277a18 SMP PREEMPT Wed May 25 01
--80089-- 
--80089-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand-rdseed
--80089-- Page sizes: currently 4096, max supported 4096
--80089-- Valgrind library directory: /usr/libexec/valgrind
--80089-- Reading syms from /opt/openziti/bin/ziti-edge-tunnel
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
--80089--   Considering /usr/lib/debug/.build-id/aa/1b0b998999c397062e1016f0c95dc0e8820117.debug ..
--80089--   .. build-id is valid
--80089-- Reading syms from /usr/libexec/valgrind/memcheck-amd64-linux
--80089--    object doesn't have a symbol table
--80089--    object doesn't have a dynamic symbol table
--80089-- Scheduler: using generic scheduler lock implementation.
--80089-- Reading suppressions file: /usr/libexec/valgrind/default.supp
==80089== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-80089-by-root-on-???
==80089== embedded gdbserver: writing to   /tmp/vgdb-pipe-to-vgdb-from-80089-by-root-on-???
==80089== embedded gdbserver: shared mem   /tmp/vgdb-pipe-shared-mem-vgdb-80089-by-root-on-???
==80089== 
==80089== TO CONTROL THIS PROCESS USING vgdb (which you probably
==80089== don't want to do, unless you know exactly what you're doing,
==80089== or are doing some strange experiment):
==80089==   /usr/bin/vgdb --pid=80089 ...command...
==80089== 
==80089== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==80089==   /path/to/gdb /opt/openziti/bin/ziti-edge-tunnel
==80089== and then give GDB the following command
==80089==   target remote | /usr/bin/vgdb --pid=80089
==80089== --pid is optional if only one valgrind process is running
==80089== 
--80089-- REDIR: 0x402aa60 (ld-linux-x86-64.so.2:strlen) redirected to 0x580bcec2 (???)
--80089-- REDIR: 0x402a830 (ld-linux-x86-64.so.2:index) redirected to 0x580bcedc (???)
--80089-- Reading syms from /usr/libexec/valgrind/vgpreload_core-amd64-linux.so
--80089--    object doesn't have a symbol table
--80089-- Reading syms from /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so
--80089--    object doesn't have a symbol table
==80089== WARNING: new redirection conflicts with existing -- ignoring it
--80089--     old: 0x0402aa60 (strlen              ) R-> (0000.0) 0x580bcec2 ???
--80089--     new: 0x0402aa60 (strlen              ) R-> (2007.0) 0x0484ee30 strlen
--80089-- REDIR: 0x4027240 (ld-linux-x86-64.so.2:strcmp) redirected to 0x484fcd0 (strcmp)
--80089-- REDIR: 0x402afc0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4853840 (mempcpy)
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/libssl.so.3
--80089--    object doesn't have a symbol table
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/libcrypto.so.3
--80089--    object doesn't have a symbol table
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/libm.so.6
--80089--   Considering /usr/lib/debug/.build-id/27/a8c28af0bfefefcf69ba73f7d4582d82e01f71.debug ..
--80089--   .. build-id is valid
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/libresolv.so.2
--80089--   Considering /usr/lib/debug/.build-id/b3/27d1d09d8b2a637782eabdf388412e7cc42544.debug ..
--80089--   .. build-id is valid
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/libc.so.6
--80089--   Considering /usr/lib/debug/.build-id/89/c3cb85f9e55046776471fed05ec441581d1969.debug ..
--80089--   .. build-id is valid
==80089== WARNING: new redirection conflicts with existing -- ignoring it
--80089--     old: 0x04ef4ce0 (memalign            ) R-> (1011.0) 0x0484e080 memalign
--80089--     new: 0x04ef4ce0 (memalign            ) R-> (1017.0) 0x0484e050 aligned_alloc
==80089== WARNING: new redirection conflicts with existing -- ignoring it
--80089--     old: 0x04ef4ce0 (memalign            ) R-> (1011.0) 0x0484e080 memalign
--80089--     new: 0x04ef4ce0 (memalign            ) R-> (1017.0) 0x0484e020 aligned_alloc
==80089== WARNING: new redirection conflicts with existing -- ignoring it
--80089--     old: 0x04ef4ce0 (memalign            ) R-> (1011.0) 0x0484e080 memalign
--80089--     new: 0x04ef4ce0 (memalign            ) R-> (1017.0) 0x0484e050 aligned_alloc
==80089== WARNING: new redirection conflicts with existing -- ignoring it
--80089--     old: 0x04ef4ce0 (memalign            ) R-> (1011.0) 0x0484e080 memalign
--80089--     new: 0x04ef4ce0 (memalign            ) R-> (1017.0) 0x0484e020 aligned_alloc
--80089-- REDIR: 0x4ef77a0 (libc.so.6:strnlen) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef7a60 (libc.so.6:strpbrk) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef7360 (libc.so.6:strcmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4f15d50 (libc.so.6:wcsnlen) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef8750 (libc.so.6:memset) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4f145c0 (libc.so.6:wcslen) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef8c90 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4f143f0 (libc.so.6:wcschr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef72e0 (libc.so.6:index) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef79e0 (libc.so.6:rindex) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef8620 (libc.so.6:memmove) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
==80089== Preferring higher priority redirection:
--80089--     old: 0x04fef940 (__memcpy_avx_unalign) R-> (2018.0) 0x04850f90 __memcpy_avx_unaligned_erms
--80089--     new: 0x04fef940 (__memcpy_avx_unalign) R-> (2018.1) 0x04852880 memmove
--80089-- REDIR: 0x4f14470 (libc.so.6:wcscmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef8a60 (libc.so.6:stpncpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4f14a30 (libc.so.6:wmemchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef78b0 (libc.so.6:strncmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef8af0 (libc.so.6:strcasecmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef74a0 (libc.so.6:strcspn) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4f144f0 (libc.so.6:wcscpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef7250 (libc.so.6:strcat) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef8be0 (libc.so.6:strncasecmp_l) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef8500 (libc.so.6:bcmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4f005f0 (libc.so.6:memrchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4efa090 (libc.so.6:strchrnul) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef7410 (libc.so.6:strcpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef8b90 (libc.so.6:strcasecmp_l) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef7720 (libc.so.6:strlen) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef7950 (libc.so.6:strncpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef89d0 (libc.so.6:stpcpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef8470 (libc.so.6:memchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef7b80 (libc.so.6:strspn) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef8850 (libc.so.6:mempcpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef8b40 (libc.so.6:strncasecmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4efa000 (libc.so.6:rawmemchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4f83430 (libc.so.6:__memcpy_chk) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef8390 (libc.so.6:strstr) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4ef7820 (libc.so.6:strncat) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
--80089-- REDIR: 0x4f83560 (libc.so.6:__memmove_chk) redirected to 0x483f220 (_vgnU_ifunc_wrapper)
==80089== WARNING: new redirection conflicts with existing -- ignoring it
--80089--     old: 0x04fef910 (__memcpy_chk_avx_una) R-> (2030.0) 0x04853940 __memcpy_chk
--80089--     new: 0x04fef910 (__memcpy_chk_avx_una) R-> (2024.0) 0x048532c0 __memmove_chk
--80089-- REDIR: 0x4fec790 (libc.so.6:__strrchr_avx2) redirected to 0x484e810 (rindex)
--80089-- REDIR: 0x4fec960 (libc.so.6:__strlen_avx2) redirected to 0x484ed10 (strlen)
--80089-- REDIR: 0x4fe7ac0 (libc.so.6:__strcmp_avx2) redirected to 0x484fbd0 (strcmp)
--80089-- REDIR: 0x4ef4120 (libc.so.6:malloc) redirected to 0x4848820 (malloc)
--80089-- REDIR: 0x4fec580 (libc.so.6:__strchrnul_avx2) redirected to 0x4853330 (strchrnul)
--80089-- REDIR: 0x4fef900 (libc.so.6:__mempcpy_avx_unaligned_erms) redirected to 0x4853440 (mempcpy)
--80089-- REDIR: 0x4fef940 (libc.so.6:__memcpy_avx_unaligned_erms) redirected to 0x4852880 (memmove)
--80089-- REDIR: 0x4fe7f00 (libc.so.6:__strncmp_avx2) redirected to 0x484f3e0 (strncmp)
--80089-- REDIR: 0x4e94150 (libc.so.6:setenv) redirected to 0x48542d0 (setenv)
--80089-- REDIR: 0x4fec300 (libc.so.6:__strchr_avx2) redirected to 0x484e9f0 (index)
--80089-- REDIR: 0x4ef47c0 (libc.so.6:realloc) redirected to 0x484dc50 (realloc)
--80089-- REDIR: 0x4ff0100 (libc.so.6:__memset_avx2_unaligned_erms) redirected to 0x4852770 (memset)
--80089-- REDIR: 0x4ef55a0 (libc.so.6:calloc) redirected to 0x484d9d0 (calloc)
--80089-- REDIR: 0x4ef8040 (libc.so.6:__GI_strstr) redirected to 0x4853ae0 (__strstr_sse2)
--80089-- REDIR: 0x4fe8440 (libc.so.6:__memchr_avx2) redirected to 0x484fd50 (memchr)
==80089== Conditional jump or move depends on uninitialised value(s)
==80089==    at 0x4F8392F: __strcat_chk (strcat_chk.c:37)
==80089==    by 0x12A707: strcat (string_fortified.h:130)
==80089==    by 0x12A707: load_config_from_file (instance-config.c:47)
==80089==    by 0x12A918: load_tunnel_status_from_file (instance-config.c:89)
==80089==    by 0x11E03E: run (ziti-edge-tunnel.c:1782)
==80089==    by 0x11B8EF: main (ziti-edge-tunnel.c:3005)
==80089== 
--80089-- REDIR: 0x4fe8710 (libc.so.6:__rawmemchr_avx2) redirected to 0x4853360 (rawmemchr)
--80089-- REDIR: 0x4ef4460 (libc.so.6:free) redirected to 0x484b210 (free)
--80089-- REDIR: 0x4fe8c00 (libc.so.6:__memcmp_avx2_movbe) redirected to 0x4852010 (bcmp)
--80089-- REDIR: 0x4fe92b0 (libc.so.6:__strcasecmp_avx) redirected to 0x484f560 (strcasecmp)
--80089-- REDIR: 0x4fee1c0 (libc.so.6:__strncpy_avx2) redirected to 0x484efe0 (strncpy)
--80089-- REDIR: 0x4feeb20 (libc.so.6:__stpcpy_avx2) redirected to 0x4852130 (stpcpy)
--80089-- REDIR: 0x4fecae0 (libc.so.6:__strnlen_avx2) redirected to 0x484ecb0 (strnlen)
--80089-- REDIR: 0x4f13200 (libc.so.6:__strstr_sse2_unaligned) redirected to 0x4853a50 (strstr)
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/libsystemd.so.0.32.0
--80089--    object doesn't have a symbol table
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/liblzma.so.5.2.5
--80089--    object doesn't have a symbol table
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/libzstd.so.1.4.8
--80089--    object doesn't have a symbol table
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/liblz4.so.1.9.3
--80089--    object doesn't have a symbol table
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/libcap.so.2.44
--80089--    object doesn't have a symbol table
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/libgcrypt.so.20.3.4
--80089--    object doesn't have a symbol table
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/libgpg-error.so.0.32.1
--80089--    object doesn't have a symbol table
--80089-- REDIR: 0x4fe92c4 (libc.so.6:__strcasecmp_l_avx) redirected to 0x484f7e0 (strcasecmp_l)
--80089-- REDIR: 0x4fede30 (libc.so.6:__strcpy_avx2) redirected to 0x484ee60 (strcpy)
--80089-- REDIR: 0x4fea944 (libc.so.6:__strncasecmp_l_avx) redirected to 0x484f930 (strncasecmp_l)
--80089-- REDIR: 0x4fef910 (libc.so.6:__memcpy_chk_avx_unaligned_erms) redirected to 0x4853940 (__memcpy_chk)
--80089-- REDIR: 0x4ef5b90 (libc.so.6:malloc_usable_size) redirected to 0x484e1b0 (malloc_usable_size)
--80089-- memcheck GC: 1000 nodes, 260 survivors (26.0%)
--80089-- memcheck GC: 1014 new table size (driftup)
--80089-- REDIR: 0x4fea930 (libc.so.6:__strncasecmp_avx) redirected to 0x484f640 (strncasecmp)
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/libz.so.1.2.11
--80089--    object doesn't have a symbol table
--80089-- REDIR: 0x4fe7870 (libc.so.6:__strpbrk_sse42) redirected to 0x4853c00 (strpbrk)
--80089-- Reading syms from /usr/lib/x86_64-linux-gnu/libnss_mdns4_minimal.so.2
--80089--    object doesn't have a symbol table
--80089-- memcheck GC: 1014 nodes, 260 survivors (25.6%)
--80089-- memcheck GC: 1029 new table size (driftup)
--80089-- memcheck GC: 1029 nodes, 264 survivors (25.7%)
--80089-- memcheck GC: 1044 new table size (driftup)
--80089-- memcheck GC: 1044 nodes, 263 survivors (25.2%)
--80089-- memcheck GC: 1059 new table size (driftup)
==80089== Invalid read of size 1
==80089==    at 0x484E9F4: index (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==80089==    by 0x15C8CB: find_domain (ziti_dns.c:285)
==80089==    by 0x15C8CB: on_dns_req (ziti_dns.c:651)
==80089==    by 0x15C8CB: on_dns_req (ziti_dns.c:609)
==80089==    by 0x14E52A: to_ziti (tunnel_udp.c:66)
==80089==    by 0x17BC2A: ip4_input_hook (lwiphooks_ip4.c:377)
==80089==    by 0x17046F: ip4_input (ip4.c:457)
==80089==    by 0x14F86D: on_packet (netif_shim.c:69)
==80089==    by 0x14F86D: netif_shim_input (netif_shim.c:51)
==80089==    by 0x1BFF39: uv__io_poll (linux-core.c:431)
==80089==    by 0x1B0C61: uv_run (core.c:375)
==80089==    by 0x11DF35: run_tunneler_loop (ziti-edge-tunnel.c:1590)
==80089==    by 0x11E294: run_tunnel (ziti-edge-tunnel.c:1556)
==80089==    by 0x11E294: run (ziti-edge-tunnel.c:1874)
==80089==    by 0x11B8EF: main (ziti-edge-tunnel.c:3005)
==80089==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==80089== 
==80089== 
==80089== Process terminating with default action of signal 11 (SIGSEGV)
==80089==  Access not within mapped region at address 0x0
==80089==    at 0x484E9F4: index (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==80089==    by 0x15C8CB: find_domain (ziti_dns.c:285)
==80089==    by 0x15C8CB: on_dns_req (ziti_dns.c:651)
==80089==    by 0x15C8CB: on_dns_req (ziti_dns.c:609)
==80089==    by 0x14E52A: to_ziti (tunnel_udp.c:66)
==80089==    by 0x17BC2A: ip4_input_hook (lwiphooks_ip4.c:377)
==80089==    by 0x17046F: ip4_input (ip4.c:457)
==80089==    by 0x14F86D: on_packet (netif_shim.c:69)
==80089==    by 0x14F86D: netif_shim_input (netif_shim.c:51)
==80089==    by 0x1BFF39: uv__io_poll (linux-core.c:431)
==80089==    by 0x1B0C61: uv_run (core.c:375)
==80089==    by 0x11DF35: run_tunneler_loop (ziti-edge-tunnel.c:1590)
==80089==    by 0x11E294: run_tunnel (ziti-edge-tunnel.c:1556)
==80089==    by 0x11E294: run (ziti-edge-tunnel.c:1874)
==80089==    by 0x11B8EF: main (ziti-edge-tunnel.c:3005)
==80089==  If you believe this happened as a result of a stack
==80089==  overflow in your program's main thread (unlikely but
==80089==  possible), you can try to increase the size of the
==80089==  main thread stack using the --main-stacksize= flag.
==80089==  The main thread stack size used in this run was 8388608.
==80089== 
==80089== HEAP SUMMARY:
==80089==     in use at exit: 1,019,701 bytes in 7,531 blocks
==80089==   total heap usage: 40,413 allocs, 32,882 frees, 17,530,287 bytes allocated
==80089== 
==80089== Searching for pointers to 7,531 not-freed blocks
==80089== Checked 69,915,360 bytes
==80089== 
==80089== LEAK SUMMARY:
==80089==    definitely lost: 682 bytes in 8 blocks
==80089==    indirectly lost: 4,096 bytes in 1 blocks
==80089==      possibly lost: 3,942 bytes in 9 blocks
==80089==    still reachable: 1,010,981 bytes in 7,513 blocks
==80089==         suppressed: 0 bytes in 0 blocks
==80089== Rerun with --leak-check=full to see details of leaked memory
==80089== 
==80089== Use --track-origins=yes to see where uninitialised values come from
==80089== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
==80089== 
==80089== 1 errors in context 1 of 2:
==80089== Invalid read of size 1
==80089==    at 0x484E9F4: index (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==80089==    by 0x15C8CB: find_domain (ziti_dns.c:285)
==80089==    by 0x15C8CB: on_dns_req (ziti_dns.c:651)
==80089==    by 0x15C8CB: on_dns_req (ziti_dns.c:609)
==80089==    by 0x14E52A: to_ziti (tunnel_udp.c:66)
==80089==    by 0x17BC2A: ip4_input_hook (lwiphooks_ip4.c:377)
==80089==    by 0x17046F: ip4_input (ip4.c:457)
==80089==    by 0x14F86D: on_packet (netif_shim.c:69)
==80089==    by 0x14F86D: netif_shim_input (netif_shim.c:51)
==80089==    by 0x1BFF39: uv__io_poll (linux-core.c:431)
==80089==    by 0x1B0C61: uv_run (core.c:375)
==80089==    by 0x11DF35: run_tunneler_loop (ziti-edge-tunnel.c:1590)
==80089==    by 0x11E294: run_tunnel (ziti-edge-tunnel.c:1556)
==80089==    by 0x11E294: run (ziti-edge-tunnel.c:1874)
==80089==    by 0x11B8EF: main (ziti-edge-tunnel.c:3005)
==80089==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==80089== 
==80089== 
==80089== 1 errors in context 2 of 2:
==80089== Conditional jump or move depends on uninitialised value(s)
==80089==    at 0x4F8392F: __strcat_chk (strcat_chk.c:37)
==80089==    by 0x12A707: strcat (string_fortified.h:130)
==80089==    by 0x12A707: load_config_from_file (instance-config.c:47)
==80089==    by 0x12A918: load_tunnel_status_from_file (instance-config.c:89)
==80089==    by 0x11E03E: run (ziti-edge-tunnel.c:1782)
==80089==    by 0x11B8EF: main (ziti-edge-tunnel.c:3005)
==80089== 
==80089== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
qrkourier commented 2 years ago
kbingham@mira:~$ /opt/openziti/bin/ziti-edge-tunnel version
v0.18.10-local

kbingham@mira:~$ ip route show
default via 192.168.0.254 dev wlo1 proto dhcp metric 600 
10.42.0.0/24 via 10.42.0.0 dev flannel.1 onlink 
10.42.1.0/24 dev cni0 proto kernel scope link src 10.42.1.1 
129.213.78.16 via 192.168.0.254 dev wlo1 
150.136.202.243 via 192.168.0.254 dev wlo1 
169.254.0.0/16 dev wlo1 scope link metric 1000 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 
192.168.0.0/24 dev wlo1 proto kernel scope link src 192.168.0.116 metric 600 

kbingham@mira:~$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os
qrkourier commented 2 years ago

I'm able to reproduce with default dns-ip-range, without passing any unnecessary options.

scareything commented 2 years ago

Can you still reproduce this? What services are available to your identity, and what is there configuration?

qrkourier commented 2 years ago

@scareything I'm unable to reproduce with 0.18.16.