Bug in connection_connect while entering hibernation
Summary
Relay indicated bug in logging
Steps to reproduce:
- Relay configured with AccountingMax on a daily basis
What is the current bug behavior?
Appears to be attempting to replace a connection closed due to hibernation, which fails because the relay is hibernating. I would assume this is a race condition, as it does not occur consistently.
What is the expected behavior?
Do not attempt to replace connections closed as part of a hibernation transition.
Environment
Tor version 0.4.8.10.
This build of Tor is covered by the GNU General Public License (https://www.gnu.org/licenses/gpl-3.0.en.html)
Tor is running on Linux with Libevent 2.1.12-stable, OpenSSL 3.0.2, Zlib 1.2.11, Liblzma 5.2.5, Libzstd 1.4.8 and Glibc 2.35 as libc.
Tor compiled with GCC version 11.4.0
Installed via apt
with Tor repo added.
Relevant logs and/or screenshots
Dec 29 08:29:58.000 [warn] tor_bug_occurred_(): Bug: ../src/core/mainloop/connection.c:2204: connection_connect_sockadd\
r: This line should not have been reached. (Future instances of this warning will be silenced.) (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: Tor 0.4.8.10: Line unexpectedly reached at connection_connect_sockaddr at ../src/core/m\
ainloop/connection.c:2204. Stack trace: (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(log_backtrace_impl+0x5b) [0x556e5a25d37b] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(tor_bug_occurred_+0x18a) [0x556e5a27494a] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(+0x1b5784) [0x556e5a321784] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(connection_connect+0xdc) [0x556e5a321f6c] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(connection_or_connect+0x1f1) [0x556e5a33a741] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(channel_tls_connect+0xaf) [0x556e5a2d4d3f] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(channel_connect_for_circuit+0x3f) [0x556e5a2de9ff] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(circuit_handle_first_hop+0x2d9) [0x556e5a2e11b9] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(circuit_establish_circuit_conflux+0xa0) [0x556e5a2e1550] (on Tor 0.4.8\
.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(conflux_launch_leg+0x140) [0x556e5a316780] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(+0x1aae57) [0x556e5a316e57] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(circuit_mark_for_close_+0x183) [0x556e5a2ea003] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(circuit_unlink_all_from_channel+0x122) [0x556e5a2ec6d2] (on Tor 0.4.8.\
10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(channel_closed+0x44) [0x556e5a2cd234] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(connection_or_about_to_close+0x30) [0x556e5a3353a0] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(+0x707ee) [0x556e5a1dc7ee] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(+0x70b98) [0x556e5a1dcb98] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(+0x71eac) [0x556e5a1ddeac] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x1fe68) [0x7f5d8dae0e68] (on Tor 0.4.8.10\
)
Dec 29 08:29:58.000 [warn] Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x577) [0x7f5d8dae28a7] (on\
Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(do_main_loop+0x127) [0x556e5a1e07c7] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(tor_run_main+0x215) [0x556e5a1e4805] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(tor_main+0x4d) [0x556e5a1e4c6d] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(main+0x1d) [0x556e5a1d6dcd] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f5d8d1edd90] (on Tor 0.4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f5d8d1ede40] (on Tor 0.\
4.8.10 )
Dec 29 08:29:58.000 [warn] Bug: /usr/bin/tor(_start+0x25) [0x556e5a1d6e25] (on Tor 0.4.8.10 )
This error has not recurred since I first encountered it and in the time it took to get a GitLab account the logs have cycled, so I only have the above snippet that I copied out at the time.