-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Repeatable rustc sigsegv crash #116249
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
Okay so turns out this isn't actually fixed on latest nightly, and I'm getting a crash even on stable, though different one rustc version:
stacktrace
|
But I can see the commit in the GitHub UI. I'm confused. |
@saethlin You need to |
Github marks the commit as not belonging to any branch in the repository, so fetching seems unlikely to be enough? edit: I tried it, and it did not change the |
$ git fetch origin a69821d0683f3698a6550307a028c14f1c5ee9dc
$ git checkout a69821d0683f3698a6550307a028c14f1c5ee9dc This enabled me to checkout the commit, now checking whether the ICE repros or not. |
Awesome, thank you! I wonder if it's related to using |
Note sure if it's relevant, but the linked mold issue is MacOS and my crash is on Arch Linux. |
How are you building this project? I'm just running |
I'm using Is there something I should do the next time it happens? |
Are you using sccache or any other kind of build caching system? You did everything I'd reasonably expect from someone. The SIGSEGV you hit looks like an assertion in LLVM, sometimes they surface as a SIGILL. The only thing I'd do here is use my locally-built toolchain with all the debug assertions enabled to figure out exactly which assertion it is. Then maybe I'd try to minimize the codebase that's producing the crash. |
I don't have sccache or anything like that, I don't even run rust analyzer into the same target dir, the build should be 100% what cargo does on its own.
Is there an easy way of doing this so that I can just do it the next time it happens and the exact assertions? I don't mind building LLVM, I've already built it in debug when messing around with a custom language, so I'm fine building a new LLVM for rustc. |
Yeah sure here's how to get a debug-assertions compiler:
Put this into profile = "compiler"
changelog-seen = 2
[llvm]
assertions = true
download-ci-llvm = true
[rust]
incremental = false
debug = true The important settings here are Then you can build a toolchain and set it up with rustup:
Then in your project use Yeah, you don't need to build your own LLVM. We have builds of LLVM with assertions cached for CI, and it's normal to use them when hacking on rustc instead of building your own. If you can figure out how to swap that to an existing toolchain (I wouldn't necessarily advise it) I suppose that could work for debugging these situations. |
I tried a clean build multiple times, it always crashes on a different crate, but with a seemingly same error. Fixed after updating to latest nightly, but still reporting in case it's relevant.
Code
I don't have a small code example, but the whole project is OSS and it keeps crashing even when I do
cargo clean
, at this commit darthdeus/comfy@a69821dMeta
rustc --version --verbose
:After
rustup update
it stopped happeningError output
Backtrace
The text was updated successfully, but these errors were encountered: