Git Product home page Git Product logo

Comments (10)

nikic avatar nikic commented on July 18, 2024 1

FWIW I also can't reproduce this (on znver2).

from rust.

jwong101 avatar jwong101 commented on July 18, 2024

Hmm, I can't seem to reproduce it. I'm building on commit f25633a51a321a2090b7d5c41608c24c12df217e with the exact same rustc version:

rustc --version --verbose
rustc 1.80.0-nightly (b1ec1bd65 2024-05-18)
binary: rustc
commit-hash: b1ec1bd65f89c1375d2cf2fb733a87ef390276d3
commit-date: 2024-05-18
host: x86_64-unknown-linux-gnu
release: 1.80.0-nightly
LLVM version: 18.1.4

Could you try building with the latest nightly? There was a recent LLVM update that fixed a reported segfault, although that one was on an M1 Macbook.

from rust.

jnickg avatar jnickg commented on July 18, 2024

Updating to the latest changes behavior. The same segfault occurs, plus I get a new one!

rustc --version --verbose

rustc 1.80.0-nightly (791adf759 2024-05-21)
binary: rustc
commit-hash: 791adf759cc065316f054961875052d5bc03e16c
commit-date: 2024-05-21
host: x86_64-unknown-linux-gnu
release: 1.80.0-nightly
LLVM version: 18.1.6

New stack trace for existing segfault:

/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-937479a9c8b72905.so(+0x310eb66)[0x7554dc30eb66]
/usr/lib/libc.so.6(+0x3ce20)[0x7554d9058e20]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm19simplifyInstructionEPNS_11InstructionERKNS_13SimplifyQueryE+0xdc)[0x7554d72de526]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(+0x5cecf82)[0x7554d72ecf82]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(+0x5c19b12)[0x7554d7219b12]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm11PassManagerINS_8FunctionENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0x689)[0x7554d7221317]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm26CGSCCToFunctionPassAdaptor3runERNS_13LazyCallGraph3SCCERNS_15AnalysisManagerIS2_JRS1_EEES5_RNS_17CGSCCUpdateResultE+0x36f)[0x7554d743e0c5]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(+0x5e3dd51)[0x7554d743dd51]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm11PassManagerINS_13LazyCallGraph3SCCENS_15AnalysisManagerIS2_JRS1_EEEJS4_RNS_17CGSCCUpdateResultEEE3runERS2_RS5_S4_S7_+0x5c2)[0x7554d743c982]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm21DevirtSCCRepeatedPass3runERNS_13LazyCallGraph3SCCERNS_15AnalysisManagerIS2_JRS1_EEES5_RNS_17CGSCCUpdateResultE+0x17d)[0x7554d743b889]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm33ModuleToPostOrderCGSCCPassAdaptor3runERNS_6ModuleERNS_15AnalysisManagerIS1_JEEE+0xbaa)[0x7554d743a32a]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(+0x629564d)[0x7554d789564d]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm11PassManagerINS_6ModuleENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0xe1)[0x7554d7895831]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm24ModuleInlinerWrapperPass3runERNS_6ModuleERNS_15AnalysisManagerIS1_JEEE+0x19c)[0x7554d789741c]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(+0x629726f)[0x7554d789726f]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm11PassManagerINS_6ModuleENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0xe1)[0x7554d7895831]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-937479a9c8b72905.so(LLVMRustOptimize+0x822)[0x7554de26e7ae]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-937479a9c8b72905.so(+0x5070d3f)[0x7554de270d3f]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-937479a9c8b72905.so(_RNvXs1_CsacbF25odv79_18rustc_codegen_llvmNtB5_18LlvmCodegenBackendNtNtNtCsaC23inXIoVy_17rustc_codegen_ssa6traits5write19WriteBackendMethods8optimize+0xe3)[0x7554de2aee23]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-937479a9c8b72905.so(+0x50ad6c3)[0x7554de2ad6c3]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-937479a9c8b72905.so(+0x50ad29b)[0x7554de2ad29b]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libstd-6701759d8343e913.so(rust_metadata_std_c7445a34834edf15+0xc24db)[0x7554df8ad4db]
/usr/lib/libc.so.6(+0x8e1cf)[0x7554d90aa1cf]
/usr/lib/libc.so.6(+0x10f6ec)[0x7554d912b6ec]

Now I also get a segfault on this commit of another project I am working on, when running cargo +nightly build --release

Stack trace:

/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-937479a9c8b72905.so(+0x310eb66)[0x74f67e90eb66]
/usr/lib/libc.so.6(+0x3ce20)[0x74f67b658e20]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(+0x5c00b83)[0x74f679800b83]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm9AAResults13getModRefInfoEPKNS_11InstructionERKSt8optionalINS_14MemoryLocationEERNS_11AAQueryInfoE+0x444)[0x74f679859804]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm23MemoryDependenceResults27getNonLocalPointerDepFromBBEPNS_11InstructionERKNS_12PHITransAddrERKNS_14MemoryLocationEbPNS_10BasicBlockERNS_15SmallVectorImplINS_17NonLocalDepResultEEERNS_8DenseMapISA_PNS_5ValueENS_12DenseMapInfoISA_vEENS_6detail12DenseMapPairISA_SH_EEEEbb+0xdf1)[0x74f6798516bd]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm23MemoryDependenceResults27getNonLocalPointerDepFromBBEPNS_11InstructionERKNS_12PHITransAddrERKNS_14MemoryLocationEbPNS_10BasicBlockERNS_15SmallVectorImplINS_17NonLocalDepResultEEERNS_8DenseMapISA_PNS_5ValueENS_12DenseMapInfoISA_vEENS_6detail12DenseMapPairISA_SH_EEEEbb+0x656)[0x74f679850f22]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm23MemoryDependenceResults28getNonLocalPointerDependencyEPNS_11InstructionERNS_15SmallVectorImplINS_17NonLocalDepResultEEE+0x2d0)[0x74f679850890]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm7GVNPass19processNonLocalLoadEPNS_8LoadInstE+0x68)[0x74f67984fd42]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm7GVNPass12processBlockEPNS_10BasicBlockE+0x708)[0x74f6798ddc08]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm7GVNPass7runImplERNS_8FunctionERNS_15AssumptionCacheERNS_13DominatorTreeERKNS_17TargetLibraryInfoERNS_9AAResultsEPNS_23MemoryDependenceResultsERNS_8LoopInfoEPNS_25OptimizationRemarkEmitterEPNS_9MemorySSAE+0x211)[0x74f6798dd4d1]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm7GVNPass3runERNS_8FunctionERNS_15AnalysisManagerIS1_JEEE+0x25c)[0x74f67981b1dc]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(+0x5c1af73)[0x74f67981af73]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm11PassManagerINS_8FunctionENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0x689)[0x74f679821317]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm26CGSCCToFunctionPassAdaptor3runERNS_13LazyCallGraph3SCCERNS_15AnalysisManagerIS2_JRS1_EEES5_RNS_17CGSCCUpdateResultE+0x36f)[0x74f679a3e0c5]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(+0x5e3dd51)[0x74f679a3dd51]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm11PassManagerINS_13LazyCallGraph3SCCENS_15AnalysisManagerIS2_JRS1_EEEJS4_RNS_17CGSCCUpdateResultEEE3runERS2_RS5_S4_S7_+0x5c2)[0x74f679a3c982]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm21DevirtSCCRepeatedPass3runERNS_13LazyCallGraph3SCCERNS_15AnalysisManagerIS2_JRS1_EEES5_RNS_17CGSCCUpdateResultE+0x17d)[0x74f679a3b889]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm33ModuleToPostOrderCGSCCPassAdaptor3runERNS_6ModuleERNS_15AnalysisManagerIS1_JEEE+0xbaa)[0x74f679a3a32a]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(+0x629564d)[0x74f679e9564d]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm11PassManagerINS_6ModuleENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0xe1)[0x74f679e95831]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm24ModuleInlinerWrapperPass3runERNS_6ModuleERNS_15AnalysisManagerIS1_JEEE+0x19c)[0x74f679e9741c]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(+0x629726f)[0x74f679e9726f]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.80.0-nightly(_ZN4llvm11PassManagerINS_6ModuleENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0xe1)[0x74f679e95831]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-937479a9c8b72905.so(LLVMRustOptimize+0x822)[0x74f68086e7ae]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-937479a9c8b72905.so(+0x5070d3f)[0x74f680870d3f]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-937479a9c8b72905.so(+0x5070894)[0x74f680870894]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-937479a9c8b72905.so(_RNvXs1_CsacbF25odv79_18rustc_codegen_llvmNtB5_18LlvmCodegenBackendNtNtNtCsaC23inXIoVy_17rustc_codegen_ssa6traits5write19WriteBackendMethods13optimize_thin+0x61e)[0x74f6808b2cb4]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-937479a9c8b72905.so(+0x50adc79)[0x74f6808adc79]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-937479a9c8b72905.so(+0x50ad29b)[0x74f6808ad29b]
/home/jnickg/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libstd-6701759d8343e913.so(rust_metadata_std_c7445a34834edf15+0xc24db)[0x74f681e564db]
/usr/lib/libc.so.6(+0x8e1cf)[0x74f67b6aa1cf]
/usr/lib/libc.so.6(+0x10f6ec)[0x74f67b72b6ec]

from rust.

jnickg avatar jnickg commented on July 18, 2024

This is highly problematic for me as I need to be able to write/run bench tests which, as far as I know, require #![feature(test)]

from rust.

jwong101 avatar jwong101 commented on July 18, 2024

Hmm, unfortunately I can't seem to reproduce the segfault with this commit either.

❯ rustc --version --verbose
rustc 1.80.0-nightly (791adf759 2024-05-21)
binary: rustc
commit-hash: 791adf759cc065316f054961875052d5bc03e16c
commit-date: 2024-05-21
host: x86_64-unknown-linux-gnu
release: 1.80.0-nightly
LLVM version: 18.1.6

Do you happen to have any extra rustflags set in your Cargo's config.toml? Also, what's the last command that ends up running with cargo +nightly build --release --verbose before it segfaults?

from rust.

jnickg avatar jnickg commented on July 18, 2024

I don't see any relevant config.toml files anywhere (checking from the repo clone where I ran the cargo command, back up to my home directory; only my home directory has a .cargo folder, in which I did not find a config.toml file).

In the rust-explorations repo, my SIGSEGV consistently occurs here:

cargo +nightly build --release --verbose --examples

       Fresh idna v0.2.3
error: rustc interrupted by SIGSEGV, printing backtrace

And in the image-pyramid repo:

cargo +nightly build --release --verbose --examples

       Fresh toml_edit v0.19.15
error: rustc interrupted by SIGSEGV, printing backtrace

Is there any chance it is related to my specific CPU? I've occasionally seen SIGSEGV errors occur randomly in ways that were not reproducible, when building rust code. It seems more likely to crop up when building many crates at once, but when I run the same command to rebuild (after most crates built successfully), the crate that failed then succeeds without issue. Not worth filing a bug report for random failures, but I'm wondering if someone with an i9-14900K might have more luck reproducing it.

from rust.

ChrisDenton avatar ChrisDenton commented on July 18, 2024

It should be noted that compiling rust can exercise the CPU more than a lot of other things and any errors are likely to be fatal in one way or another.

It might be worth running a CPU test to see if there are any issues. You could also try downclocking to see if that helps.

from rust.

jwong101 avatar jwong101 commented on July 18, 2024

Hmm, that could be it (I'm on znver3). I found a comment from someone that's also been experiencing segfaults when compiling rust code on an i9-14900k.

from rust.

jnickg avatar jnickg commented on July 18, 2024

Just an update on my end: So far I have not found any faults in the CPU. The fact that stable has no issues AFAICT seems to also indicate this may be some kind of latent bug under the hood of the nightly compiler.

That said, I have also observed a few (very rare) system crashes. I always chalked it up to system instability (I'm running Manjaro and, besides Linux/Arch having hiccups like that occasionally, I also have a lot of compute-heavy things installed and running). But I wouldn't say I've fully proven that it's NOT the CPU (yet).

Any suggestions for good things to check related to finding potential CPU issues?

from rust.

workingjubilee avatar workingjubilee commented on July 18, 2024

You have a recent Intel CPU which is known to have bugs. Please, at minimum, adjust the power settings in your motherboard BIOS after updating it. You can choose to either follow your motherboard manufacturer's recommendations or listen to Intel.

Several motherboard manufacturers have released BIOS profiles labeled ‘Intel Baseline Profile’. However, these BIOS profiles are not the same as the 'Intel Default Settings' recommendations that Intel has recently shared with its partners regarding the instability issues reported on 13th and 14th gen K SKU processors.

These ‘Intel Baseline Profile’ BIOS settings appear to be based on power delivery guidance previously provided by Intel to manufacturers describing the various power delivery options for 13th and 14th Generation K SKU processors based on motherboard capabilities.

Intel is not recommending motherboard manufacturers to use ‘baseline’ power delivery settings on boards capable of higher values.

Intel’s recommended ‘Intel Default Settings’ are a combination of thermal and power delivery features along with a selection of possible power delivery profiles based on motherboard capabilities.

Intel recommends customers to implement the highest power delivery profile compatible with each individual motherboard design as noted in the table below:
Intel's settings table which recommends, if the motherboard supports it, enabling all of CEP, eTVB, TVB, TVB Voltage Optimizations, and C-states, disabling the ICCMAX Unlimited Bit, setting TjMax Offset: 0, setting the AC Load Line so it has a max value of 1.1mOhm, matching the DC Load Line, VR, and BIOS Load Line values, and setting the Power Delivery profile to, for the 14900K, if the motherboard supports it, either N/A or, for the Performance profile, ICCmax: 307A, ICCmax_App: 245A, PL1: 125W, PL2: 253W, and PL4: 380W

This has also been fixed by downclocking the CPU. You can, of course, also attempt to get Intel, the motherboard manufacturer, or the vendor that sold you these things, to accept a return of their faulty merchandise.

Closing this until it repros without a dodgy CPU.

from rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.