Public bug reported:

https://autopkgtest.ubuntu.com/packages/t/tor looks pretty bad.

Some of the tests work in DebCI though, so I had a look.
Not all might be fixable due to needing external network, but at least the 
tests should work in local execution by a developer.

Finding #1

The initialization can be too slow.
The test "download-release-file" does start TOR and right after starts to probe 
things.
In a fast environment that can work, it likely will hit a few of the `curl 
--retry 5` and then be up.
But even on my home connection it was initializing too slowly and later failed.

The system should tolerate the TOR startup, no matter how fast it is.
Not just a blind sleep 5m or so, but retrying until TOD is really fully 
initialized.

The following made it work on my system where it took eventually (06:16
to TODO) minutes to intialize.

```
/usr/bin/tor -f torrc
echo "Tor started."
+ 
+ # Do not rely on this to be super fast and curl --retry 5 to save us
+ # Init can take many minutes
+ echo "Waiting for Tor to complete bootstrapping..."
+ until ( echo 'authenticate'; echo 'getinfo status/bootstrap-phase'; echo 
'quit' ) | \
+       nc.openbsd -U ctl | tr -d '\r' | grep -q 'PROGRESS=100'; do
+   echo "Tor not yet fully initialized ($(date))"
+   sleep 30
+ done
+ echo "Tor is fully bootstrapped!"

torpid="$(
```

That made it download the release file just fine in my local case.
The delay turned in the target network right before I'd ahve made it, one 
debugging showed e.g.
...
10  ffm-b5-link.ip.twelve99.net (80.239.194.136)  17.635 ms  13.935 ms  13.859 
ms
11  ffm-bb1-link.ip.twelve99.net (62.115.114.88)  35.249 ms 
ffm-bb1-link.ip.twelve99.net (62.115.141.148)  35.454 ms 
ffm-bb1-link.ip.twelve99.net (62.115.136.212)  35.205 ms
12  nug-b2-link.ip.twelve99.net (62.115.140.203)  19.471 ms  18.634 ms  16.412 
ms
13  anexiacloud-ic-379861.ip.twelve99-cust.net (213.248.86.71)  18.277 ms 
anexiacloud-ic-373322.ip.twelve99-cust.net (62.115.46.183)  18.021 ms 
anexiacloud-ic-379861.ip.twelve99-cust.net (213.248.86.71)  23.654 ms
14  94.16.25.159 (94.16.25.159)  31.673 ms 94.16.25.155 (94.16.25.155)  86.629 
ms *
15  * * *
...

Not debugging other peoples network, if I wait long enough the test
finds a working peer, gets the information to build the TOR network and
then succeeds.

** Affects: tor (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2163463

Title:
  Tor dep-8 tests are failing too much

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tor/+bug/2163463/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to