Opened 10 years ago

Closed 9 years ago

Last modified 7 years ago

#1366 closed defect (not a bug)

reload of valid but changed config causes abort

Reported by: keb Owned by:
Priority: Very Low Milestone:
Component: Core Tor/Tor Version: 0.2.2.11-alpha
Severity: Keywords:
Cc: keb, arma, Sebastian, nickm, karsten Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by arma)

changed the DirReqStatistics value in torrc and sent a HUP to the running Tor:

Apr 20 00:50:32.776 [notice] Received reload signal (hup). Reloading config and resetting internal state.
Apr 20 00:50:32.778 [warn] Failed to parse/validate config: While Tor is running,

changing either CellStatistics, DirReqStatistics, EntryStatistics, or ExitPortStatistics is not allowed.

Apr 20 00:50:32.778 [err] Reading config failed--see warnings above. For usage, try -h.
Apr 20 00:50:32.778 [warn] Restart failed (config error?). Exiting.

behaviour seems ornery.
if changing one of those Stats config vars is not allowed while running,
then shouldnt it keep running with current values
and refuse to continue reloading the config?
if it is going to quit anyway, why not restart and load the new (valid) config?

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (6)

comment:1 Changed 10 years ago by Sebastian

I think this is the sane behaviour here. Just running with the old
values means that the operator is left to wonder what happened,
whereas restarting Tor means that either Tor cannot restart in the
same way (because it might require root to bind to ports, etc), so
no improvement; or worse it might restart Tor and the operator
never realizes that their relay just restarted.

comment:2 Changed 9 years ago by arma

Description: modified (diff)

Karsten changed these particular config options to be changeable on the fly:

Changes in version 0.2.2.15-alpha - 2010-08-18
[...]

o Major features:

[...]

  • Allow enabling or disabling the *Statistics config options while Tor is running.

So this particular issue should be solved now.

More generally, check out the tor --verify-config command-line option that you should use to validate your torrc before attempting a hup. The debian tor package uses this feature.

comment:3 Changed 9 years ago by arma

Ok to close?

comment:4 Changed 9 years ago by arma

Resolution: Nonenot a bug
Status: newclosed

nickm thinks this is closeable too

comment:5 Changed 9 years ago by Sebastian

Just as a note, --verify-config doesn't help in this case, because it can't make sense of potentially illegal option transitions.

comment:6 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.