When a Unix domain socket is used for the SocksPort, a soft assertion is triggered inside tor_addr_compare_masked(). Log message:
Sep 28 11:34:45.000 [warn] tor_bug_occurred_(): Bug: src/common/address.c:1119: tor_addr_compare_masked: This line should not have been reached. (Future instances of this warning will be silenced.) (on Tor 0.2.9.2-alpha 00ec701f8343f552)
The config used is:
SocksPort unix:/Users/.../TorBrowser-Data/Tor/socks.socket IPv6Traffic PreferIPv6 KeepAliveIsolateSOCKSAuth
For more details, see: ticket:20111#comment:13
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
This is ugly because we never bothered to treat AF_UNIX as a full class citizen. In particular tor_addr_t doesn't contain the path at all, so when we go to compare them, there isn't any information regarding the address beyond the family.
The correct solution is probably to extend tor_addr_t to Do The Right Thing, but this branch should cover Tor Browser's use cases. The first commit is probably safe to take since it's the IsolateClientAddr change, the second may be more controversial.
In case there are other places in the code --or there later become places in the code! -- where we compare two AF_UNIX addresses, maybe we should make them turn out unequal by default? I think that missing a match is probably safer than reporting a spurious match, right? If you agree, I'll switch the hack to do a pointer comparison.
(Also, a note on tor_addr_t : the main reason to use tor_addr_t at all, instead of sockaddr_storage, was to keep it small in the case where we need to create a zillion of them. So if we're going to make AF_UNIX firstclass, we'll need some other approach to keeping it small.)
I encountered another one of these when testing tor master with Tor Browser:
Oct 28 10:38:31.000 [warn] tor_bug_occurred_: Bug: src/or/connection_edge.c:1593: connection_ap_handshake_rewrite_and_attach: This line should not have been reached. (Future instances of this warning will be silenced.) (on Tor 0.3.0.0-alpha-dev f3e158edf7d8128d)
I will attach the stack trace that was logged.
Should I open a new ticket or should I reopen this one?
I encountered another one of these when testing tor master with Tor Browser:
Oct 28 10:38:31.000 [warn] tor_bug_occurred_: Bug: src/or/connection_edge.c:1593: connection_ap_handshake_rewrite_and_attach: This line should not have been reached. (Future instances of this warning will be silenced.) (on Tor 0.3.0.0-alpha-dev f3e158edf7d8128d)
I will attach the stack trace that was logged.
Should I open a new ticket or should I reopen this one?
Looks like a completely different issue. Please open a new ticket.
(I'm not sure why that assertion is even there.)