Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#4710 closed defect (fixed)

Tor does not convert TCP socket exhaustion to END_STREAM_REASON_RESOURCELIMIT

Reported by: mikeperry Owned by: rransom
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: easy tor-relay
Cc: nickm, arma, mo Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Moritz has reported the appearance of warns to the effect of "[warn] Error binding network socket: Address already in use" recently as a result of the PID feedback experiment. We could implement a feedback cap for nodes that hit this exhaustion, if we could detect it using stream end reasons (#4709).

However, in errno_to_stream_end_reason(), it looks like Tor does not have a case covering "Address already in use" (EADDRINUSE and possibly also EADDRNOTAVAIL), which seems to be the errno Moritz's Ubuntu server is choosing when it runs out of TCP source ports.

I'd add these cases myself, but I am not sure if it should be an E_CASE or S_CASE, and I'm also not sure if the TCP source port exhaustion errno is always the same EADDRINUSE across all platforms, or just on Linux. It seems like a weird choice to me.

Child Tickets

Change History (9)

comment:1 Changed 9 years ago by mikeperry

Cc: mo added; gamambel removed

comment:2 Changed 9 years ago by rransom

Owner: set to rransom
Status: newassigned

comment:3 Changed 8 years ago by nickm

Milestone: Tor: 0.2.2.x-final

Worth doing! rransom, do you still want to have this assigned to you? It looks like it's pretty easy; someone else could take it if you don't have time.

comment:4 Changed 8 years ago by mikeperry

Keywords: easy added

comment:5 Changed 8 years ago by nickm

Status: assignedneeds_review

Branch in bug4710; please review. I have tested that it compiles on Linux and Windows (mingw).

comment:6 Changed 8 years ago by nickm

Milestone: Tor: 0.2.2.x-finalTor: 0.2.3.x-final

comment:7 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merging into 0.2.3.x.

comment:8 Changed 8 years ago by nickm

Keywords: tor-relay added

comment:9 Changed 8 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.