Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #9639

Closed (moved)
Open
Opened Sep 01, 2013 by Trac@tracbot

massive memory leak when starting tor in the absence of /var/lib/tor

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

Trac:
Username: mr-4

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#9639