Tor "Resetting timeout" crashed my server

Everything had been running without issue for long time, but I got this message today.

[notice] Your network connection speed appears to have changed. Resetting timeout to 60000ms after 18 timeouts and 1000 buildtimes.

And after that I started getting a lot of out of memory warnings

[notice] We're low on memory (cell queues total alloc: 5903821968 buffer total alloc: 182304768, tor compress total alloc: 50458560 (zlib: 908544, zstd: 49549392, lzma: 0), rendezvous cache total alloc: 102271497). Killing circuits withover-long queues. (This behavior is controlled by MaxMemInQueues.)

Which resulted in a controlled crash

Mar 21 14:38:10.000 [warn] connection_edge_about_to_close(): Bug: (Harmless.) Edge connection (marked at ../src/core/or/circuitlist.c:2747) hasn't sent end yet? (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] tor_bug_occurred_(): Bug: ../src/core/or/connection_edge.c:1086: connection_edge_about_to_close: This line should not have been reached. (Future instances of this warning will be silenced.) (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug: Tor 0.4.8.10: Line unexpectedly reached at connection_edge_about_to_close at ../src/core/or/connection_edge.c:1086. Stack trace: (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /usr/bin/tor(log_backtrace_impl+0x5a) [0x55ac2078ccaa] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /usr/bin/tor(tor_bug_occurred_+0x16f) [0x55ac2079804f] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /usr/bin/tor(connection_exit_about_to_close+0x21) [0x55ac20840281] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /usr/bin/tor(+0x712fd) [0x55ac207122fd] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /usr/bin/tor(+0x719fb) [0x55ac207129fb] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x1ff58) [0x7fa9c9981f58] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x577) [0x7fa9c99838a7] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /usr/bin/tor(do_main_loop+0x105) [0x55ac207143d5] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /usr/bin/tor(tor_run_main+0x195) [0x55ac2070fcb5] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /usr/bin/tor(tor_main+0x3e) [0x55ac2070c19e] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /usr/bin/tor(main+0x1d) [0x55ac2070bd4d] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7fa9c9206d90] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7fa9c9206e40] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] Bug:     /usr/bin/tor(_start+0x2e) [0x55ac2070bdae] (on Tor 0.4.8.10 )
Mar 21 14:38:10.000 [warn] connection_edge_about_to_close(): Bug: (Harmless.) Edge connection (marked at ../src/core/or/circuitlist.c:2747) hasn't sent end yet? (on Tor 0.4.8.10 )

After this I kept getting a low memory warning ever 1-2 min, and all memory including disk swap was used.

I suspect it was the initial Resetting timeout to 60000ms that started all the problems, do I need to do something to prevent it from happening again?

It seems that bug was already reported here:

Maybe you could try the ddos scripts made by @Enkidu-6?

1 Like