[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-relays] Tor RAM usage (DoS or memory leaks?) - Flood of circuits



There is something really strange going on indeed. What I noticed is an increase of circuits and my device running out of memory until it stopped working so I had to reboot it on 31. Jan. Then again the memory usage increased until it leveled out at a rather unusual, high usage. The actual bandwidth usage is not unusual though (always around 2Mbps on my relay).

Attached a screenshot of my memory usage the last few days (I hope attachments do work here; it's in fact Tor using that memory as could be checked with ps and htop).

Heartbeat messages of the log are:

Jan 31 10:57:56.000 [notice] Heartbeat: Tor's uptime is 6:00 hours, with 447 circuits open. I've sent 2.66 GB and received 2.65 GB.
Jan 31 16:57:56.000 [notice] Heartbeat: Tor's uptime is 12:00 hours, with 19764 circuits open. I've sent 9.59 GB and received 9.54 GB.
Jan 31 22:57:56.000 [notice] Heartbeat: Tor's uptime is 18:00 hours, with 54178 circuits open. I've sent 12.36 GB and received 12.30 GB.
Feb 01 04:57:56.000 [notice] Heartbeat: Tor's uptime is 23:50 hours, with 79333 circuits open. I've sent 14.89 GB and received 14.81 GB.
Feb 01 10:57:56.000 [notice] Heartbeat: Tor's uptime is 1 day 5:50 hours, with 110815 circuits open. I've sent 19.55 GB and received 19.45 GB.
Feb 01 16:57:56.000 [notice] Heartbeat: Tor's uptime is 1 day 11:50 hours, with 141724 circuits open. I've sent 24.03 GB and received 23.90 GB.
Feb 01 22:57:56.000 [notice] Heartbeat: Tor's uptime is 1 day 17:50 hours, with 12829 circuits open. I've sent 29.96 GB and received 29.75 GB.



‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, 1. February 2019 23:50, Roman Mamedov <rm@xxxxxxxxxxx> wrote:

> Hello,
>
> There seems to be an issue with Tor's memory usage.
> Earlier today, with Tor 3.5.7 and 1.5 GB of RAM running two Tor processes, the
> machine got 430 MB into swap, slowing down to a crawl from iowait on accessing
> the swapped out memory. Typically 1.5 GB is more than enough for these. "VIRT"
> in top was ~1GB each, and "RES" was ~512MB each. Which is weird because that
> doesn't add up to exhausting the 1.5 GB, and there are no other heavy
> processes on the machine running. I rebooted it without further investigation.
>
> And right now on another machine running 2.9.16 I see:
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 22432 debian-+ 30 10 5806816 5.157g 10464 R 39.5 33.1 39464:19 tor
>
> But not sure if it just accumulated 5.1GB of RAM slowly over time, or shot up
> recently.
>
> Feb 01 17:00:49.000 [notice] Heartbeat: Tor's uptime is 82 days 23:59 hours,
> with 70705 circuits open. I've sent 66622.45 GB and received 65906.91 GB.
> Feb 01 17:00:49.000 [notice] Circuit handshake stats since last time:
> 11361/11361 TAP, 239752/239752 NTor.
> Feb 01 17:00:49.000 [notice] Since startup, we have initiated 0 v1
> connections, 0 v2 connections, 10 v3 connections, and 3385644 v4 connections;
> and received 14 v1 connections, 78592 v2 connections, 822108 v3 connections,
> and 8779474 v4 connections.
> Feb 01 17:00:49.000 [notice] DoS mitigation since startup: 2899572 circuits
> rejected, 121 marked addresses. 561 connections closed. 21956 single hop clients refused.
> Feb 01 17:08:20.000 [warn] connection_edge_process_relay_cell (at origin)
> failed.
>
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> With respect,
> Roman
>
> tor-relays mailing list
> tor-relays@xxxxxxxxxxxxxxxxxxxx
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays


Attachment: Memory Usage Relay.png
Description: PNG image

_______________________________________________
tor-relays mailing list
tor-relays@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays