Opened 6 years ago

Closed 6 years ago

#12669 closed defect (worksforme)

Tor memory leak (again)

Reported by: BeagleBone Owned by: Me
Priority: Medium Milestone: Tor: 0.2.4.x-final
Component: Core Tor/Tor Version: Tor:
Severity: Keywords: memory leek
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:



I will try to give you all information about my problem. I started small project after getting BeagleBone Black motherboard, but i have issue with my Tor installation.

BeagleBone Black have only 512MB of RAM, but that is not problem, Tor + arm debian installation use less then 180MB of RAM. But day after day Tor start using more and more memory. First day Tor was running on 50MB second 100 and last news are 160MB. I guess that after one week system will go down.

If i run restart, that will fix this issue, but then my uptime goes back to 0 and that is not what i want to see. My relay have few flags in this time fast/valid/exit/running but if i need to restart him every day with cron job i lose flags and stability. Only extra settings are:

## Set a maximum of 4 gigabytes each way per period.
AccountingMax 4 GB

I use personal exit rules on my server.

Have a nice day!

Child Tickets

Change History (4)

comment:1 Changed 6 years ago by nickm

You can try setting the MaxMemInCellQueues option to control the total memory consumption, or (if you can upgrade to Tor 0.2.5) the improved MaxMemInQueues option. On the other hand, it's normal for memory consumption to rise as a server starts up and starts getting more traffic; 512MB is a little tight here.

comment:2 Changed 6 years ago by arma

Re "leaks", if they are actually leaks, you should be able to find them in valgrind and then we'll fix them.

But alas, they're unlikely to be leaks -- they're probably memory fragmentation bugs, where the memory is still actually in use, but the total number of pages used by Tor grows over time since glibc is bad at giving freed memory back to the system. There have been a bunch of tickets of this sort over the years.

A fast Tor relay will generally grow to about 1gig of ram use over time.

comment:3 Changed 6 years ago by BeagleBone



I just tested with valgrind. Looks fine from day 4, memory usage goes up in first 3 days and now it's stay stable.


I didn't try that option because i think that server will not run as i wish, but i didn't know about MaxMemInCellQueues before. Thank you for sharing.

If somebody can close this ticket it will be nice.

Thanks you for your time.

comment:4 Changed 6 years ago by nickm

Resolution: worksforme
Status: newclosed

If somebody can close this ticket it will be nice


Note: See TracTickets for help on using tickets.