[warn] Remote server sent bogus reason code 65021
On my Tor client running 0.2.9.3-alpha-dev (git-bfaded9143d127cb) on a really crummy network, I got a string of 65 of these lines:
Oct 06 16:21:58.020 [warn] Remote server sent bogus reason code 65021 Oct 06 16:21:59.027 [warn] Remote server sent bogus reason code 65021 ...
In fact, I got one of those warns per second for 65 seconds.
But when I look at the more detailed logs for the first one, I see
Oct 06 16:21:58.020 [info] circuit_build_failed(): Our circuit failed to get a response from the first hop (18.104.22.168:443). I'm going to try to rotate to a better connection. Oct 06 16:21:58.020 [info] entry_guard_register_connect_status(): Unable to connect to entry guard 'Alastor' (2EB3C230180694A1E848001E20F36F76A2287039). Marking as unreachable. Oct 06 16:21:58.020 [warn] Remote server sent bogus reason code 65021 Oct 06 16:21:58.020 [debug] circuit_get_by_circid_channel_impl(): circuit_get_by_circid_channel_impl() returning circuit 0x7fda41028de0 for circ_id 3884794536, channel ID 1 (0x7fda41c62410) Oct 06 16:21:58.020 [debug] circuitmux_append_destroy_cell(): Cmux at 0x7fda41c625d0 queued a destroy for circ 3884794536, cmux counter is now 1, global counter is now 1 Oct 06 16:21:58.020 [debug] channel_send_destroy(): Sending destroy (circID 3884794536) on channel 0x7fda41c62410 (global ID 1)
So it would seem that no "end" cell was received at all. Maybe we are setting END_CIRC_REASON_FLAG_REMOTE somewhere where we shouldn't? Also, what is the mechanism by which the number makes it all the way up to 65021?