Crash after hang on android
The easiest way to reproduce the issue is to turn off the internet connection completely. But it happens every time Tor tries to reconnect to the PT.
Tor log:
Tor version 0.4.7.13-dev
Jun 16 00:45:10.000 [notice] Tor 0.4.7.13-dev (git-aef76beccc6b7422) opening log file.
Jun 16 00:45:10.555 [notice] We compiled with OpenSSL 1010113f: OpenSSL 1.1.1s 1 Nov 2022 and we are running with OpenSSL 1010113f: 1.1.1s. These two versions should be binary compatible.
Jun 16 00:45:10.606 [notice] Tor 0.4.7.13-dev (git-aef76beccc6b7422) running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1s, Zlib 1.2.11, Liblzma 5.2.4, Libzstd 1.4.9 and Unknown N/A as libc.
Jun 16 00:45:10.606 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
Jun 16 00:45:10.607 [notice] Read configuration file "/data/user/0/pan.alexander.tordnscrypt/app_data/tor/tor.conf".
Jun 16 00:45:10.621 [notice] Opening Socks listener on 127.0.0.1:9050
Jun 16 00:45:10.621 [notice] Opened Socks listener connection (ready) on 127.0.0.1:9050
Jun 16 00:45:10.621 [notice] Opening Socks listener on [::1]:9050
Jun 16 00:45:10.621 [notice] Opened Socks listener connection (ready) on [::1]:9050
Jun 16 00:45:10.621 [notice] Opening DNS listener on 127.0.0.1:5400
Jun 16 00:45:10.622 [notice] Opened DNS listener connection (ready) on 127.0.0.1:5400
Jun 16 00:45:10.622 [notice] Opening DNS listener on [::1]:5400
Jun 16 00:45:10.622 [notice] Opened DNS listener connection (ready) on [::1]:5400
Jun 16 00:45:10.622 [notice] Opening Transparent pf/netfilter listener on 127.0.0.1:9040
Jun 16 00:45:10.622 [notice] Opened Transparent pf/netfilter listener connection (ready) on 127.0.0.1:9040
Jun 16 00:45:10.622 [notice] Opening HTTP tunnel listener on 127.0.0.1:8118
Jun 16 00:45:10.622 [notice] Opened HTTP tunnel listener connection (ready) on 127.0.0.1:8118
Jun 16 00:45:10.000 [warn] Your log may contain sensitive information - you disabled SafeLogging. Don't log unless it serves an important reason. Overwrite the log afterwards.
Jun 16 00:45:10.000 [notice] Parsing GEOIP IPv4 file /data/user/0/pan.alexander.tordnscrypt/app_data/tor/geoip.
Jun 16 00:45:12.000 [notice] Parsing GEOIP IPv6 file /data/user/0/pan.alexander.tordnscrypt/app_data/tor/geoip6.
Jun 16 00:45:14.000 [notice] Bootstrapped 0% (starting): Starting
Jun 16 00:45:17.000 [notice] Starting with guard context "bridges"
Jun 16 00:45:17.000 [notice] Delaying directory fetches: No running bridges
Jun 16 00:45:17.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:45:17.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:45:17.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:45:18.000 [notice] Bootstrapped 1% (conn_pt): Connecting to pluggable transport
Jun 16 00:45:18.000 [notice] Bootstrapped 2% (conn_done_pt): Connected to pluggable transport
Jun 16 00:45:18.000 [notice] Bootstrapped 10% (conn_done): Connected to a relay
Jun 16 00:47:20.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:20.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:20.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:20.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:20.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:20.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:20.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:20.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:20.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:20.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:20.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:26.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:26.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:26.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:26.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:26.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:26.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:26.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:32.000 [notice] Tried for 120 seconds to get a connection to www.torproject.org:0. Giving up. (waiting for circuit)
Jun 16 00:47:32.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:32.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:32.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:32.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:32.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:32.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:32.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:40.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:40.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:40.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:40.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:40.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:40.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:40.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:40.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:40.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:40.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:40.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:40.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:47:40.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:48:02.000 [notice] Tried for 120 seconds to get a connection to www.torproject.org:0. Giving up. (waiting for circuit)
Jun 16 00:48:32.000 [notice] Tried for 120 seconds to get a connection to www.torproject.org:0. Giving up. (waiting for circuit)
Jun 16 00:49:02.000 [notice] Tried for 120 seconds to get a connection to www.torproject.org:0. Giving up. (waiting for circuit)
Jun 16 00:49:32.000 [notice] Tried for 120 seconds to get a connection to www.torproject.org:0. Giving up. (waiting for circuit)
Jun 16 00:49:45.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:49:45.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:49:45.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:49:45.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:49:45.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:49:45.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:49:45.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:49:45.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:49:45.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:49:45.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:49:45.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:50:02.000 [notice] Tried for 120 seconds to get a connection to www.torproject.org:0. Giving up. (waiting for circuit)
Jun 16 00:50:02.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:50:02.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:50:02.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:50:02.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:50:02.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:50:02.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:50:18.000 [warn] Problem bootstrapping. Stuck at 10% (conn_done): Connected to a relay. (DONE; DONE; count 1; recommendation warn; host 0000000000000000000000000000000000000000 at 143.110.214.222:80)
Jun 16 00:50:18.000 [warn] 1 connections have failed:
Jun 16 00:50:18.000 [warn] 1 connections died in state handshaking (TLS) with SSL state SSLv3/TLS write client hello in HANDSHAKE
Jun 16 00:50:18.000 [warn] Pluggable Transport process terminated with status code 512
Jun 16 00:50:22.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:50:22.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:50:22.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:50:22.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:50:22.000 [notice] Application request when we haven't used client functionality lately. Optimistically trying known bridges again.
Jun 16 00:50:32.000 [notice] Tried for 120 seconds to get a connection to www.torproject.org:0. Giving up. (waiting for circuit)
Conjure log:
[21:45:10] Redirecting log to file
2023/06/15 21:45:10 Started SOCKS listener at 127.0.0.1:59441
2023/06/15 21:45:18 SOCKS accepted: {143.110.214.222:80 url=https://registration.refraction.network.global.prod.fastly.net/api;front=cdn.sstatic.net map[front:[cdn.sstatic.net] url:[https://registration.refraction.network.global.prod.fastly.net/api]]}
2023/06/15 21:45:18 Attempting to connect to bridge at 143.110.214.222:80
2023/06/15 21:45:18 Using the registration API at https://registration.refraction.network.global.prod.fastly.net/api
[21:45:18] [0-ca5a5c] Shared Secret - ca5a5c3e20d8af12d75eff69a518dc40a4e44cb6640069f5cce3f15793ed4254
[21:45:18] [0-ca5a5c] covert 143.110.214.222:80
[21:45:18] [0-ca5a5c] Representative - e07b93b28f5276dc1bbe337ff64aaa999d596ad11126efaed064d99fecd3aaa1
2023/06/15 21:45:18 Performing a Conjure registration with domain fronting...
2023/06/15 21:45:18 Conjure station URL: https://registration.refraction.network.global.prod.fastly.net/api
2023/06/15 21:45:18 Domain front: cdn.sstatic.net
2023/06/15 21:45:18 Buffering 517 bytes to send later
[21:45:22] [0-ca5a5c] Attempting to Connect ...
[21:45:23] [0-ca5a5c] failed to dial phantom 141.219.183.52: dial tcp 141.219.183.52:443: i/o timeout
Android logcat:
00:50:18.407 E panic: runtime error: invalid memory address or nil pointer dereference
00:50:18.407 E [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xb34c89f8]
00:50:18.407 E
00:50:18.407 E goroutine 13 [running]:
00:50:18.407 E main.(*BufferedConn).Close(0x89e3b3b0)
00:50:18.408 E gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/conjure/client/bufferedconn.go:44 +0x1c
00:50:18.408 E main.proxy.func2()
00:50:18.408 E gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/conjure/client/conjure.go:135 +0x180
00:50:18.408 E created by main.proxy
00:50:18.408 E gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/conjure/client/conjure.go:130 +0x184
Version 0a7df066
If the line conjure.go:135 is removed, the crash no longer occurs.
Edited by Gedsh