Closed
Bug 1303212
Opened 9 years ago
Closed 9 years ago
OS X Startup crash Hit MOZ_CRASH(CLOCK_MONOTONIC is absent!) at gecko-dev/mozglue/misc/TimeStamp_posix.cpp:181 after Xcode 8 Update
Categories
(Firefox Build System :: General, defect, P1)
Tracking
(firefox51 fix-optional, firefox52 fixed)
RESOLVED
FIXED
mozilla52
| Tracking | Status | |
|---|---|---|
| firefox51 | --- | fix-optional |
| firefox52 | --- | fixed |
People
(Reporter: mchang, Assigned: mchang)
References
Details
(Keywords: crash)
Attachments
(3 files)
|
1.07 KB,
patch
|
Details | Diff | Splinter Review | |
|
2.96 KB,
patch
|
glandium
:
review-
|
Details | Diff | Splinter Review |
|
5.75 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
Xcode decided to update itself today
clang --version
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
After building Firefox today, I'm getting a start up crash. This only seems to happen with Xcode 8 and El Capitan. The Xcode 8 update and the macOS Sierra GM I'm running on another machine don't have this problem.
| Assignee | ||
Comment 1•9 years ago
|
||
It looks like CONFIG['HAVE_CLOCK_MONOTONIC'] is true now for some reason, still trying to find out where this is defined, but this is a temporary fix.
| Assignee | ||
Updated•9 years ago
|
Component: Widget: Cocoa → Build Config
| Assignee | ||
Comment 2•9 years ago
|
||
Not sure you're the right person, but it looks like in Xcode 8, clock_gettime was added to the SDK. The current configure just tries to link it, but not run it. However, at runtime, clock_gettime fails with "No file or directory found". Doing a test clock_gettime outside of gecko, I get a correct link and compile but a runtime error of:
"dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
Referenced from: /Users/masonchang/Projects/temp/./a.out (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib
"
On macOS sierra, everything works as expected and clock_gettime is implemented, but not on El Capitan. I suspect before Xcode 8, clock_gettime didn't even link.
This patch changes the check in our configure script to do a runtime check.
Just an FYI, I'm going on PTO for two weeks, so if this is properly reviewed, someone else can please try to land this. Thanks!
Attachment #8792081 -
Flags: review?(mh+mozilla)
Updated•9 years ago
|
Assignee: nobody → mchang
Status: NEW → ASSIGNED
Updated•9 years ago
|
Comment 3•9 years ago
|
||
Comment on attachment 8792081 [details] [diff] [review]
Do a runtime check for clock_Gettime
Review of attachment 8792081 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/old-configure.in
@@ +1223,4 @@
> [for libs in "" -lrt; do
> _SAVE_LIBS="$LIBS"
> LIBS="$LIBS $libs"
> + AC_TRY_RUN([
AC_TRY_RUN needs to be avoided at all costs. It breaks cross-compilations (think Android).
Considering we're targeting versions of OSX that don't have the function, at least for now, we can simplify the problem and just not check for clock_gettime on that platform (assuming the test does return no currently)
Attachment #8792081 -
Flags: review?(mh+mozilla) → review-
Comment 4•9 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #3)
> AC_TRY_RUN needs to be avoided at all costs. It breaks cross-compilations
> (think Android).
> Considering we're targeting versions of OSX that don't have the function, at
> least for now, we can simplify the problem and just not check for
> clock_gettime on that platform (assuming the test does return no currently)
Or we can branch out the AC_TRY_RUN using $OS_TARGET = Darwin and therewith save cross-compilation, or dumb idea?
Comment 5•9 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #3)
> AC_TRY_RUN needs to be avoided at all costs. It breaks cross-compilations
> (think Android).
I happened to do an all-platform push with this patch in the queue, and I can confirm that it breaks compilation for Android. :)
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1c6e526473c2
Attachment #8793835 -
Flags: review?(mh+mozilla)
The patch above is building just fine on 10.12 for me, and here's a try run to make sure it doesn't mess things up on our builders https://treeherder.mozilla.org/#/jobs?repo=try&revision=02c5273d0ae3
Updated•9 years ago
|
Attachment #8793835 -
Flags: review?(mh+mozilla) → review+
Pushed by hurley@todesschaf.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e568feccbb14
Don't check for CLOCK_MONOTONIC on darwin r=glandium
Comment 11•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Comment 12•9 years ago
|
||
Thanks so much, Mason, Nicholas and Mike!
Comment 13•9 years ago
|
||
Mark 51 as fix-optional. If it's worth uplifting to 51, feel free to nominate it.
Comment 14•9 years ago
|
||
Well, it might be worth uplifting, but it also won't help much: currently my local Fx 51 build (tried both debug and opt) segfaults at startup. Even though it's wonderful to be able to build it, running is kind of another requirement.
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•