[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #3197 [Tor bundles/installation]: m:/tor-mingw/tbb-erinn.git/build-scripts/build-stable-windows/built/share\tor\fallback-consensus
#3197: m:/tor-mingw/tbb-erinn.git/build-scripts/build-stable-
windows/built/share\tor\fallback-consensus
--------------------------------------+-------------------------------------
Reporter: arma | Owner: erinn
Type: defect | Status: new
Priority: normal | Milestone:
Component: Tor bundles/installation | Version:
Keywords: | Parent:
Points: | Actualpoints:
--------------------------------------+-------------------------------------
Comment(by Lee Fisher):
Here's some more background on when Tor tries to open the invalid erinn
path, showing the order of %APPDATA%\Tor\* files that Tor is trying to
open, before and after this invalid path.
Tor tries to open these non-existant files, in this order:
C:\Users\user\AppData\Roaming\tor\router-stability
C:\Users\user\AppData\Roaming\tor\geoip6
C:\Users\user\AppData\Roaming\tor\cached-certs
C:\Users\user\AppData\Roaming\tor\cached-status
C:\Users\user\AppData\Roaming\tor\cached-consensus
C:\Users\user\AppData\Roaming\tor\unverified-consensus
C:\Users\user\AppData\Roaming\tor\cached-microdesc-consensus
C:\Users\user\AppData\Roaming\tor\unverified-microdesc-consensus
C:\Users\erinn\build-scripts.git\osx-bundles\build-alpha\share\tor
\fallback-consensus
C:\Users\user\AppData\Roaming\tor\cached-microdescs
C:\Users\user\AppData\Roaming\tor\cached-microdescs.new
C:\Users\user\AppData\Roaming\tor\cached-descriptors
C:\Users\user\AppData\Roaming\tor\cached-extrainfo
All of these FILE_OPEN IRPs return STATUS_OBJECT_NAME_NOT_FOUND.
This is on a box with no active network, so, Tor's sockets are failing. No
previous successful online connection has ever occurred, so there are no
cached files, except what the Tor installer may've installed.
The only valid files in the initial Tor's user data directory are:
C:\Users\user\AppData\Roaming\tor\fingerprint
C:\Users\user\AppData\Roaming\tor\geoip
C:\Users\user\AppData\Roaming\tor\lock
C:\Users\user\AppData\Roaming\tor\state
C:\Users\user\AppData\Roaming\tor\torrc
C:\Users\user\AppData\Roaming\tor\keys\secret_id_key
C:\Users\user\AppData\Roaming\tor\keys\secret_onion_key
Perhaps the code that that makes the invalid erinn fallback-consensus open
is this block in or/networkstatus.c's
networkstatus_set_current_consensus()? It is at the end of a series of if
loops that check for known values of flavor, and this is the tail end,
with an unknown flavor value:
----snip----
} else {
cached_dir_t *cur;
char buf[128];
tor_snprintf(buf, sizeof(buf), "cached-%s-consensus", flavor);
consensus_fname = get_datadir_fname(buf);
tor_snprintf(buf, sizeof(buf), "unverified-%s-consensus", flavor);
unverified_fname = get_datadir_fname(buf);
cur = dirserv_get_consensus(flavor);
if (cur) {
current_digests = &cur->digests;
current_valid_after = cur->published;
}
----snip----
Given the code, and its previous 2 if blocks, and the previous 2 pairs of
open requests:
C:\Users\user\AppData\Roaming\tor\cached-consensus
C:\Users\user\AppData\Roaming\tor\unverified-consensus
C:\Users\user\AppData\Roaming\tor\cached-microdesc-consensus
C:\Users\user\AppData\Roaming\tor\unverified-microdesc-consensus
I would have expected the errin I/O to be this:
C:\Users\user\AppData\Roaming\tor\cached-fallback-consensus
C:\Users\user\AppData\Roaming\tor\cached-fallback-consensus
instead of:
C:\Users\erinn\build-scripts.git\osx-bundles\build-alpha\share\tor
\fallback-consensus
What is the value of 'flavor' when this happens? It is some GNU/Autotools
environment variable, that is much longer when you cross-compile on
MacOSX? The buffer here is hard-coded to 128 chars. Recall that MinGW
still uses the Microsoft C Runtime Library, not GLibC.
Maybe you can do some strlen/sizeof tests with the input const char
*flavor parameter, to see if this uninitialized buffer is big enough for
this flavor?
Maybe you should give some debug log info about this dangling else case
for flavors, since this is the only case where you don't explicitly check
for the flavor string.
Again, this bug is not specific to TBB, it applies to all Windows builds
of Tor.
Below is the Tor debug log of those files, from start-of-log until after
file I/O is done:
----snip----
Jan 20 20:53:57.000 [notice] Tor 0.2.4.6-alpha (git-b13c6becc892d971)
opening log file.
Jan 20 20:53:57.000 [debug] tor_disable_debugger_attach(): Attemping to
disable debugger attachment to Tor for unprivileged users.
Jan 20 20:53:57.000 [info] tor_lockfile_lock(): Locking
"C:\Users\user\AppData\Roaming\tor\lock"
Jan 20 20:53:57.000 [debug] parse_dir_server_line(): Trusted 100 dirserver
at 128.31.0.39:9131 (9695)
Jan 20 20:53:57.000 [debug] parse_dir_server_line(): Trusted 111 dirserver
at 86.59.21.38:80 (847B)
Jan 20 20:53:57.000 [debug] parse_dir_server_line(): Trusted 102 dirserver
at 194.109.206.212:80 (7EA6)
Jan 20 20:53:57.000 [debug] parse_dir_server_line(): Trusted 16 dirserver
at 82.94.251.203:80 (4A0C)
Jan 20 20:53:57.000 [debug] parse_dir_server_line(): Trusted 100 dirserver
at 76.73.17.194:9030 (F397)
Jan 20 20:53:57.000 [debug] parse_dir_server_line(): Trusted 100 dirserver
at 212.112.245.170:80 (F204)
Jan 20 20:53:57.000 [debug] parse_dir_server_line(): Trusted 100 dirserver
at 193.23.244.244:80 (7BE6)
Jan 20 20:53:57.000 [debug] parse_dir_server_line(): Trusted 100 dirserver
at 208.83.223.34:443 (0AD3)
Jan 20 20:53:57.000 [debug] parse_dir_server_line(): Trusted 100 dirserver
at 171.25.193.9:443 (BD6A)
Jan 20 20:53:57.000 [debug] parse_dir_server_line(): Trusted 100 dirserver
at 154.35.32.5:80 (CF6D)
Jan 20 20:53:57.000 [info] or_state_load(): Loaded state from
"C:\Users\user\AppData\Roaming\tor\state"
Jan 20 20:53:57.000 [debug] circuit_build_times_disabled():
CircuitBuildTime learning is not disabled. Consensus=0, Config=0,
AuthDir=0, StateFile=0
Jan 20 20:53:57.000 [debug] circuit_build_times_disabled():
CircuitBuildTime learning is not disabled. Consensus=0, Config=0,
AuthDir=0, StateFile=0
Jan 20 20:53:57.000 [info] circuit_build_times_parse_state(): Adding 0
timeouts.
Jan 20 20:53:57.000 [info] circuit_build_times_parse_state(): Loaded 0/0
values from 0 lines in circuit time histogram
Jan 20 20:53:57.000 [debug] circuit_build_times_disabled():
CircuitBuildTime learning is not disabled. Consensus=0, Config=0,
AuthDir=0, StateFile=0
Jan 20 20:53:57.000 [info] read_file_to_str(): Could not open
"C:\Users\user\AppData\Roaming\tor\router-stability": No such file or
directory
Jan 20 20:53:57.000 [info] cell_ewma_set_scale_factor(): Disabled
cell_ewma algorithm because of value in Default value
Jan 20 20:53:57.000 [notice] Parsing GEOIP IPv4 file
C:\Users\user\AppData\Roaming\tor\geoip.
Jan 20 20:53:57.000 [info] geoip_load_file(): Failed to open GEOIP file
C:\Users\user\AppData\Roaming\tor\geoip6.
Jan 20 20:53:57.000 [info] crypto_global_init(): OpenSSL version matches
version from headers (1000103f: OpenSSL 1.0.1c 10 May 2012).
Jan 20 20:53:57.000 [info] crypto_global_init(): NOT using OpenSSL engine
support.
Jan 20 20:53:57.000 [info] evaluate_evp_for_aes(): This version of OpenSSL
has a known-good EVP counter-mode implementation. Using it.
Jan 20 20:53:59.000 [info] tor_tls_init(): OpenSSL OpenSSL 1.0.1c 10 May
2012 looks like version 0.9.8m or later; I will try SSL_OP to enable
renegotiation
Jan 20 20:53:59.000 [debug] mp_pool_new(): Capacity is 251, item size is
520, alloc size is 130520
Jan 20 20:53:59.000 [info] Bootstrapped 0%: Starting.
Jan 20 20:53:59.000 [info] read_file_to_str(): Could not open
"C:\Users\user\AppData\Roaming\tor\cached-certs": No such file or
directory
Jan 20 20:53:59.000 [info] read_file_to_str(): Could not open
"C:\Users\user\AppData\Roaming\tor\cached-consensus": No such file or
directory
Jan 20 20:53:59.000 [info] read_file_to_str(): Could not open
"C:\Users\user\AppData\Roaming\tor\unverified-consensus": No such file or
directory
Jan 20 20:53:59.000 [info] read_file_to_str(): Could not open
"C:\Users\user\AppData\Roaming\tor\cached-microdesc-consensus": No such
file or directory
Jan 20 20:53:59.000 [info] read_file_to_str(): Could not open
"C:\Users\user\AppData\Roaming\tor\unverified-microdesc-consensus": No
such file or directory
Jan 20 20:53:59.000 [info] read_file_to_str(): Could not open
"c:/Users/erinn/build-scripts.git/osx-bundles/build-alpha/share\tor
\fallback-consensus": No such file or directory
Jan 20 20:53:59.000 [info] tor_mmap_file(): Couldn't mmap file
"C:\Users\user\AppData\Roaming\tor\cached-microdescs": The system cannot
find the file specified.
Jan 20 20:53:59.000 [info] read_file_to_str(): Could not open
"C:\Users\user\AppData\Roaming\tor\cached-microdescs.new": No such file or
directory
Jan 20 20:53:59.000 [info] microdesc_cache_reload(): Reloaded
microdescriptor cache. Found 0 descriptors.
Jan 20 20:53:59.000 [info] tor_mmap_file(): Couldn't mmap file
"C:\Users\user\AppData\Roaming\tor\cached-descriptors": The system cannot
find the file specified.
Jan 20 20:53:59.000 [info] tor_mmap_file(): Couldn't mmap file
"C:\Users\user\AppData\Roaming\tor\cached-extrainfo": The system cannot
find the file specified.
Jan 20 20:53:59.000 [info] I learned some more directory information, but
not enough to build a circuit: We have no usable consensus.
Jan 20 20:54:01.000 [info] update_consensus_networkstatus_downloads():
Launching microdesc networkstatus consensus download.
Jan 20 20:54:01.000 [info] router_pick_directory_server(): No reachable
router entries for dirservers. Trying them all again.
Jan 20 20:54:01.000 [info] directory_get_from_dirserver(): No router found
for consensus network-status fetch; falling back to dirserver list.
Jan 20 20:54:01.000 [debug] directory_initiate_command_rend(): anonymized
0, use_begindir 1.
Jan 20 20:54:01.000 [debug] directory_initiate_command_rend(): Initiating
consensus network-status fetch
Jan 20 20:54:01.000 [info] connection_ap_make_link(): Making internal
direct tunnel to [scrubbed]:80 ...
Jan 20 20:54:01.000 [debug] connection_add_impl(): new conn type Socks,
socket -1, address (Tor_internal), n_conns 2.
Jan 20 20:54:01.000 [debug] circuit_get_open_circ_or_launch(): considering
1, $BD6A829255CB08E66FBE7D3748363586E46B3810
Jan 20 20:54:01.000 [debug] onion_pick_cpath_exit(): Launching a one-hop
circuit for dir tunnel.
Jan 20 20:54:01.000 [info] onion_pick_cpath_exit(): Using requested exit
node '$BD6A829255CB08E66FBE7D3748363586E46B3810~BD6A829255CB08E66FB at
171.25.193.9'
Jan 20 20:54:01.000 [debug] onion_extend_cpath(): Path is 0 long; we want
1
<Rest of log omitted; it'll go on forever like this without working
sockets...>
----snip----
Thanks,
Lee
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/3197#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs