[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #21394 [Core Tor/Tor]: connection timeouts are affecting Tor Browser usability



#21394: connection timeouts are affecting Tor Browser usability
--------------------------------------------+---------------------
 Reporter:  arthuredelstein                 |          Owner:
     Type:  defect                          |         Status:  new
 Priority:  Medium                          |      Milestone:
Component:  Core Tor/Tor                    |        Version:
 Severity:  Normal                          |     Resolution:
 Keywords:  tbb-performance, tbb-usability  |  Actual Points:
Parent ID:                                  |         Points:
 Reviewer:                                  |        Sponsor:
--------------------------------------------+---------------------
Description changed by arthuredelstein:

Old description:

> I have spent some time watching circuit and stream events while
> connecting to different sites. I telnet into tor's config port using the
> following command:
> {{{
> telnet localhost 9151 | ts
> }}}
> I open the browser console and get the tor password by entering
> `m_tb_control_pass`
> And then I paste the result like this:
> `authenticate [value of m_tb_control_pass]`
> Finally I enter
> `setevents circ stream`.
>
> What I noticed is that a significant fraction of new site connections
> result in at least 1 timeout of 10 seconds. (Tor Browser's
> CircuitStreamTimeout is set to 0, which results in a timeout equal to
> MIN_CIRCUIT_STREAM_TIMEOUT, or 10 seconds.) Here's what it looks like:
> {{{
> Feb 03 19:00:03 650 STREAM 868 NEW 0 people.torproject.org:443
> SOURCE_ADDR=127.0.0.1:50318 PURPOSE=USER
> Feb 03 19:00:03 650 CIRC 149 LAUNCHED BUILD_FLAGS=NEED_CAPACITY
> PURPOSE=GENERAL TIME_CREATED=2017-02-04T03:00:03.738597
> Feb 03 19:00:03 650 CIRC 149 EXTENDED [...] BUILD_FLAGS=NEED_CAPACITY
> PURPOSE=GENERAL TIME_CREATED=2017-02-04T03:00:03.738597
> SOCKS_USERNAME="torproject.org"
> SOCKS_PASSWORD="7d8ea4ccf4ba6345846e0fccacd4d941"
> Feb 03 19:00:04 650 CIRC 149 EXTENDED [...] BUILD_FLAGS=NEED_CAPACITY
> PURPOSE=GENERAL TIME_CREATED=2017-02-04T03:00:03.738597
> SOCKS_USERNAME="torproject.org"
> SOCKS_PASSWORD="7d8ea4ccf4ba6345846e0fccacd4d941"
> Feb 03 19:00:04 650 CIRC 149 EXTENDED [...] BUILD_FLAGS=NEED_CAPACITY
> PURPOSE=GENERAL TIME_CREATED=2017-02-04T03:00:03.738597
> SOCKS_USERNAME="torproject.org"
> SOCKS_PASSWORD="7d8ea4ccf4ba6345846e0fccacd4d941"
> Feb 03 19:00:04 650 CIRC 149 BUILT [...] BUILD_FLAGS=NEED_CAPACITY
> PURPOSE=GENERAL TIME_CREATED=2017-02-04T03:00:03.738597
> SOCKS_USERNAME="torproject.org"
> SOCKS_PASSWORD="7d8ea4ccf4ba6345846e0fccacd4d941"
> Feb 03 19:00:04 650 STREAM 868 SENTCONNECT 149 people.torproject.org:443
> Feb 03 19:00:13 650 CIRC 80 CLOSED [...] BUILD_FLAGS=NEED_CAPACITY
> PURPOSE=GENERAL TIME_CREATED=2017-02-04T02:49:06.591888
> SOCKS_USERNAME="torproject.org"
> SOCKS_PASSWORD="5e171046f4d18a1138280b0199e5ccbd" REASON=FINISHED
> Feb 03 19:00:14 650 STREAM 868 DETACHED 149 people.torproject.org:443
> REASON=TIMEOUT
> Feb 03 19:00:14 650 CIRC 150 LAUNCHED BUILD_FLAGS=NEED_CAPACITY
> PURPOSE=GENERAL TIME_CREATED=2017-02-04T03:00:14.588714
> }}}
>
> I did an experiment where I connected to
> people.torproject.org/~arthuredelstein (a page with hardly any content)
> and then repeatedly selected "New Tor Circuit for this Site" 50 times.
>
> Here are the results for 50 reloads. Each digit represents the number of
> 10-second stream timeouts observed before a given connection succeeded.
> 20020000000000000000002010000000000001000100000103
>
> In other words 8 out of 50 connections showed a timeout. And
> interestingly, four of these connections exhibited a double or triple
> timeout (20 or 30 seconds delay).
>
> I think this may be a big part of the perception of Tor Browser as
> "slow". Actual loading of pages doesn't seem drastically slow to me, and
> once I have successfully connected to a new site, following links to
> other pages on the same site (i.e., the same circuit) is usually
> acceptable.
>
> (I also did another quick test on another site and 5/25 connections had
> at least 1 timeout.)
>
> So here are some questions for further investigation:
> * Why are there so many timeouts? Are any of these timeouts due to silent
> errors in a Tor node? (If such errors could be reported, maybe we could
> avoid the long timeout.)
> * What's the reason for MIN_CIRCUIT_STREAM_TIMEOUT being 10 seconds?
> Would it do any harm to make this shorter, say 5 seconds or 2 seconds?
> * So many double or triple timeouts are suspicious, because they are
> using different circuits. Could this mean the connection error is caused
> by the client or guard?

New description:

 I have spent some time watching circuit and stream events while connecting
 to different sites. I telnet into tor's config port using the following
 command (using ts to give time stamps):
 {{{
 telnet localhost 9151 | ts
 }}}
 I open the browser console and get the tor password by entering
 `m_tb_control_pass`
 And then I paste the result like this:
 `authenticate [value of m_tb_control_pass]`
 Finally I enter
 `setevents circ stream`.

 What I have noticed is that a significant fraction of new site connections
 result in at least 1 timeout of 10 seconds. (Tor Browser's
 CircuitStreamTimeout is set to 0, which results in a timeout equal to
 MIN_CIRCUIT_STREAM_TIMEOUT, or 10 seconds.) Here's what a timeout looks
 like:
 {{{
 Feb 03 19:00:03 650 STREAM 868 NEW 0 people.torproject.org:443
 SOURCE_ADDR=127.0.0.1:50318 PURPOSE=USER
 Feb 03 19:00:03 650 CIRC 149 LAUNCHED BUILD_FLAGS=NEED_CAPACITY
 PURPOSE=GENERAL TIME_CREATED=2017-02-04T03:00:03.738597
 Feb 03 19:00:03 650 CIRC 149 EXTENDED [...] BUILD_FLAGS=NEED_CAPACITY
 PURPOSE=GENERAL TIME_CREATED=2017-02-04T03:00:03.738597
 SOCKS_USERNAME="torproject.org"
 SOCKS_PASSWORD="7d8ea4ccf4ba6345846e0fccacd4d941"
 Feb 03 19:00:04 650 CIRC 149 EXTENDED [...] BUILD_FLAGS=NEED_CAPACITY
 PURPOSE=GENERAL TIME_CREATED=2017-02-04T03:00:03.738597
 SOCKS_USERNAME="torproject.org"
 SOCKS_PASSWORD="7d8ea4ccf4ba6345846e0fccacd4d941"
 Feb 03 19:00:04 650 CIRC 149 EXTENDED [...] BUILD_FLAGS=NEED_CAPACITY
 PURPOSE=GENERAL TIME_CREATED=2017-02-04T03:00:03.738597
 SOCKS_USERNAME="torproject.org"
 SOCKS_PASSWORD="7d8ea4ccf4ba6345846e0fccacd4d941"
 Feb 03 19:00:04 650 CIRC 149 BUILT [...] BUILD_FLAGS=NEED_CAPACITY
 PURPOSE=GENERAL TIME_CREATED=2017-02-04T03:00:03.738597
 SOCKS_USERNAME="torproject.org"
 SOCKS_PASSWORD="7d8ea4ccf4ba6345846e0fccacd4d941"
 Feb 03 19:00:04 650 STREAM 868 SENTCONNECT 149 people.torproject.org:443
 [...]
 Feb 03 19:00:14 650 STREAM 868 DETACHED 149 people.torproject.org:443
 REASON=TIMEOUT
 Feb 03 19:00:14 650 CIRC 150 LAUNCHED BUILD_FLAGS=NEED_CAPACITY
 PURPOSE=GENERAL TIME_CREATED=2017-02-04T03:00:14.588714
 }}}

 I did an experiment where I connected to
 people.torproject.org/~arthuredelstein (a page with hardly any content)
 and then repeatedly selected "New Tor Circuit for this Site" 50 times.

 Here are the results for 50 reloads. Each digit represents the number of
 10-second stream timeouts observed before a given connection succeeded.
 20020000000000000000002010000000000001000100000103

 In other words 8 out of 50 connections showed a timeout. And
 interestingly, four of these connections exhibited a double or triple
 timeout (20 or 30 seconds delay).

 I think this may be a big part of the perception of Tor Browser as "slow".
 Actual loading of pages doesn't seem drastically slow to me, and once I
 have successfully connected to a new site, following links to other pages
 on the same site (i.e., the same circuit) is usually acceptable.

 (I also did another quick test on another site and 5/25 connections had at
 least 1 timeout.)

 So here are some questions for further investigation:
 * Why are there so many timeouts? Are any of these timeouts due to silent
 errors in a Tor node? (If such errors could be reported, maybe we could
 avoid the long timeout.)
 * What's the reason for MIN_CIRCUIT_STREAM_TIMEOUT being 10 seconds? Would
 it do any harm to make this shorter, say 5 seconds or 2 seconds?
 * So many double or triple timeouts are suspicious, because they are using
 different circuits. Could this mean the connection error is caused by the
 client or guard?

--

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21394#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs