Opened 8 months ago

Closed 4 months ago

#25237 closed defect (fixed)

spec: Document our circuit close reasons

Reported by: dgoulet Owned by: rl1987
Priority: Medium Milestone: Tor: 0.3.4.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-spec, 034-triage-20180328, 034-removed-20180328
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


In or.h, we define the reason to close a circuit:

/* Reasons why we (or a remote OR) might close a circuit. See tor-spec.txt for
 * documentation of these. */
#define END_CIRC_REASON_MIN_            0
#define END_CIRC_REASON_NONE            0

Even though it says "See tor-spec.txt", those values aren't defined at all in tor-spec.txt, only the stream reasons are.

This is a bit annoying because these values don't have any documentation on why and when they should be used.

Child Tickets

Change History (6)

comment:1 Changed 7 months ago by nickm

Keywords: 034-triage-20180328 added

comment:2 Changed 7 months ago by nickm

Keywords: 034-removed-20180328 added

Per our triage process, these tickets are pending removal from 0.3.4.

comment:3 Changed 6 months ago by nickm

Milestone: Tor: 0.3.4.x-finalTor: unspecified

These tickets, tagged with 034-removed-*, are no longer in-scope for 0.3.4. We can reconsider any of them, if time permits.

comment:4 Changed 5 months ago by rl1987

Owner: set to rl1987
Status: newaccepted

comment:5 Changed 5 months ago by rl1987

Status: acceptedneeds_review

The circuit closing reason codes are actually documented in tor-spec.txt:

1337    The error codes are:
1338      0 -- NONE            (No reason given.)
1339      1 -- PROTOCOL        (Tor protocol violation.)
1340      2 -- INTERNAL        (Internal error.)
1341      3 -- REQUESTED       (A client sent a TRUNCATE command.)
1342      4 -- HIBERNATING     (Not currently operating; trying to save bandwidth.)
1343      5 -- RESOURCELIMIT   (Out of memory, sockets, or circuit IDs.)
1344      6 -- CONNECTFAILED   (Unable to reach relay.)
1345      7 -- OR_IDENTITY     (Connected to relay, but its OR identity was not
1346                            as expected.)
1347      8 -- OR_CONN_CLOSED  (The OR connection that was carrying this circuit
1348                            died.)
1349      9 -- FINISHED        (The circuit has expired for being dirty or old.)
1350     10 -- TIMEOUT         (Circuit construction took too long)
1351     11 -- DESTROYED       (The circuit was destroyed w/o client TRUNCATE)
1352     12 -- NOSUCHSERVICE   (Request for unknown hidden service)

I updated the comment to let the reader know where to look:

comment:6 Changed 4 months ago by nickm

Milestone: Tor: unspecifiedTor: 0.3.4.x-final
Resolution: fixed
Status: needs_reviewclosed

LGTM; merged to master!

Note: See TracTickets for help on using tickets.