Extreme CPU usage
Summary
Im having multiple WAN ports which every 5 minutes the router switch between them in a round robin algorithmic way. This happen inside the router. After WAN switch happen arti lose the connection with it peers which its completely normal but after trying to make new peers its CPU usage goes higher. After 7-8 switch arti use 100% of CPU. I guess there its some lock that prevents the lost connection to finish and destruct it, rather than its still trying to make the connection on the lost port.
Steps to reproduce:
You dont need high configure system to test it. Just have two different internet WAN its enough.
- Remove the ethernet WAN port from PC and put another ethernet WAN.
- Wait until atri make new connections.
- Repeat steep [1,2] for 10 times.
What is the current bug behavior?
Using 100% of CPU usage
What is the expected behavior?
CPU usage should be less than 1%
Environment
- Version: Arti 0.0.4
- Operating system: Windows 11
- Install method: from git
- etc...
Relevant logs and/or screenshots:
Log
←[2m2022-02-01T09:24:42.805661Z←[0m ←[33m WARN←[0m ←[2mtor_proto::circuit::reactor←[0m←[2m:←[0m Circ 2.5: having to enqueue cell due to backpressure: ChanCell { circid: CircId(2363215174), msg: Relay(Relay) } ←[2m2022-02-01T09:24:42.830781Z←[0m ←[33m WARN←[0m ←[2mtor_proto::circuit::reactor←[0m←[2m:←[0m Circ 2.5: having to enqueue cell due to backpressure: ChanCell { circid: CircId(2363215174), msg: Relay(Relay) } ←[2m2022-02-01T09:24:42.840138Z←[0m ←[33m WARN←[0m ←[2mtor_proto::circuit::reactor←[0m←[2m:←[0m Circ 2.5: having to enqueue cell due to backpressure: ChanCell { circid: CircId(2363215174), msg: Relay(Relay) } ←[2m2022-02-01T09:24:42.884217Z←[0m ←[33m WARN←[0m ←[2mtor_proto::circuit::reactor←[0m←[2m:←[0m Circ 2.5: having to enqueue cell due to backpressure: ChanCell { circid: CircId(2363215174), msg: Relay(Relay) } ←[2m2022-02-01T09:24:42.922146Z←[0m ←[33m WARN←[0m ←[2mtor_proto::circuit::reactor←[0m←[2m:←[0m Circ 2.5: having to enqueue cell due to backpressure: ChanCell { circid: CircId(2363215174), msg: Relay(Relay) } ←[2m2022-02-01T09:25:11.716475Z←[0m ←[33m WARN←[0m ←[2marti::proxy←[0m←[2m:←[0m connection exited with error: directory timed out ←[2m2022-02-01T09:25:11.745268Z←[0m ←[33m WARN←[0m ←[2marti::proxy←[0m←[2m:←[0m connection exited with error: directory timed out ←[2m2022-02-01T09:25:12.204730Z←[0m ←[33m WARN←[0m ←[2marti::proxy←[0m←[2m:←[0m connection exited with error: directory timed out ←[2m2022-02-01T09:27:47.633435Z←[0m ←[33m WARN←[0m ←[2marti::proxy←[0m←[2m:←[0m connection exited with error: Error while reading SOCKS handshake ←[2m2022-02-01T09:27:47.633433Z←[0m ←[33m WARN←[0m ←[2marti::proxy←[0m←[2m:←[0m connection exited with error: Error while reading SOCKS handshake ←[2m2022-02-01T09:27:47.643401Z←[0m ←[33m WARN←[0m ←[2marti::proxy←[0m←[2m:←[0m connection exited with error: Error while reading SOCKS handshakePossible fixes:
Restarting arti makes it normal
Edited by mohix