In Shadow, rare case with 3 conflux legs rather than 2
Jan 01 00:16:28.462 [warn] tor_bug_occurred_(): Bug: src/core/or/conflux_util.c:378: conflux_validate_legs: Non-fatal assertion !(smartlist_len(cfx->legs) > conflux_params_get_num_legs_set()) failed. (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: Tor 0.4.8.1-alpha-dev (git-dec385ebc6bfe8ea): Non-fatal assertion !(smartlist_len(cfx->legs) > conflux_params_get_num_legs_set()) failed in conflux_validate_legs at src/core/or/conflux_util.c:378. Stack trace: (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(log_backtrace_impl+0x5a) [0x558cb3dcc5ca] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(tor_bug_occurred_+0x16f) [0x558cb3dd788f] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(conflux_validate_legs+0x1a7) [0x558cb3e6b087] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(conflux_decide_next_circ+0x2a) [0x558cb3e642aa] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(conflux_decide_circ_for_send+0x58) [0x558cb3e64768] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(relay_send_command_from_edge_+0x302) [0x558cb3d7a8a2] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(connection_edge_send_command+0x72) [0x558cb3d7abf2] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(connection_edge_finished_connecting+0xad) [0x558cb3e829ed] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(connection_handle_write+0x765) [0x558cb3e7b5c5] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(+0x6e892) [0x558cb3d53892] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x2113f) [0x7f215ee9013f] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x52f) [0x7f215ee9087f] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(do_main_loop+0xe1) [0x558cb3d54d91] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(tor_run_main+0x195) [0x558cb3d50705] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(tor_main+0x3e) [0x558cb3d4cc9e] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(main+0x1d) [0x558cb3d4c84d] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f215e913083] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] Bug: /root/.local/bin/tor(_start+0x2e) [0x558cb3d4c8ae] (on Tor 0.4.8.1-alpha-dev dec385ebc6bfe8ea)
Jan 01 00:16:28.462 [warn] conflux_validate_legs(): Bug: BADSTUFF: Number of legs is above maximum of 2 allowed: 3
This happened 3 times in one of the 3 runs. So roughly 3 out of ~750k circuits. If I had to guess, this means somewhere in the maze, we think a leg has failed, but it actually ends up succeeding later?
It is not serious, but this backtrace could also emerge on live, since conflux_validate_legs() is still being performed there.
At minimum, we can add a call to conflux_log_set()
there, to try to get more info on what these legs are.