Opened 4 years ago

Last modified 22 months ago

#14223 new defect

END_STREAM_REASON_TIMEOUT blurs together two very different error cases

Reported by: arma Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor: 0.2.7
Severity: Normal Keywords: tor-client error-case needs-spec
Cc: Actual Points:
Parent ID: Points: 0.1
Reviewer: Sponsor:

Description

Here's one case where END_STREAM_REASON_TIMEOUT is used (in connection_ap_expire_beginning()):

      if (seconds_since_born >= options->SocksTimeout) {
        log_fn(severity, LD_APP,
            "Tried for %d seconds to get a connection to %s:%d. "
            "Giving up. (%s)",
            seconds_since_born,
            safe_str_client(entry_conn->socks_request->address),
            entry_conn->socks_request->port,
            conn_state_to_string(CONN_TYPE_AP, base_conn->state));
        connection_mark_unattached_ap(entry_conn, END_STREAM_REASON_TIMEOUT);
      }

And here's a second case where it is used, in errno_to_stream_end_reason():

    S_CASE(ETIMEDOUT):
      return END_STREAM_REASON_TIMEOUT;

That first case is a client-side timeout -- e.g. we didn't get a useful circuit. That second case is an exit-side timeout -- we got a circuit, sent the begin cell, and the exit got a tcp timeout failure making the connection to the destination.

We should be helping the controller distinguish between these two cases.

Child Tickets

Change History (17)

comment:1 Changed 4 years ago by nickm

Milestone: Tor: 0.2.???Tor: 0.2.7.x-final

These may be worth looking at for 0.2.7.

comment:2 Changed 4 years ago by nickm

Status: newassigned

comment:3 Changed 4 years ago by nickm

Keywords: 027-triaged-1-in added

Marking more tickets as triaged-in for 0.2.7

comment:4 Changed 4 years ago by isabela

Points: small
Version: Tor: 0.2.7

comment:5 Changed 4 years ago by nickm

Milestone: Tor: 0.2.7.x-finalTor: 0.2.8.x-final

comment:6 Changed 3 years ago by nickm

Keywords: 028-triaged added

comment:7 Changed 3 years ago by nickm

Keywords: SponsorR removed
Sponsor: SponsorR

Bulk-replace SponsorR keyword with SponsorR sponsor field in Tor component.

comment:8 Changed 3 years ago by dgoulet

Keywords: 027-triaged-1-in removed

comment:9 Changed 3 years ago by nickm

Milestone: Tor: 0.2.8.x-finalTor: 0.2.???

It is impossible that we will fix all 252 currently open 028 tickets before 028 releases. Time to move some out. This is my first pass through the "assigned" tickets with no owner, looking for things to move to ???.

If somebody thinks they can get these done before the 0.2.8 timeout, please assign it to yourself and move it back?

comment:10 Changed 3 years ago by dgoulet

Sponsor: SponsorRSponsorR-can

Move those from SponsorR to SponsorR-can.

comment:11 Changed 2 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:12 Changed 2 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:13 Changed 22 months ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:14 Changed 22 months ago by nickm

Keywords: 028-triaged removed

comment:15 Changed 22 months ago by nickm

Status: assignednew

Change the status of all assigned/accepted Tor tickets with owner="" to "new".

comment:16 Changed 22 months ago by dgoulet

Points: small0.1
Severity: Normal
Sponsor: SponsorR-can

comment:17 Changed 22 months ago by nickm

Keywords: error-case needs-spec added
Note: See TracTickets for help on using tickets.