Opened 2 months ago

Closed 8 weeks ago

#26876 closed defect (fixed)

tor.real fails to start on macOS 10.9

Reported by: mcs Owned by: teor
Priority: Medium Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version: Tor: 0.3.3.1-alpha
Severity: Normal Keywords: ff60-esr, tbb-needs, regression, fast-fix, 033-backport, 034-backport, 035-must
Cc: Actual Points:
Parent ID: Points:
Reviewer: nickm Sponsor:

Description

While trying to test Snowflake on a macOS 10.9 system (for #26251), I encountered a different issue: tor.real fails to start. The error is:

dyld: lazy symbol binding failed: Symbol not found: _mach_approximate_time
  Referenced from: /Users/.../Desktop/Tor/TB nightly 2018-07-18/Tor Browser.app/Contents/MacOS/Tor/tor.real
  Expected in: /usr/lib/libSystem.B.dylib

At this point I don't know if this is a core tor bug or if it is caused by something in the Tor Browser 8.x build process.

Child Tickets

Change History (12)

comment:1 Changed 2 months ago by mcs

I found #24427 as well as https://developer.apple.com/documentation/kernel/1462443-mach_approximate_time (which does indicate that mach_approximate_time() is available in macOS 10.9 and newer).

comment:2 in reply to:  1 Changed 2 months ago by teor

Component: Applications/Tor BrowserCore Tor/Tor
Keywords: tbb-needs regression fast-fix 033-backport 034-backport added
Milestone: Tor: 0.3.5.x-final
Owner: changed from tbb-team to teor
Status: newassigned
Version: Tor: 0.3.3.1-alpha

Replying to mcs:

I found #24427 as well as https://developer.apple.com/documentation/kernel/1462443-mach_approximate_time (which does indicate that mach_approximate_time() is available in macOS 10.9 and newer).

Ah, but the macOS 10.9 header doesn't actually have that symbol:
https://opensource.apple.com/source/xnu/xnu-2422.1.72/osfmk/mach/mach_time.h.auto.html

In fact, the symbol is only available in the macOS 10.10 header:
https://opensource.apple.com/source/xnu/xnu-2782.1.97/osfmk/mach/mach_time.h.auto.html

(The kernel version index is here: https://opensource.apple.com/ )

So I will do something similar to #20235 here.

comment:3 Changed 2 months ago by teor

Keywords: 035-must added
Status: assignedneeds_review

Oh, and the availability macro was only introduced in the 10.12 header, so there are two different bugs here:
https://opensource.apple.com/source/xnu/xnu-3789.1.32/osfmk/mach/mach_time.h.auto.html

Unfortunately, I can't do the same checks for iOS, because the kernel headers aren't open-source. (I only have access to the latest headers, which claim that the symbol was introduced in iOS 8.0.) I've asked in #tor-mobile if they also need this fix.

See my branch bug26876_033.

On my macOS 10.13 with the default settings, it detects a Yosemite or later target, and the mach_approximate_time symbol is imported by the binary.

With -DMAC_OS_X_VERSION_MIN_REQUIRED=1009, it detects a pre-Yosemite target, and the mach_approximate_time symbol is not imported by the binary.

comment:4 Changed 2 months ago by nickm

Do we actually support OSX 10.9? Apple hasn't supported it since 2016.

comment:5 Changed 2 months ago by nickm

(That is, according to https://trac.torproject.org/projects/tor/wiki/org/teams/NetworkTeam/SupportedPlatforms , we wouldn't ordinarily support 10.9, since it's "OSX past EOL". But if TB needs it, we should support it, and we should maybe revise our policy, I guess.)

comment:6 Changed 2 months ago by gk

https://www.mozilla.org/en-US/firefox/60.0esr/system-requirements/ has the system requirements for Firefox which we follow. Thus, if you could support 10.9 for the time being that would be neat.

Last edited 2 months ago by gk (previous) (diff)

comment:7 Changed 2 months ago by mcs

My understanding is that Apple is fuzzy about what they support and what they do not support, but I think it is correct to infer based on the stream of security patches issued by Apple that 10.11 is the oldest version of macOS that they still support. But as gk said, Firefox still supports 10.9 and 10.10, so we would like Tor Browser to work on those systems as well.

comment:8 in reply to:  6 Changed 2 months ago by teor

Replying to nickm:

(That is, according to https://trac.torproject.org/projects/tor/wiki/org/teams/NetworkTeam/SupportedPlatforms , we wouldn't ordinarily support 10.9, since it's "OSX past EOL". But if TB needs it, we should support it, and we should maybe revise our policy, I guess.)

Replying to gk:

https://www.mozilla.org/en-US/firefox/60.0esr/system-requirements/ has the system requirements for Firefox which we follow. Thus, if you could support 10.9 for the time being that would be neat.

I updated our support policy so that we will Maintain:

  • OS X / macOS supported by Tor Browser (but not Apple)

https://trac.torproject.org/projects/tor/wiki/org/teams/NetworkTeam/SupportedPlatforms?action=diff&version=13

Let's handle support for unsupported Windows and Linux as needed.

comment:9 Changed 2 months ago by asn

Reviewer: nickm

comment:10 Changed 8 weeks ago by nickm

Status: needs_reviewneeds_revision

Very sorry, but I can't find the branch bug26876_033. Is it one of the ones that got lost when you recreated your github repository?

comment:11 Changed 8 weeks ago by teor

Status: needs_revisionneeds_review

Yes, thanks for your patience. It's there now.

comment:12 Changed 8 weeks ago by nickm

Resolution: fixed
Status: needs_reviewclosed

lgtm; merged to 0.3.3 and forward.

Note: See TracTickets for help on using tickets.