ooni / probe

OONI Probe network measurement tool for detecting internet censorship
https://ooni.org/install
BSD 3-Clause "New" or "Revised" License
754 stars 142 forks source link

torsf: TestRunWithExistingTor hangs forever #2540

Closed bassosimone closed 12 months ago

bassosimone commented 1 year ago

The TestRunWithExistingTor test runs for a long time (probably ~forever) and logs these messages:

2023/09/22 17:10:07 WebRTC: Collecting a new Snowflake. Currently at [0/1]
2023/09/22 17:10:07 snowflake-00385b62d1499f5d  connecting...
2023/09/22 17:10:07 WebRTC: DataChannel created.
2023/09/22 17:10:07 WebRTC: Created offer
2023/09/22 17:10:07 WebRTC: Set local description
2023/09/22 17:10:07 WebRTC: PeerConnection created.
2023/09/22 17:10:07 Negotiating via HTTP rendezvous...
2023/09/22 17:10:07 Target URL:  snowflake-broker.torproject.net.global.prod.fastly.net
2023/09/22 17:10:07 Front URL:   cdn.sstatic.net
2023/09/22 17:10:07 HTTP rendezvous response: 403 Forbidden
2023/09/22 17:10:07 WebRTC: closing DataChannel
2023/09/22 17:10:07 WebRTC: closing PeerConnection
2023/09/22 17:10:07 WebRTC: Closing
2023/09/22 17:10:07 WebRTC: Unexpected error, no answer.  Retrying...

I am going to disable this integration test, but we must fix this issue before releasing 😅 .

To reproduce:

go test -run TestRunWithExistingTor -v -count 1 ./internal/experiment/torsf
bassosimone commented 1 year ago

Probably, this is the same issue as: https://forum.torproject.org/t/problems-with-snowflake-since-2023-09-20-broker-failure-unexpected-error-no-answer/9346

bassosimone commented 12 months ago

We have fixed the underlying issue (thanks @cohosh!). And I am going to close this PR. However, I am not very fond of how much static configuration is embedded into the probe source code. I'm wondering of whether there is a way for us to have the check-in API tell us which is the proper SNI for Snowflake. This would reduce the need to release frequently. In any case, this topic is probably best being addressed as a new, separate issue.