Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #6816

Closed (moved)
(moved)
Open
Created Sep 12, 2012 by Andrea Shepard@andrea

{connection_or,channel}_flush_from_first_active_circuit() should pick a new circuit for each cell

Before channels, this function was always called with max == 1; during the course of testing channels I discovered that it is broken with max > 1.

We pick cell_ewma once per invocation:

https://gitweb.torproject.org/tor.git/blob/75c9ccd4f851bac6d32cb08ded557ac207bc8002:/src/or/relay.c#l2412

Then once per cell, we pop the head of the pqueue and re-add it (to get it to its new correct position):

https://gitweb.torproject.org/tor.git/blob/75c9ccd4f851bac6d32cb08ded557ac207bc8002:/src/or/relay.c#l2479

... but if the new position is not the head of the queue, we don't change cell_ewma and we continue sending from the same circuit - and then the assert fails the next time around.

This function should be refactored to not do this and to separate the policy choice of what priority order to impose on circuits from the mechanism of picking a circuit, pulling cells off it and sending them down the wire.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking