-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustc fails randomly with (signal: 11, SIGSEGV: invalid memory reference) #84245
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
I've been able to create a core dump, the backtrace is:
|
@nappa85: How many runs of |
As I already told, it's completely random.
Seems like a kill for timeout or for memory consumption, but I don't understand why on the 5 previous iterations it was ok... |
If it was killed by the linux OOM killer, there should be a message in the kernel log which you can see by running |
Just to make sure, the system this was originally reproduced with is running at stock, no memory/CPU overclock? Asking because it is extremely popular to run Ryzen with overclocked memory via XMP or a similar technology and sometimes such overclocks do result in issues like these being reported against this repository. |
No overclock at all, it's a brand new notebook |
An update on the topic: I'm stress-testing my machine in every way to exclude an hardware problem, but at the moment without luck. |
I've run As you can see, there are several point where more than 3GB of RAM is taken, a point takes almost 5GB... |
Trying to use fix_message as a dependency of another crate (that is the purpose of the project):
|
This looks like an OOM condition to me. The build takes almost 12 GiB of memory here. FWIW, attached is the output of |
I don't think it's an OOM, the error is randomic like an UB. |
The problem has been replicated also by rust-analyzer mantainer, that has a better machine than mine |
Can you see if this is a regression and if it is, narrow down the regression range? |
The rust-analyzer panic is unrelated (and just a normal panic). |
Is it possible to bisect on something that happens randomly? |
Tomorrow I'll have access to another ryzen7 machine, to see if I replicate the problem here too |
Since the issue presents itself more reliably over multiple runs of the compiler, you can make a script that runs the a given task N times before declaring a commit to be "good". |
Sorry for the long silence, it took me more than 10 days to prove Lenovo support that there were hardware problems even if tests passes. Now with a brand new hardware everything is stable. Closing the issue |
I bumped into the same issue today. My Machine's CPU is: I build cargo-c via |
same here: error: could not compile Caused by: Caused by: system: raspberry pi 3b Linux dc03 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux |
@rustbot label C-defective-hardware |
I know this bug doesn't forllow the template, I'll try to be as precise as possible, but I can't reproduce systematically the problem...
I've created a really big project, almost made completely of serde proc-macros, you can find it here: https://github.com/nappa85/serde_fix/
As soon as the project started getting bigger, the builds started failing, I've split it in a workspace, but I haven't solved completely the problem.
The fails are random, and seems to happen more often on a "dirty" environment, where with "dirty" I mean without calling
cargo clean
before.I noticed the failure rate is kind of inverse proportional to the number (or the kind) of errors in the code.
For example, before implementing Default for every enum in the code, and therefore having an error for missing Default for every non Option-wrapped enum, it was really hard to get a non failing build.
Now that the code is cleaner, to trigger the failure I created a script that adds a comment to a shared crate and then restarts
¢argo check
for all toolchains: https://github.com/nappa85/serde_fix/blob/master/runtest.shI run it like
I=0; while ./runtest.sh; do :; done
Normally rustc fails with something like:
Sometimes, after a failure, I'm not able to restart a build until I run
cargo clean
, the build fails with:Only once it failed with a backtrace, that is:
Backtrace
My machine is an AMD Ryzen 7 4700U with 16GB of RAM running Kubuntu 21.04 (same problems with 20.04 and 20.10).
If you need any additional info, just ask me, my goal is to help improve the compiler.
The text was updated successfully, but these errors were encountered: