[tor-bugs] #9639 [Tor]: massive memory leak when starting tor in the absence of /var/lib/tor
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sun Sep 1 11:14:50 UTC 2013
#9639: massive memory leak when starting tor in the absence of /var/lib/tor
--------------------+-------------------------------------
Reporter: mr-4 | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Tor | Version: Tor: 0.2.4.14-alpha
Keywords: | Actual Points:
Parent ID: | Points:
--------------------+-------------------------------------
Prior to starting tor, I deleted the entire /var/lib/tor directory by
mistake (though I did not know this at the time) and then started tor,
checked the logs to see that tor is 100% started and left it there
overnight.
Early this morning, I saw that the tor memory footprint has ballooned from
the usual 29MB to over 170MB - that was nearly 6 times the normal tor
memory consumption in just about 12 hours.
When I checked the logs, I discovered this:
Aug 31 22:37:44.000 [notice] {GENERAL} Tor has successfully opened a
circuit. Looks like client functionality is working.
Aug 31 22:37:44.000 [notice] {CONTROL} Bootstrapped 100%: Done.
Aug 31 23:07:31.000 [warn] {FS} Couldn't open "/var/lib/tor/cached-
microdescs.tmp" (/var/lib/tor/cached-microdescs) for writing: No such file
or directory
Aug 31 23:37:31.000 [warn] {FS} Couldn't open "/var/lib/tor/state.tmp"
(/var/lib/tor/state) for writing: No such file or directory
Aug 31 23:37:31.000 [warn] {FS} Unable to write state to file
"/var/lib/tor/state"; will try again later
Aug 31 23:37:31.000 [warn] {FS} Couldn't open "/var/lib/tor/cached-
descriptors.new" (/var/lib/tor/cached-descriptors.new) for writing: No
such file or directory
Aug 31 23:37:31.000 [warn] {FS} Unable to store router descriptor
Aug 31 23:37:32.000 [warn] {FS} Couldn't open "/var/lib/tor/cached-
microdescs.tmp" (/var/lib/tor/cached-microdescs) for writing: No such file
or directory
Aug 31 23:52:32.000 [warn] {FS} Couldn't open "/var/lib/tor/cached-
descriptors.new" (/var/lib/tor/cached-descriptors.new) for writing: No
such file or directory
Aug 31 23:52:32.000 [warn] {FS} Unable to store router descriptor
Sep 01 00:05:04.000 [warn] {FS} Couldn't open "/var/lib/tor/cached-
microdesc-consensus.tmp" (/var/lib/tor/cached-microdesc-consensus) for
writing: No such file or directory
Sep 01 00:05:05.000 [warn] {FS} Couldn't open "/var/lib/tor/cached-
microdescs.new" (/var/lib/tor/cached-microdescs.new) for writing: No such
file or directory
Sep 01 00:05:05.000 [warn] {DIR} Couldn't append to journal in
/var/lib/tor/cached-microdescs.new: No such file or directory
Sep 01 00:05:05.000 [warn] {FS} Couldn't open "/var/lib/tor/cached-
microdescs.new" (/var/lib/tor/cached-microdescs.new) for writing: No such
file or directory
[...]
This was, obviously caused by the absence of /var/lib/tor which I deleted
by mistake before starting tor last night, but that doesn't explain the
6-fold increase in the tor memory footprint.
For posterity, this is the "normal" tor memory footprint just after start
up:
tor 24772 1.0 4.3 19612 12304 ? S Aug31 8:32 /usr/bin/tor -f /etc/tor/tor
--defaults-torrc /etc/tor/defaults-torrc
and this was tor's memory footprint when I discovered it this morning:
tor 1895 2.6 40.0 174456 113196 ? R Aug31 20:25 /usr/bin/tor -f
/etc/tor/tor --defaults-torrc /etc/tor/defaults-torrc
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9639>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list