Tor stops launching OR connections
- Android version: 12 (CalyxOS 3.5.1)
- Phone model: Pixel 3a
- Briar version: 1.4.8 (4623d03c)
While smoke testing the 1.4.8 release I was quickly toggling the Tor settings (enabling/disabling Tor, enabling/disabling bridges, enabling/disabling Tor on battery) when Tor got stuck in the ENABLING state.
This bug seems to be distinct from #2324. Tor is still responding to control port commands, but it's failing to launch any OR connections to bridges. Unlike #2324, the Tor plugin shuts down normally.
Log: pixel-3a-no-or-connections.txt
The log shows that between 11:11:15 and 11:11:19 I disabled and re-enabled Tor several times with bridges enabled. At 11:11:15.283 I disabled Tor, and as expected the existing OR connections were closed. At 11:11:15.518 I re-enabled Tor but no OR connections were launched. I kept disabling and re-enabling Tor with bridges enabled, without any OR connections being launched. At 11:15:14.774 I disabled bridges. Tor then launched OR connections as expected and connected to the network.
At 11:15:20.020 I re-enabled bridges. At 11:15:27.927 I disabled Tor, and as expected the existing OR connections were closed. At 11:15:32.090 I re-enabled Tor and once again, no OR connections were launched. At 11:16:46.614 I disabled bridges, and once again this caused Tor to launch OR connections and connect to the network.
Later I was able to trigger the bug again on the same device by enabling bridges, then repeatedly disabling and re-enabling Tor. But I couldn't reproduce the bug on another device.
Log: pixel-3a-no-or-connections-again.txt
The second log contains the message "Ignoring directory request, since no bridge nodes are available yet", which isn't present in the first log.
Later I relaunched the app from AS to rule out the possibility of the bridges
resource not having been included in the APK. After relaunching I didn't immediately manage to reproduce the bug by enabling bridges and repeatedly disabling and re-enabling Tor. But after disabling and re-enabling bridges a few times as well as disabling and re-enabling Tor, I saw the bug again.
Log: pixel-3a-no-or-connections-yet-again.txt
The third log contains a new message that wasn't present in the previous logs: "Application request when we haven't used client functionality lately. Optimistically trying known bridges again." This might suggest that Tor is deliberately not launching OR connections because it thinks the bridges are unavailable - perhaps due to previous connection failures caused by disabling and re-enabling Tor and/or bridges?