Opened 4 months ago

Last modified 4 months ago

#26350 new defect

MacOS Tor Browser cannot bind to port

Reported by: phoul Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords:
Cc: mcs, brade, nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

A user on Twitter (Barton Gellman) reported that their Tor Browser on MacOS would not launch, and provided the following screenshots:

Unable to start Tor:
https://twitter.com/bartongellman/status/1002251213499523083

Could not bind:
https://pbs.twimg.com/media/DejXAwXU8AASc82.jpg:large

Activity monitor:
https://pbs.twimg.com/media/DejYl8cVAAAJvzQ.jpg:large

So far, they have tried reinstalling, we confirmed the permissions on the directory that the browser should be installing to are accurate:

https://pbs.twimg.com/media/DejUhyMU0AAYQdv.jpg

They have also tried disabling XFence / Littlesnitch, clearing their routing table and entirely restarting with the previously mentioned software disabled. There has been no change in the behaviour they are seeing after trying these different things.

Child Tickets

Change History (8)

comment:1 Changed 4 months ago by phoul

Another thing that was mentioned is after reinstall, a 0-byte torrc seems to be created where the torrc should live (~/Library/Application Support/TorBrowser-Data/Tor)

comment:2 Changed 4 months ago by gk

Cc: mcs brade added

comment:3 Changed 4 months ago by cypherpunks

Maybe sudo lsof -n -P | grep LISTEN | grep 9150 yet?

comment:4 in reply to:  3 Changed 4 months ago by mcs

Cc: nickm added

Replying to cypherpunks:

Maybe sudo lsof -n -P | grep LISTEN | grep 9150 yet?

The above command is a good thing to try, although if another process was listening on TCP port 9150 I would expect to see an "Address already in use" error (EADDRINUSE).

The error message that is being logged is from EADDRNOTAVAIL, which is a strange error to get. My guess is something is wrong with the networking stack at the macOS level. The error could also be caused by a programming error inside tor such as not properly initializing the sockaddr passed to bind(), but if that were the case we would have a lot more reports like this one.

Cc Nick in case he has seen this problem before.

Colin — We could ask this user to try using different TCP ports for tor, although I am not convinced it will help. To do that they would need to add lines like the following to the prefs.js file within their Tor Browser profile (under ~/Library/Application Support/TorBrowser-Data/Browser/*.default):

user_pref("network.proxy.socks_port", 9160);
user_pref("extensions.torlauncher.control_port", 9161);

comment:5 Changed 4 months ago by cypherpunks

The error could also be caused by a programming error inside tor such as not properly initializing the sockaddr passed to bind()

Something like?

#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
    sin->sin_len = sizeof(struct sockaddr_in);
#endif

in case of undefined HAVE_STRUCT_SOCKADDR_IN_SIN_LEN?

but if that were the case we would have a lot more reports like this one.

comment:6 Changed 4 months ago by cypherpunks

undefined

or wrong sin_len value

but if that were the case we would have a lot more reports like this one.

comment:7 Changed 4 months ago by cypherpunks

Another screenshot from thread https://pbs.twimg.com/media/Dei8JAsXcAA-jGK.jpg:large
It's unclear if this message box appear after user press OK for "unable_to_start_tor" message box.
If no then it's not about "tor_exited_during_startup" and contradicts to another screenshots and reports.

Message boxes generated by tor launcher need context and mostly useless.

comment:8 Changed 4 months ago by cypherpunks

contradicts to another screenshots and reports.

Nope. If tor process failed or exit before successful connection to control port.

Note: See TracTickets for help on using tickets.