Detect if we try to put a cell onto a supposedly blocked cell queue.

When this happens, run through the streams on the circuit and make
sure they're all blocked.  If some aren't, that's a bug: block them
all and log it!  If they all are, where did the cell come from?  Log
it!

(I suspect that this actually happens pretty frequently, so I'm making
these log messages appear at INFO.)
This commit is contained in:
Nick Mathewson
2010-08-18 14:20:49 -04:00
parent 80391b88a5
commit 8782dcf6a2
2 changed files with 32 additions and 3 deletions
+8
View File
@@ -0,0 +1,8 @@
o Major bugfixes:
- Newly created streams were allowed to read cells onto circuits,
even if the circuit's cell queue was blocked and waiting to drain.
This created potential unfairness, as older streams would be
blocked, but newer streams would gladly fill the queue completely.
We add code to detect this situation and prevent any stream from
getting more than one free cell. Bugfix on 0.2.0.1-alpha.
Possible partial fix for bug 1298.