Intermittent crash when selected guard lacks a descriptor or routerstatus
I see this crash when running make test-network-all with the latest master:
Feb 01 16:53:22.000 [info] choose_good_exit_server_general(): Chose exit server '$65B77ACB2E202F610D3D7D12CA7BA1269C945DEB~test002r at 127.0.0.1'
Feb 01 16:53:22.000 [debug] extend_info_from_node(): using 127.0.0.1:5002 for test002r
Feb 01 16:53:22.000 [info] extend_info_from_node(): Including Ed25519 ID for $65B77ACB2E202F610D3D7D12CA7BA1269C945DEB~test002r at 127.0.0.1
Feb 01 16:53:22.000 [debug] onion_extend_cpath(): Path is 0 long; we want 3
Feb 01 16:53:22.000 [info] select_entry_guard_for_circuit(): Selected primary guard test000a ($02C177E1A8001A62F9476B8BCFC80B6A7F45AFB8) for circuit.
Feb 01 16:53:22.000 [err] tor_assertion_failed_(): Bug: src/or/circuitbuild.c:2372: onion_extend_cpath: Assertion info || client failed; aborting. (on Tor 0.3.0.2-alpha-dev 6dd7e66019e9aa53)
Feb 01 16:53:22.000 [err] Bug: Assertion info || client failed in onion_extend_cpath at src/or/circuitbuild.c:2372. Stack trace: (on Tor 0.3.0.2-alpha-dev 6dd7e66019e9aa53)
Feb 01 16:53:22.000 [err] Bug: 0 tor 0x000000010872ad34 log_backtrace + 68 (on Tor 0.3.0.2-alpha-dev 6dd7e66019e9aa53)
It appears that this check in extend_info_from_node is failing:
if (node->ri == NULL && (node->rs == NULL || node->md == NULL))
return NULL;
We really shouldn't be selecting a guard unless it passes this test.