I'm seeing these warnings in chutney on recent tor releases.
They seem to have appeared in the last week or two.
Did we merge something that tries to block single-hop exits recently?
Or any changes to circuit creation code?
Because I think it might be buggy.
Warning: Attempt by 127.0.0.1:59488 to open a stream on first hop of circuit. Closing. Number: 1Warning: circuit_receive_relay_cell (backward) failed. Closing. Number: 1
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.
Also, we recently changed how relays identify clients. So it might be related to that as well.
I'd check if relays that are bootstrapping (using CREATE_FAST) really do authenticate to the first peer, and that their relay flag is set correctly on the remote peer.
From the warning, the previous hop on the circuit was indeed marked as a client that is:
const int client_chan = channel_is_client(or_circ->p_chan); if ((client_chan || ...)
There are two ways this can be done, through a CREATE/CREATE_FAST/CREATE2 cell which in that case the previous hops is indeed a client or with a unauthenticated connection that is a client or bridge where the connection is marked when the NETINFO cell comes in.
In both cases, the channel is supposed to be a client and not end up with a BEGIN cell at a one hop Exit...
I'm a bit puzzled here on how this can happen, I suspect that we might only see this with chutney (TestingNetwork) because I don't see how client can just start doing one-hop Exit...?
I think this might be happening because some relay connections are not mutually authenticated.
One possible reason is that chutney sets AssumeReachable, which makes relays start up much faster.
We also run really fast consensus intervals, which can cause race conditions like this.
We should check what it takes for a relay to authenticate - maybe this happens when we don't have relay microdescs (and therefore relay ed keys?)
I haven't seen this error in earlier versions, so it may be something new.
Or it might have always been there, but we're seeing it now, because we have a stricter definition of is_client.
Leaving behind the CREATE and CREATE2 that also makes a channel being marked as a client. This was modified after we removed AllowSingleHopExits with commit: d52a1e2faaf
So now the question is still how did the channel on the OR connection got flagged as a client?
Just saw it on master - it's a race condition that seems to happen under heavy CPU load:
PASS: bridges+ipv6-minDetail: chutney/tools/warnings.sh /Users/dev/tor/../chutney/tools/../net/nodes.1513124118Warning: Attempt by 127.0.0.1:51534 to open a stream on first hop of circuit. Closing. Number: 1Warning: circuit_receive_relay_cell (backward) failed. Closing. Number: 1
Ok I've tried a lot in the last hour to hit it and I can't... What I'm trying to get is the debug logs out of it but it could be slowing things down enough to never hit it :S ... If you are ever able to get it with debug, I'll gladly eat those ;).
Ok, I just noticed 4 of those today in a span of ~3 hours. IPs there are public relays (and some we know personally so I doubt this is malicious):
Dec 14 14:49:57.994 [warn] Attempt by 137.205.124.35:30658 to open a stream on first hop of circuit. Closing.Dec 14 15:44:01.534 [warn] Attempt by 109.105.109.162:36601 to open a stream on first hop of circuit. Closing.Dec 14 17:08:05.864 [warn] Attempt by 217.182.196.67:64478 to open a stream on first hop of circuit. Closing.Dec 14 17:11:09.928 [warn] Attempt by 85.25.43.31:443 to open a stream on first hop of circuit. Closing.
Something is clearly not right and I fear we might have a more important bug than we originally thought especially if this is linked to relay authentication. Those 4 relays above are on 0.3.1.x series.
Trac: Status: needs_information to new Priority: Medium to High