Skip to content
Snippets Groups Projects
Commit 1c7c166e authored by Mike Perry's avatar Mike Perry
Browse files

LOGGING HACK: Confirm that #40842 circ is marked for close and find where

parent 4119a7f9
No related branches found
No related tags found
No related merge requests found
Pipeline #99080 skipped
......@@ -38,10 +38,24 @@ circuit_get_package_window(circuit_t *circ,
tor_assert_nonfatal(circ->purpose ==
CIRCUIT_PURPOSE_CONFLUX_LINKED);
}
circuit_t *orig_circ = circ;
circ = conflux_decide_next_circ(circ->conflux);
/* If conflux has no circuit to send on, the package window is 0. */
if (!circ) {
if (!orig_circ->conflux->curr_leg) {
if (orig_circ->marked_for_close) {
log_warn(LD_BUG, "Conflux has no circuit to send on. "
"Circuit %p idx %d marked at line %s:%d",
orig_circ, orig_circ->global_circuitlist_idx,
orig_circ->marked_for_close_file,
orig_circ->marked_for_close);
} else {
log_warn(LD_BUG, "Conflux has no circuit to send on. "
"Circuit %p idx %d not marked for close.",
orig_circ, orig_circ->global_circuitlist_idx);
}
}
return 0;
}
......@@ -76,6 +90,10 @@ conflux_can_send(conflux_t *cfx)
if (send_circ) {
return true;
} else {
if (BUG(!cfx->in_full_teardown && !cfx->curr_leg)) {
log_fn(LOG_WARN,
LD_BUG, "Conflux has no current circuit to send on. ");
}
return false;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment