-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Segfault on building TSAN-enabled Julia #48031
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
Comments
cc @vchuravy (looks to have the most recent edit; sorry if this tag is misplaced) |
I believe @Keno was the last person to play with TSAN. |
This is unfortunately really holding me back in my dev work. @Keno were you able to build TSAN-enabled Julia before? Any other tips to get it working? |
It worked a few months ago when I was doing the MSAN work, but I haven't tried it since. I don't know why it would segfault, somebody would have to go in and debug it. |
Do you mean you could build a TSAN one? I am actually able to build ASAN-enabled Julia just fine, it's just the TSAN one that breaks. I'd happy to help debug it because I can't do much else in the meantime; let me know where I should look. |
Yes |
Cool. Do you remember which Julia version, architecture, and which OS worked for you? I'm happy to use the exact same settings to get something working. |
Here are the last 100 lines of my compilation attempt in case this helps. I tried it on 1.9.0-beta2:
The total compilation output resulted in 398 MB of similar ThreadSanitizer warnings being dumped to stdout. |
The first lines would be where the error happened. I have been meaning to figure out how to make a patch that disables TSAN after failures so it does not print these errors afterwards. Do you have enough memory? The sanitizers need fairly beefy machines. |
Thanks, will get back to you on the memory. The machine has enough (750 GB RAM) but since I'm building inside an insitute-provided docker service, I am asking how much each container has access to. Thanks for the tip about the threadsanitizer warnings. Here's the filtered output (for my own reference, this is
Any ideas what this is from? Maybe related: https://sourceware.org/bugzilla/show_bug.cgi?id=27521. |
I think we usually build without assertions to bypass that error |
I'm using the
I also tried adding |
Comment out the JULIA_BUILD_MODE=debug. I believe that enforcers assertions |
I see, thanks! (I had assumed that was required for the sanitization build). Will give it another go. |
Cool, it seems to be building. Thanks for the help! Pushed the fix in #48210. |
We probably want a separate option that has debug information, but no asserts. Or better yet fix the assertion build but it's nice that at least it's building |
Edit: Nevermind, that binary is produced actually seems to run! So it is working after all. |
It is often built with |
Thanks, will try. By the way, should I file issues for ThreadSanitizer warnings in Julia source code? e.g., things like this (this is Julia 1.8.5):
|
Yes please. cc: @pchintalapudi |
Btw, would it be feasible to have precompiled binaries with TSAN/ASAN enabled? It would help with (1) automatically detecting these issues in Julia, and (2) could be used in CI to trigger failures if sanitization produces warnings in Julia packages. I think it would help improve community health quite a bit, as just running precompilation with TSAN on my machine has highlighted quite a few popular packages out there with lurking sanitization issues. If it was easier to set up TSAN, it would probably be more common to sanitize code. |
We could at least have Asan is missing these steps: https://github.com/JuliaCI/julia-buildkite/blob/9c501a475c2d8c1f53fea7fec1fac0537d9d1d4c/utilities/build_julia.sh#L69-L78 |
We did add ABI platform tags for tsan and asan when we added the msan ones, so in theory it's all set, but someone needs to drive pushing it through. |
I am unable to build a TSAN-enabled Julia on any recent version of Julia on Ubuntu 20.04 with an x86_64 architecture. However, I can build an ASAN-enabled version; just not a TSAN-enabled version (recommended by @vtjnash for debugging #47957).
I am building inside a dockerfile for reproducibility:
With this, one builds a TSAN-enabled Julia, version 1.8.4, with
docker build --build-arg JLVERSION=1.8.4 -t julia .
. On 1.8.3 and 1.8.4, I see the following segfault during the build:I am unable to build older versions due to this issue: #43896 (comment).
The text was updated successfully, but these errors were encountered: