Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#4544 closed defect (duplicate)

moria1 exits after hup when i add an info-level log to torrc

Reported by: arma Owned by:
Priority: High Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version: Tor: 0.2.3.8-alpha
Severity: Keywords: tor-auth
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I started moria1 on a few commits before 0.2.3.8-alpha. I let it run a while. Then I added "log info file moria1-info" to its torrc as usual, and hupped it as usual. Except this time it exited:

[...]
Nov 23 04:52:28.000 [info] init_keys(): Reading/making onion key "moria1/keys/secret_onion_key"...
Nov 23 04:52:28.000 [info] router_add_to_routerlist(): Dropping descriptor that we already have for router $9695DFC35FFEB861329B9F1AB04C46397020CE31=moria1 at 128.31.0.34
Nov 23 04:52:28.000 [info] dirserv_add_descriptor(): Did not add descriptor from 'moria1' (source: self): Router descriptor was not new..
Nov 23 04:52:28.000 [err] Unable to add own descriptor to directory: Router descriptor was not new.
Nov 23 04:52:28.000 [warn] options_act(): Bug: Error initializing keys; exiting
Nov 23 04:52:28.000 [err] set_options(): Bug: Acting on config options left us in a broken state. Dying.

Child Tickets

Change History (8)

comment:1 Changed 8 years ago by troll_un

It's a duplicate of #4438.
options_transition_affects_workers() must be splitted over two independent func. The one affect reinit keys, another one affect rotation workers.
You no need to reinit keys if changes loging stuff.

comment:2 Changed 8 years ago by troll_un

/** Return 1 if any change from <b>old_options</b> to <b>new_options</b>
 * will require us to reinit keys; else return 0. */
static int
options_transition_affects_init_keys(const or_options_t *old_options,
                                   const or_options_t *new_options)
{
  if (!opt_streq(old_options->DataDirectory, new_options->DataDirectory) ||
      old_options->ORPort != new_options->ORPort ||
      old_options->ClientOnly != new_options->ClientOnly ||
      public_server_mode(old_options) != public_server_mode(new_options) ||
    return 1;

  /* Nothing that changed matters. */
  return 0;
}

comment:3 Changed 8 years ago by troll_un

well it's non compilable but you got idea.

comment:4 Changed 8 years ago by troll_un

btw, as closely related:

{{{ if (!old_options

options_transition_affects_descriptor(old_options, options))

mark_my_descriptor_dirty("config change");

}}}
It happens too late (after reinit keys). It should be called before calling of init_keys().

comment:5 Changed 8 years ago by nickm

Milestone: Tor: 0.2.3.x-final

comment:6 Changed 8 years ago by nickm

Resolution: duplicate
Status: newclosed

I believe troll_un is right; closing as a duplicate of #4438

comment:7 Changed 7 years ago by nickm

Keywords: tor-auth added

comment:8 Changed 7 years ago by nickm

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