When i use the command wayvnc i get : free(): double free detected in tcache 2 [1] 11648 IOT instruction (core dumped) wayvnc
Hello, I'm new to arch, using hyprland. I don't know what could cause a problem in my case as I don't know how to read the debugger information. I hope to use the issues function correctly. Thank you in advance for your attention.
**Result for command wayvnc -V :**
wayvnc: v0.8.0-15d09b0 (makepkg)
neatvnc: v0.8.0-46432ce (makepkg)
aml: v0.3.0-0-gb83f357 (makepkg)
wayvnc -Ltrace | tee wayvnc-crash.log :
wayvnc -Ltrace | tee wayvnc-crash.log
free(): double free detected in tcache 2
[1] 11366 IOT instruction (core dumped) wayvnc -Ltrace |
11367 done tee wayvnc-crash.log
**- Get the stack trace :**
Downloading separate debug info for system-supplied DSO at 0x772b0f35c000
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `wayvnc -Ltrace'.
Program terminated with signal SIGABRT, Aborted.
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6,
no_tid=no_tid@entry=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
**result for : bt full :**
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6,
no_tid=no_tid@entry=0) at pthread_kill.c:44
tid = <optimized out>
ret = 0
pd = <optimized out>
old_mask = {__val = {0}}
ret = <optimized out>
#1 0x0000772b0ef79463 in __pthread_kill_internal (threadid=<optimized out>, signo=6)
at pthread_kill.c:78
No locals.
#2 0x0000772b0ef20120 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#3 0x0000772b0ef074c3 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20},
sa_mask = {__val = {0, 0, 0, 0, 0, 0, 131026818462773, 0, 255, 0,
108159197850528, 0, 131026819787456, 255, 131026818944850, 0}},
sa_flags = 2125260544, sa_restorer = 0x7ffde7d33310}
#4 0x0000772b0ef08354 in __libc_message_impl (fmt=fmt@entry=0x772b0f0962f5 "%s\n")
at ../sysdeps/posix/libc_fatal.c:132
ap = {{gp_offset = 16, fp_offset = 30507,
overflow_arg_area = 0x7ffde7d33420, reg_save_area = 0x7ffde7d333b0}}
fd = 2
iov = {{iov_base = 0x772b0f099628, iov_len = 40}, {
iov_base = 0x772b0f0962f7, iov_len = 1}, {iov_base = 0xea,
iov_len = 4096}, {iov_base = 0x8, iov_len = 1722187425}, {
iov_base = 0x18acbae1, iov_len = 1722187353}, {iov_base = 0x30208cdb,
iov_len = 1722187353}, {iov_base = 0x30208cdb, iov_len = 0}}
iovcnt = <optimized out>
total = <optimized out>
cp = <optimized out>
#5 0x0000772b0ef83765 in malloc_printerr (
str=str@entry=0x772b0f099628 "free(): double free detected in tcache 2")
at malloc.c:5772
No locals.
#6 0x0000772b0ef85e1f in _int_free (av=0x772b0f0caac0 <main_arena>,
p=p@entry=0x625ec6912ae0, have_lock=have_lock@entry=0) at malloc.c:4541
tmp = <optimized out>
cnt = <optimized out>
e = 0x625ec6912af0
tc_idx = <optimized out>
size = <optimized out>
fb = <optimized out>
#7 0x0000772b0ef885ce in __GI___libc_free (mem=0x625ec6912af0) at malloc.c:3398
ar_ptr = <optimized out>
p = 0x625ec6912ae0
err = 22
#8 0x0000625eb0517c29 in cfg_load (requested_path=0x0, self=0x7ffde7d33610)
at ../wayvnc/src/cfg.c:148
stream = 0x625ec6912910
line = 0x625ec6912b20 "\022i\354%\006"
len = 120
path = <optimized out>
lineno = <optimized out>
path = <optimized out>
stream = <optimized out>
line = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--c
len = <optimized out>
lineno = <optimized out>
failure = <optimized out>
#9 main (argc=<optimized out>, argv=<optimized out>) at ../wayvnc/src/main.c:1834
self = {do_exit = false, display = 0x0, registry = 0x0, wl_handler = 0x0,
outputs = {prev = 0x0, next = 0x0}, seats = {prev = 0x0, next = 0x0},
cfg = {directory = 0x625ec6912af0 "\022i\354%\006", enable_auth = false,
relax_encryption = false, private_key_file = 0x0,
certificate_file = 0x0, rsa_private_key_file = 0x0, username = 0x0,
password = 0x0, address = 0x0, port = 0, enable_pam = false,
xkb_rules = 0x0, xkb_model = 0x0, xkb_layout = 0x0, xkb_variant = 0x0,
xkb_options = 0x0, use_relative_paths = false}, keyboard_manager = 0x0,
pointer_manager = 0x0, data_control_manager = 0x0,
transient_seat_manager = 0x0, selected_output = 0x0, selected_seat = 0x0,
screencopy = {status = SCREENCOPY_STOPPED, pool = 0x0, front = 0x0,
back = 0x0, manager = 0x0, frame = 0x0, userdata = 0x0, on_done = 0x0,
last_time = 0, start_time = 0, timer = 0x0, delay_smoother = {
time_constant = 0, last_time = 0, last_result = 0}, delay = 0,
is_immediate_copy = false, overlay_cursor = false, wl_output = 0x0,
wl_shm_width = 0, wl_shm_height = 0, wl_shm_stride = 0,
wl_shm_format = WL_SHM_FORMAT_ARGB8888, have_linux_dmabuf = false,
enable_linux_dmabuf = false, dmabuf_width = 0, dmabuf_height = 0,
fourcc = 0, rate_limit = 0}, wayland_handler = 0x0,
signal_handler = 0x0, nvnc = 0x0, nvnc_display = 0x0, kb_layout = 0x0,
kb_variant = 0x0, damage_area_sum = 0, n_frames_captured = 0,
disable_input = false, use_transient_seat = false, nr_clients = 0,
performance_ticker = 0x0, capture_retry_timer = 0x0, ctl = 0x0,
is_initializing = false, start_detached = false,
master_layout_client = 0x0}
cfg_file = 0x0
enable_gpu_features = false
address = 0x0
port = <optimized out>
use_unix_socket = <optimized out>
use_websocket = <optimized out>
start_detached = false
output_name = 0x0
seat_name = 0x0
socket_path = 0x0
keyboard_options = <optimized out>
overlay_cursor = false
show_performance = false
max_rate = 30
disable_input = <optimized out>
use_transient_seat = <optimized out>
drm_fd = -1
log_level = <optimized out>
option_parser = {name = 0x625eb0523781 "Options",
options = 0x625eb0529c20 <opts>, n_opts = 20, values = {{
option = 0x625eb052a010 <opts+1008>,
value = "trace", '\000' <repeats 250 times>}, {option = 0x0,
value = '\000' <repeats 255 times>} <repeats 127 times>},
n_values = 1, position = 0, remaining_argc = 0, remaining_argv = 0x0}
port_str = <optimized out>
cfg_rc = <optimized out>
aml = <optimized out>
socket_type = <optimized out>
ctl_actions = {userdata = 0x78, on_attach = 0x0, on_detach = 0x0,
on_output_cycle = 0x0, on_output_switch = 0x0, on_disconnect_client = 0x0,
on_wayvnc_exit = 0x0, client_next = 0x0, client_info = 0x0,
get_output_list = 0x0}
opts = {{short_opt = 0 '\000', long_opt = 0x0, schema = 0x0,
help = 0x625eb0525748 "The IP address or unix socket path to listen on.", default_ = 0x625eb0523777 "127.0.0.1", positional = 0x625eb05235a9 "address",
is_subcommand = false}, {short_opt = 0 '\000', long_opt = 0x0,
schema = 0x0, help = 0x625eb0523ed0 "The TCP port to listen on.",
default_ = 0x625eb0523eeb "5900", positional = 0x625eb052387d "port",
is_subcommand = false}, {short_opt = 67 'C',
long_opt = 0x625eb05238b5 "config", schema = 0x625eb0523ef0 "<path>",
help = 0x625eb0523ef7 "Select a config file.", default_ = 0x0,
positional = 0x0, is_subcommand = false}, {short_opt = 103 'g',
long_opt = 0x625eb05237f2 "gpu", schema = 0x0,
help = 0x625eb0525780 "Enable features that need GPU.", default_ = 0x0,
positional = 0x0, is_subcommand = false}, {short_opt = 111 'o',
long_opt = 0x625eb0523a03 "output", schema = 0x625eb0523d79 "<name>",
help = 0x625eb0523f0d "Select output to capture.", default_ = 0x0,
positional = 0x0, is_subcommand = false}, {short_opt = 107 'k',
long_opt = 0x625eb052321e "keyboard",
schema = 0x625eb0523f27 "<layout>[-<variant>]",
help = 0x625eb05257a0 "Select keyboard layout with an optional variant.", default_ = 0x0, positional = 0x0, is_subcommand = false}, {short_opt = 115 's',
long_opt = 0x625eb05239f6 "seat", schema = 0x625eb0523d79 "<name>",
help = 0x625eb0523f3c "Select seat by name.", default_ = 0x0,
positional = 0x0, is_subcommand = false}, {short_opt = 83 'S',
long_opt = 0x625eb0523815 "socket", schema = 0x625eb0523ef0 "<path>",
help = 0x625eb0523f51 "Control socket path.", default_ = 0x0,
positional = 0x0, is_subcommand = false}, {short_opt = 116 't',
long_opt = 0x625eb0523865 "transient-seat", schema = 0x0,
help = 0x625eb0523f66 "Use transient seat.", default_ = 0x0,
positional = 0x0, is_subcommand = false}, {short_opt = 114 'r',
long_opt = 0x625eb05237f6 "render-cursor", schema = 0x0,
help = 0x625eb05257d8 "Enable overlay cursor rendering.",
default_ = 0x0, positional = 0x0, is_subcommand = false}, {
short_opt = 102 'f', long_opt = 0x625eb052385d "max-fps",
schema = 0x625eb0523f7a "<fps>",
help = 0x625eb0523f80 "Set rate limit.", default_ = 0x625eb0523f90 "30",
positional = 0x0, is_subcommand = false}, {short_opt = 112 'p',
long_opt = 0x625eb0523804 "performance", schema = 0x0,
help = 0x625eb0523f93 "Show performance counters.", default_ = 0x0,
positional = 0x0, is_subcommand = false}, {short_opt = 117 'u',
long_opt = 0x625eb0523810 "unix-socket", schema = 0x0,
help = 0x625eb0523fae "Create unix domain socket.", default_ = 0x0,
positional = 0x0, is_subcommand = false}, {short_opt = 100 'd',
long_opt = 0x625eb0523826 "disable-input", schema = 0x0,
help = 0x625eb0523fc9 "Disable all remote input.", default_ = 0x0,
positional = 0x0, is_subcommand = false}, {short_opt = 68 'D',
long_opt = 0x625eb0523874 "detached", schema = 0x0,
help = 0x625eb0525800 "Start detached from a compositor.",
default_ = 0x0, positional = 0x0, is_subcommand = false}, {
short_opt = 86 'V', long_opt = 0x625eb05237c3 "version", schema = 0x0,
help = 0x625eb0523fe3 "Show version info.", default_ = 0x0,
positional = 0x0, is_subcommand = false}, {short_opt = 118 'v',
long_opt = 0x625eb0523ff6 "verbose", schema = 0x0,
help = 0x625eb0525828 "Be more verbose. Same as setting --log-level=info", default_ = 0x0, positional = 0x0, is_subcommand = false}, {short_opt = 119 'w',
long_opt = 0x625eb052381c "websocket", schema = 0x0,
help = 0x625eb0523ffe "Create a websocket.", default_ = 0x0,
positional = 0x0, is_subcommand = false}, {short_opt = 76 'L',
long_opt = 0x625eb0523834 "log-level",
schema = 0x625eb0524012 "<level>",
help = 0x625eb0525860 "Set log level. The levels are: error, warning, info, debug trace and quiet.", default_ = 0x625eb0523844 "warning", positional = 0x0,
is_subcommand = false}, {short_opt = 104 'h',
long_opt = 0x625eb05237ed "help", schema = 0x0,
help = 0x625eb052401a "Get help (this text).", default_ = 0x0,
positional = 0x0, is_subcommand = false}, {short_opt = 0 '\000',
long_opt = 0x0, schema = 0x0, help = 0x0, default_ = 0x0,
positional = 0x0, is_subcommand = false}}
- Describe how to reproduce the problem :
I just try to install with your readme instruction and run.
Nice report!
At a glance, your trace seems to be saying there was a panic soon after wayvnc started config loading.
I am getting the same crash with the same version (v0.8.0-15d09b0, though neatvnc v0.8.1), which my testing suggests could be caused by specifying any address on command line or in config.
If I do not specify address, wayvnc does idle but seems to refuse remote connects.
If you run this via valgrind that should catch the problem. I do recommend trying the master branch though.
Building from main, command line seems working fine, so can proceed there.
Edit: It would seem that my crash was due to my using 'address <>' instead of 'address=<>' :roll_eyes:
If I remember correctly, this was due to a double-free the failure path of cfg_load, which has been fixed now.