Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tor ERR_PROXY_CONNECTION_FAILED when network devices change on Linux #7899

Closed
wknapik opened this issue Jan 24, 2020 · 11 comments
Closed

Tor ERR_PROXY_CONNECTION_FAILED when network devices change on Linux #7899

wknapik opened this issue Jan 24, 2020 · 11 comments

Comments

@wknapik
Copy link
Contributor

wknapik commented Jan 24, 2020

Description

I use Brave on a laptop at home and at work. At home, I use a VPN, at work, I don't. While the non-Tor windows keep working, the Tor window eventually stops working and all tabs in that window report ERR_PROXY_CONNECTION_FAILED on reload. There appears to be no obvious trigger for the breakage, at some random point it just stops working.

Initially, I thought maybe switching between cable and wifi was causing this, but I've been using wifi exclusively for a while and the issue persists.

Steps to Reproduce

  1. Open a Tor window.
  2. Switch networks, or from VPN to non-VPN, or from non-VPN to VPN (not guaranteed to reproduce the problem).
  3. After some time, the Tor connection can no longer be (re)established.

Actual result:

b0rkage.

Expected result:

No b0rkage.

Reproduces how often:

Inconsistently.

Brave version (brave://version info)

Brave 1.2.43 Chromium: 79.0.3945.130 (Official Build) unknown (64-bit)
Revision e22de67c28798d98833a7137c0e22876237fc40a-refs/branch-heads/3945@{#1047}
OS Linux
JavaScript V8 7.9.317.33
Flash (Disabled)
User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
Command Line /usr/lib/brave-bin/brave --enable-dom-distiller --disable-domain-reliability --no-pings --extension-content-verification=enforce_strict --extensions-install-verification=enforce --enable-oop-rasterization=Enabled --sync-url=https://no-thanks.invalid --enable-features=PasswordImport,WebUIDarkMode,SimplifyHttpsIndicator --disable-features=AutofillServerCommunication,NotificationTriggers,LookalikeUrlNavigationSuggestionsUI,AudioServiceOutOfProcess,SmsReceiver,WebXR,UnifiedConsent,WebXrGamepadModule,AllowPopupsDuringPageUnload,SyncUSSBookmarks --flag-switches-begin --enable-features=PasswordImport,WebUIDarkMode,SimplifyHttpsIndicator,WebRtcHideLocalIpsWithMdns --disable-features=AutofillServerCommunication,NotificationTriggers,LookalikeUrlNavigationSuggestionsUI,AudioServiceOutOfProcess,SmsReceiver,WebXR,UnifiedConsent,WebXrGamepadModule,AllowPopupsDuringPageUnload,SyncUSSBookmarks,AccountConsistency,WebRTCPipeWireCapturer --flag-switches-end --disable-webrtc-apm-in-audio-service
Executable Path /usr/lib/brave-bin/brave
Profile Path /home/redacted/.config/BraveSoftware/Brave-Browser/Default

Brave is installed from an AUR package (PKGBUILD).

Version/Channel Information:

% brave --version
Brave Browser 79.1.2.43 unknown
%

This issue has been present for at least a few versions.

Other Additional Information:

% date
Fri Jan 24 16:35:25 CET 2020
% tail  ~/.config/BraveSoftware/Brave-Browser/tor/data/tor.log
Jan 24 11:26:07.000 [notice] Heartbeat: Tor's uptime is 1 day 23:59 hours, with 8 circuits open. I've sent 34.16 MB and received 66.36 MB.
Jan 24 11:26:07.000 [notice] Average packaged cell fullness: 52.438%. TLS write overhead: 4%
Jan 24 11:30:11.000 [notice] Have tried resolving or connecting to address '[scrubbed]' at 3 different places. Giving up.
Jan 24 11:40:12.000 [notice] Have tried resolving or connecting to address '[scrubbed]' at 3 different places. Giving up.
Jan 24 11:50:14.000 [notice] Have tried resolving or connecting to address '[scrubbed]' at 3 different places. Giving up.
Jan 24 12:00:15.000 [notice] Have tried resolving or connecting to address '[scrubbed]' at 3 different places. Giving up.
Jan 24 12:10:16.000 [notice] Have tried resolving or connecting to address '[scrubbed]' at 3 different places. Giving up.
Jan 24 12:20:16.000 [notice] Have tried resolving or connecting to address '[scrubbed]' at 3 different places. Giving up.
Jan 24 12:30:18.000 [notice] Have tried resolving or connecting to address '[scrubbed]' at 3 different places. Giving up.
Jan 24 12:40:05.000 [notice] Catching signal TERM, exiting cleanly.
%

Miscellaneous Information:

I'm using Arch Linux.

For VPN leak prevention, I use https://github.com/wknapik/vpnfailsafe while the VPN is running and disable it when it's not running (removing routes, firewall rules, hosts entries).

@wknapik
Copy link
Contributor Author

wknapik commented Jan 24, 2020

I'm not seeing the same problem with the Tor Browser.

@bsclifton
Copy link
Member

cc: @riastradh-brave

@wknapik
Copy link
Contributor Author

wknapik commented Jan 24, 2020

I should probably add, that closing the Tor window and starting a new one does not solve the problem. The entire browser needs to be closed and started again for Tor to resume working correctly.

@wknapik
Copy link
Contributor Author

wknapik commented Jan 29, 2020

Strace against the tor-0.3.5.8-linux-brave-0 process (pid 3459383, uid 31337) produced

--- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=3459340, si_uid=31337} ---

By the time I looked at the process list, the sender was already gone, but the very close pid numbers suggest a related process - something spawned by Brave, rather than something completely unrelated.

@wknapik
Copy link
Contributor Author

wknapik commented Feb 7, 2020

Same/similar issue on macOS #8129.

@wknapik
Copy link
Contributor Author

wknapik commented Feb 10, 2020

I set up an audit rule as follows:

% auditctl -a exit,always -F arch=b64 -F a0="$(pgrep -f /tor)" -S kill -k brave_tor 

then, a few minutes ago, the tor process was killed again and I got the following:

% ausearch -k brave_tor -i                                                         
type=PROCTITLE msg=audit(02/10/20 13:33:42.949:21945) : proctitle=/usr/lib/brave-bin/brave --type=utility --field-trial-handle=2526640678691046932,6475114613948545150,131072 --enable-features=Pa 
type=OBJ_PID msg=audit(02/10/20 13:33:42.949:21945) : opid=4713 oauid=d ouid=d oses=2 ocomm=tor-0.3.5.8-lin 
type=SYSCALL msg=audit(02/10/20 13:33:42.949:21945) : arch=x86_64 syscall=kill success=yes exit=0 a0=0x1269 a1=SIGTERM a2=0x1 a3=0x4000 items=0 ppid=2615 pid=4708 auid=d uid=d gid=d euid=d suid=d fsuid=d egid=d sgid=d fsgid=d tty=(none) ses=2 comm=brave exe=/usr/lib/brave-bin/brave key=brave_tor 
%

I was also running strace at the same time like this

strace -f -tt -s 1000 -p "$(pgrep -f /tor)" 2>&1|grep -C1000 SIGTERM|tee strace.log

so I have a strace log with a 1000 lines of context above and below the SIGTERM, I can provide that on request.

@wknapik
Copy link
Contributor Author

wknapik commented Feb 10, 2020

Same/similar issue on Linux, macOS and Windows #8076.

@wknapik
Copy link
Contributor Author

wknapik commented Feb 14, 2020

Interestingly, today, after the Tor process spawned by Brave was killed, closing the Tor window and opening a new one did work. A new Tor process was started and the new Tor window works, which is an improvement.

I'm now on an updated Brave version, compared to the original report:

% pacman -Q brave-bin 
brave-bin 1:1.3.114-1
% brave --version
Brave Browser 80.1.3.114 unknown
%
. .
Brave 1.3.114 Chromium: 80.0.3987.87 (Official Build) unknown (64-bit)
Revision 449cb163497b70dbf98d389f54e38e85d4c59b43-refs/branch-heads/3987@{#801}
OS Linux
JavaScript V8 8.0.426.16
Flash (Disabled)
User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36
Command Line /usr/lib/brave-bin/brave --enable-dom-distiller --disable-domain-reliability --no-pings --extension-content-verification=enforce_strict --extensions-install-verification=enforce --sync-url=https://no-thanks.invalid --enable-features=PasswordImport,WebUIDarkMode,SimplifyHttpsIndicator --disable-features=AllowPopupsDuringPageUnload,NotificationTriggers,AutofillServerCommunication,WebXrGamepadModule,AudioServiceOutOfProcess,SmsReceiver,VideoPlaybackQuality,LookalikeUrlNavigationSuggestionsUI,WebXR --flag-switches-begin --enable-features=PasswordImport,WebUIDarkMode,SimplifyHttpsIndicator,WebRtcHideLocalIpsWithMdns --disable-features=AllowPopupsDuringPageUnload,NotificationTriggers,AutofillServerCommunication,WebXrGamepadModule,AudioServiceOutOfProcess,SmsReceiver,VideoPlaybackQuality,LookalikeUrlNavigationSuggestionsUI,WebXR,WebRTCPipeWireCapturer --flag-switches-end --disable-webrtc-apm-in-audio-service Executable Path /usr/lib/brave-bin/brave
Profile Path /home/redacted/.config/BraveSoftware/Brave-Browser/Default

@wknapik
Copy link
Contributor Author

wknapik commented Feb 14, 2020

Same/similar issue on macOS #6629

@wknapik
Copy link
Contributor Author

wknapik commented Jan 3, 2021

I keep up-to-date with Brave releases and I haven't seen this happen in months.

@bsclifton
Copy link
Member

@wknapik thanks for reporting back! I'll close this issue for now and if it happens again we can re-open. Happy new year! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants