Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#32452 - [tor] systemd service file is missing LimitNOFILE

Attached to Project: Community Packages
Opened by ... (spider007) - Sunday, 04 November 2012, 11:48 GMT
Last edited by Lukas Fleischer (lfleischer) - Thursday, 15 November 2012, 19:09 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

rc.d file takes TOR_MAX_FD into account, but the systemd file doesn't. I think this can be fixed with:

# diff /usr/lib/systemd/system/tor.service /etc/systemd/system/tor.service
11a12
> LimitNOFILE=$TOR_MAX_FD

Without it tor doesn't really function as the default number is 4096
This task depends upon

Closed by  Lukas Fleischer (lfleischer)
Thursday, 15 November 2012, 19:09 GMT
Reason for closing:  Fixed
Additional comments about closing:  Added in trunk.
Comment by Lukas Fleischer (lfleischer) - Saturday, 10 November 2012, 01:21 GMT
Adding "LimitNOFILE" to "/etc/systemd/system/tor.service" is the preferred way of doing this -- we usually avoid using "EnvironmentFile" unless necessary. I think I am going to remove the other "conf.d" variables (and the "EnvironmentFile" directive) from the service file and hardcode values instead.
Comment by ... (spider007) - Wednesday, 14 November 2012, 23:55 GMT
  • Field changed: Percent Complete (100% → 0%)
I request LimitNOFILE in /usr/lib/systemd/system/tor.service, you reply with wont-fix and some unrelated stuff about EnvironmentFile (which doesn't fix this)? Tor doesn't work without a higher LimitNOFile, yet you tell me the best way is to duplicate the service file to /etc?

wtf?
Comment by Lukas Fleischer (lfleischer) - Thursday, 15 November 2012, 00:08 GMT
Tor works perfectly fine without a higher file descriptor limit here. We didn't set a default "$TOR_MAX_FD" when using initscripts and we won't set this in systemd units unless there's a good reason to do so.
Comment by ... (spider007) - Thursday, 15 November 2012, 08:31 GMT
Thanks for the explanation. Increasing the number of file descriptors is actually described in the official tor configuration instructions (https://www.torproject.org/docs/tor-doc-relay.html.en step #14), which is why I originally requested TOR_MAX_FD to be added to the initscripts. I actually don't see the harm in adding LimitNOFiles=8192 to the service-file too; which fast relays needs to operate correctly.
Comment by Lukas Fleischer (lfleischer) - Thursday, 15 November 2012, 19:09 GMT
Agreed, added in trunk.

Loading...