[tor-bugs] #33752 [Applications/Tor Browser]: Electrum-NMC tries to connect before Tor has connected
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sat Apr 4 04:25:18 UTC 2020
#33752: Electrum-NMC tries to connect before Tor has connected
--------------------------------------+--------------------------
Reporter: JeremyRand | Owner: tbb-team
Type: defect | Status: new
Priority: Medium | Milestone:
Component: Applications/Tor Browser | Version:
Severity: Normal | Resolution:
Keywords: namecoin | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------------------+--------------------------
Comment (by JeremyRand):
> I'm going to put this bug on hold
Lies! :) I actually did spend a bit more time debugging this. The truth
(as I currently understand it) actually is somewhere between my original
statement and my follow-up.
So, it's true that `name_show` is affected while other RPC commands are
not. However, this isn't due to any of the `name_show` inefficiencies,
it's because `name_show` uses stream isolation in a slightly different way
than the other RPC methods do. The actual bug is that, generally
speaking, the first server connection succeeds, while all of the others
get stalled; `name_show`'s stream isolation code relies on a server
connection other than the first being active, while the other RPC commands
work fine if the first connection is active. 'Twas fun to debug that.
Anyway, I was able to prototype a patch for Electrum-NMC that keeps the
network paused on initial launch until the Tor daemon has connected. This
decreases the startup delay between double-clicking the Tor Browser icon
and Namecoin resolution being available from ~55 seconds to ~6 seconds.
The prototype patch is not really in a state where it could be merged,
it's solely to test that the approach works. I'll send in a proper patch
sometime soon.
In terms of upstream Electrum, Ghost really wants to know why it's hanging
to begin with, rather than just going with a workaround patch without
understanding the causes. So I'll probably spend some time tracing what's
going on there, in the hopes that either we can fix the underlying
breakage, or get a patch merged to upstream Electrum. Not sure when I'll
get to this though.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33752#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list