Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSegfault update thread-local panic count on macOS in empty unit test #50867
Comments
jdm
added
the
regression-from-stable-to-nightly
label
May 18, 2018
This comment has been minimized.
This comment has been minimized.
|
This was referenced May 18, 2018
This comment has been minimized.
This comment has been minimized.
|
There are no nightlies between 4-30 and 5-03, unfortunately. Based on the commit log from github, I believe 221b7ca...58eeeb4 is the range of commits that could be responsible. |
kennytm
added
the
O-macos
label
May 18, 2018
This comment has been minimized.
This comment has been minimized.
|
I can't reproduce the error with Edit: No repro with the mentioned nightly either.
|
This comment has been minimized.
This comment has been minimized.
|
It reproduces consistently on three particular macOS build machines that Servo uses. I can't actually reproduce it locally. I am attempting to bisect rustc on an affected machine to figure out the cause. |
This comment has been minimized.
This comment has been minimized.
|
@jdm What are the macOS and Xcode versions of those build machines? Maybe it's caused by Xcode 7 again. |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
(Darwin 14.5.0 = OS X Yosemite 10.10.5) |
cuviper
added
A-runtime
T-compiler
C-bug
labels
May 19, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
SimonSapin
referenced this issue
May 21, 2018
Closed
Tracking issue for upgrading rustc Nightly #20844
This comment has been minimized.
This comment has been minimized.
|
FWIW this historically has looked to be an issue with OSX's linker. Newer versions of Xcode appear to have a fixed linker as this bug doesn't manifest when Rust programs are linked with newer versions of Xcode |
This comment has been minimized.
This comment has been minimized.
|
While the underlying bug might be in the linker, programs that used to compile correctly with an older rustc version don’t anymore. https://forge.rust-lang.org/platform-support.html lists "OSX (10.7+, Lion+)" as tier 1, but XCode 8 is only available on 10.11.5+. Are we dropping support for older versions? |
This comment has been minimized.
This comment has been minimized.
|
@SimonSapin oh I'm not saying we shouldn't fix this, it's moreso that at this point in time no one knows how to fix this other than (a) using an updated Xcode or (b) compiling with |
This comment has been minimized.
This comment has been minimized.
This sounds very very good to know, thanks! It’s much easier than upgrading the OS on Servo’s CI. I’ll try it today. |
This comment has been minimized.
This comment has been minimized.
|
As to knowing how to fix it, bisecting to a single PR would be a start. Is there an easier way to use CI builds than forging S3 URLs and extracting a couple tarballs manually? |
This comment has been minimized.
This comment has been minimized.
|
@SimonSapin Both |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
Awesome thanks for the bisection @SimonSapin! Also cc @Zoxc for that commit. For the build error you had above, was that a clean build? I think you'll have to recompile some of the C objects. For the bisection result my guess would be that it's a legitimate optimization being performed which the linker or something along the way doesn't handle. I'm not sure what though? I would personally be ok backing out the opt-level=3 change as well. |
This comment has been minimized.
This comment has been minimized.
|
The |
This comment has been minimized.
This comment has been minimized.
I think this would probably work around the bug, but adding a test so that it doesn’t regress again is tricky since the Travis-CI config uses newer XCode than versions that are affected according to #50867 (comment). |
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
May 29, 2018
SimonSapin
added a commit
to SimonSapin/rust
that referenced
this issue
May 29, 2018
This comment has been minimized.
This comment has been minimized.
|
Note: On LLVM 6, Maybe we could isolate to one of these passes but we need to find a faster reproducer besides recompiling the whole compiler to stage1. |
bors
added a commit
that referenced
this issue
May 29, 2018
This comment has been minimized.
This comment has been minimized.
|
Reverting in #51165 has worked around the issue for now. Should we keep this open for finding a more targeted work-around?
|
This comment has been minimized.
This comment has been minimized.
|
Can you reproduce on today's nightly on older OSX machines when compiling with LTO? If so I think that's definitely a reason to keep this issue |
This comment has been minimized.
This comment has been minimized.
|
Adding this: [profile.test]
opt-level = 3
lto = truedoes cause segfaults to come back:
But I’m not seeing anything in the rustc command for LTO… |
This comment has been minimized.
This comment has been minimized.
|
It's weird but you'll want to configure the bench profile |
This comment has been minimized.
This comment has been minimized.
|
Alright, this time I get
|
This comment has been minimized.
This comment has been minimized.
|
bah! In that case seems safe to close as we can't reproduce easily then |
alexcrichton
closed this
May 30, 2018
This comment has been minimized.
This comment has been minimized.
kamyuentse
commented
May 31, 2018
|
I encountered a similar situation on macOS with the XCode 9.3 and
project: compile with |
jdm commentedMay 18, 2018
text_util.rs: