Merge branch 'maint-0.2.8' into release-0.2.8
This commit is contained in:
commit
7df4f23d95
|
@ -0,0 +1,6 @@
|
||||||
|
o Major bugfixes (relay, OOM handler):
|
||||||
|
- Fix a timing-dependent assertion failure that could occur when we
|
||||||
|
tried to flush from a circuit after having freed its cells because
|
||||||
|
of an out-of-memory condition. Fixes bug 20203; bugfix on
|
||||||
|
0.2.8.1-alpha. Thanks to "cypherpunks" for help diagnosing this
|
||||||
|
one.
|
|
@ -1918,8 +1918,14 @@ marked_circuit_free_cells(circuit_t *circ)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cell_queue_clear(&circ->n_chan_cells);
|
cell_queue_clear(&circ->n_chan_cells);
|
||||||
if (! CIRCUIT_IS_ORIGIN(circ))
|
if (circ->n_mux)
|
||||||
cell_queue_clear(& TO_OR_CIRCUIT(circ)->p_chan_cells);
|
circuitmux_clear_num_cells(circ->n_mux, circ);
|
||||||
|
if (! CIRCUIT_IS_ORIGIN(circ)) {
|
||||||
|
or_circuit_t *orcirc = TO_OR_CIRCUIT(circ);
|
||||||
|
cell_queue_clear(&orcirc->p_chan_cells);
|
||||||
|
if (orcirc->p_mux)
|
||||||
|
circuitmux_clear_num_cells(orcirc->p_mux, circ);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t
|
static size_t
|
||||||
|
|
|
@ -2615,6 +2615,15 @@ channel_flush_from_first_active_circuit, (channel_t *chan, int max))
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Circuitmux told us this was active, so it should have cells */
|
/* Circuitmux told us this was active, so it should have cells */
|
||||||
|
if (/*BUG(*/ queue->n == 0 /*)*/) {
|
||||||
|
log_warn(LD_BUG, "Found a supposedly active circuit with no cells "
|
||||||
|
"to send. Trying to recover.");
|
||||||
|
circuitmux_set_num_cells(cmux, circ, 0);
|
||||||
|
if (! circ->marked_for_close)
|
||||||
|
circuit_mark_for_close(circ, END_CIRC_REASON_INTERNAL);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
tor_assert(queue->n > 0);
|
tor_assert(queue->n > 0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue