Opened 5 months ago

Closed 4 months ago

Last modified 11 days ago

#21062 closed defect (fixed)

get_options_mutable: Assertion global_options failed; aborting -- b/c LearnCircuitBuildTimeout 0

Reported by: alecmuffett Owned by: dgoulet
Priority: Medium Milestone: Tor: 0.3.0.x-final
Component: Core Tor/Tor Version: Tor: 0.2.9.7-rc
Severity: Normal Keywords:
Cc: asn Actual Points:
Parent ID: Points: 0.2
Reviewer: Sponsor:

Description

This config file:

DataDirectory /home/alecm/master/halfagig/hs1.d
HiddenServiceDir /home/alecm/master/halfagig/hs1.d
ControlPort unix:/home/alecm/master/halfagig/hs1.d/control.sock
SocksPort 0
Log debug file /home/alecm/master/halfagig/hs1.d/log.txt
SafeLogging 0
HeartbeatPeriod 60 minutes
# HiddenServicePort 19 localhost:8501
# HiddenServicePort 22 localhost:22
HiddenServicePort 80 localhost:10501
HiddenServiceNumIntroductionPoints 3
LongLivedPorts 19,22,80
#
# CircuitBuildTimeout 60
LearnCircuitBuildTimeout 0  # <------------------ ENABLING THIS WAS THE CAUSE
# PredictedPortsRelevanceTime 0
# UseEntryGuards 0
# UseEntryGuardsAsDirGuards 0

Leads to this stack trace:

Dec 22 15:46:19.117 [err] tor_assertion_failed_(): Bug: src/or/config.c:725: get_options_mutable: Assertion global_options failed; aborting. (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)
Dec 22 15:46:19.118 [err] Bug: Assertion global_options failed in get_options_mutable at src/or/config.c:725. Stack trace: (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)
Dec 22 15:46:19.118 [err] Bug:     /usr/local/bin/tor(log_backtrace+0x4c) [0x54c5ded4] (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)
Dec 22 15:46:19.118 [err] Bug:     /usr/local/bin/tor(tor_assertion_failed_+0x90) [0x54c7a020] (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)
Dec 22 15:46:19.118 [err] Bug:     /usr/local/bin/tor(+0xe1fb8) [0x54be8fb8] (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)
Dec 22 15:46:19.118 [err] Bug:     /usr/local/bin/tor(get_options+0x50) [0x54be90d8] (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)
Dec 22 15:46:19.118 [err] Bug:     /usr/local/bin/tor(circuit_build_times_disabled+0x24) [0x54bdc304] (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)
Dec 22 15:46:19.118 [err] Bug:     /usr/local/bin/tor(+0xe9234) [0x54bf0234] (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)
Dec 22 15:46:19.118 [err] Bug:     /usr/local/bin/tor(options_init_from_string+0x348) [0x54bf4c18] (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)
Dec 22 15:46:19.118 [err] Bug:     /usr/local/bin/tor(options_init_from_torrc+0x248) [0x54bf5038] (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)
Dec 22 15:46:19.118 [err] Bug:     /usr/local/bin/tor(tor_init+0x308) [0x54b3b304] (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)
Dec 22 15:46:19.118 [err] Bug:     /usr/local/bin/tor(tor_main+0x58) [0x54b3c88c] (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)
Dec 22 15:46:19.118 [err] Bug:     /usr/local/bin/tor(main+0x24) [0x54b358e4] (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)
Dec 22 15:46:19.118 [err] Bug:     /lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x114) [0x76ab5294] (on Tor 0.2.9.7-rc 6b6ad81c2e140d85)

Child Tickets

Change History (9)

comment:1 Changed 5 months ago by alecmuffett

version: Dec 22 15:56:21.380 [notice] Tor 0.2.9.7-rc (git-6b6ad81c2e140d85) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1t and Zlib 1.2.8.

comment:2 Changed 5 months ago by alecmuffett

I can confirm that if I enable BOTH of these:

CircuitBuildTimeout 60
LearnCircuitBuildTimeout 0

The assertion does not fire; but this is contrary to documentation.

comment:3 Changed 5 months ago by asn

  • Component changed from Core Tor to Core Tor/Tor
  • Milestone set to Tor: 0.3.0.x-final
  • Points set to 0.2

Optimistically putting this in 0.3.0. Feel free to move it to later release, as it's not a critical thing.

comment:4 Changed 5 months ago by nickm

The right fix here, I think is to make circuit_build_times_disabled take or_options_t as an argument rather than grabbing it from get_options().

I'll take a patch for this if somebody submits one.

comment:5 Changed 5 months ago by teor

(If we fuzzed options_init on a regular basis, we might find annyoing bugs like this.)

comment:6 Changed 4 months ago by dgoulet

  • Cc dgoulet removed
  • Owner set to dgoulet
  • Status changed from new to accepted

See branch bug21062_030_01.

comment:7 Changed 4 months ago by dgoulet

  • Status changed from accepted to needs_review

comment:8 Changed 4 months ago by nickm

  • Resolution set to fixed
  • Status changed from needs_review to closed

lgtm; merged!

comment:9 Changed 11 days ago by arma

See #22252 where this bug remains.

Note: See TracTickets for help on using tickets.