rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97.33k stars 12.58k forks source link

Get this when compiling my program #127330

Open kalimalrazif opened 3 months ago

kalimalrazif commented 3 months ago

I got this error message when I was compiling my program. I don't think it's something I've done in my code. It's more of a memory issue or something like that, but the compiler asked me to make the report. Here is the exit

Error output

 Compiling polars-parquet v0.41.3
error: rustc interrupted by SIGSEGV, printing backtrace

/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x2ea5963)[0x7fe595454963]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7fe59241f420]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x421520f)[0x7fe5967c420f]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x4214643)[0x7fe5967c3643]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x4214452)[0x7fe5967c3452]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x4e6d34f)[0x7fe59741c34f]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x4e6d05b)[0x7fe59741c05b]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(_RNvCsIsW14rRsp4_11rustc_parse20new_parser_from_file+0xcd)[0x7fe59741be0d]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(_RNvNtCsbuBViZNjx46_12rustc_expand6module18parse_external_mod+0x177)[0x7fe597418c37]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(_RNvXsm_NtCsbuBViZNjx46_12rustc_expand6expandNtB5_19InvocationCollectorNtNtCsiL1wrQgHJBs_9rustc_ast9mut_visit10MutVisitor13flat_map_item+0x17da)[0x7fe596e69060]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(_RNvXsm_NtCsbuBViZNjx46_12rustc_expand6expandNtB5_19InvocationCollectorNtNtCsiL1wrQgHJBs_9rustc_ast9mut_visit10MutVisitor11visit_crate+0x419)[0x7fe596e66d99]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x464e204)[0x7fe596bfd204]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(_RNvMs1_NtCsbuBViZNjx46_12rustc_expand6expandNtB5_13MacroExpander21fully_expand_fragment+0xde)[0x7fe596d36a68]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(_RNvMs1_NtCsbuBViZNjx46_12rustc_expand6expandNtB5_13MacroExpander12expand_crate+0x298)[0x7fe59741f85c]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x47f4018)[0x7fe596da3018]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x47f34db)[0x7fe596da24db]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x47f34c9)[0x7fe596da24c9]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x4ee463b)[0x7fe59749363b]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x4ee4201)[0x7fe597493201]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x4d82fba)[0x7fe597331fba]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x4d40f8b)[0x7fe5972eff8b]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-1ccb730c51a3970e.so(+0x4d40d80)[0x7fe5972efd80]
/home/nomar/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-d5189b81a4fa4d36.so(rust_metadata_std_3c8ba8ebcf555201+0xc3cab)[0x7fe592547cab]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8609)[0x7fe592413609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7fe592336353]

note: we would appreciate a report at https://github.com/rust-lang/rust
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
note: backtrace dumped due to SIGSEGV! resuming signal
   Compiling libduckdb-sys v0.10.2
saethlin commented 3 months ago

It's more of a memory issue or something like that, but the compiler asked me to make the report.

We ask for these reports because often these problems are caused by code that makes vigorous use of the type system and exposes a quality of implementation issue in the compiler, where it's often much better on balance to make the compiler handle your code than ask you to change the way you're using Rust.

Can you share the project you are compiling? Or failing that, since this looks like it is crashing in compiling an open-source dependency, can you run your build with the flags -j1 --verbose and paste the last rustc invocation that Cargo prints? That might be enough for someone else to debug this.

juntyr commented 2 months ago

I just hit a very similar issue on nightly-2024-07-21:

2024-07-27T18:47:51.0486374Z error: rustc interrupted by SIGSEGV, printing backtrace
2024-07-27T18:47:51.0486993Z 
2024-07-27T18:47:51.0490075Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(+0x34567d3)[0x7f6d158567d3]
2024-07-27T18:47:51.0491772Z /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f6d12042520]
2024-07-27T18:47:51.0492829Z /lib/x86_64-linux-gnu/libc.so.6(pthread_mutex_lock+0x4)[0x7f6d12097ef4]
2024-07-27T18:47:51.0495708Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xe8d19c)[0x7f6cfce8d19c]
2024-07-27T18:47:51.0497646Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xc9a5e9)[0x7f6cfcc9a5e9]
2024-07-27T18:47:51.0499530Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xc8a98e)[0x7f6cfcc8a98e]
2024-07-27T18:47:51.0501447Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xb735d8)[0x7f6cfcb735d8]
2024-07-27T18:47:51.0503367Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xa83cc5)[0x7f6cfca83cc5]
2024-07-27T18:47:51.0505238Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xa81caa)[0x7f6cfca81caa]
2024-07-27T18:47:51.0507168Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xa7d8bc)[0x7f6cfca7d8bc]
2024-07-27T18:47:51.0509002Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xaf5d96)[0x7f6cfcaf5d96]
2024-07-27T18:47:51.0511037Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xa76266)[0x7f6cfca76266]
2024-07-27T18:47:51.0513133Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xacc6ac)[0x7f6cfcacc6ac]
2024-07-27T18:47:51.0515169Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xaa99cb)[0x7f6cfcaa99cb]
2024-07-27T18:47:51.0517088Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xaa97a9)[0x7f6cfcaa97a9]
2024-07-27T18:47:51.0519085Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xb774f9)[0x7f6cfcb774f9]
2024-07-27T18:47:51.0521107Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xb7b768)[0x7f6cfcb7b768]
2024-07-27T18:47:51.0523111Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xbc373e)[0x7f6cfcbc373e]
2024-07-27T18:47:51.0525433Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xc3ebee)[0x7f6cfcc3ebee]
2024-07-27T18:47:51.0527860Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xc3eaa6)[0x7f6cfcc3eaa6]
2024-07-27T18:47:51.0530004Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xa899c6)[0x7f6cfca899c6]
2024-07-27T18:47:51.0532386Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xc3e4d1)[0x7f6cfcc3e4d1]
2024-07-27T18:47:51.0534648Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xa762b0)[0x7f6cfca762b0]
2024-07-27T18:47:51.0537232Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xacc4fc)[0x7f6cfcacc4fc]
2024-07-27T18:47:51.0539355Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xc3ed4b)[0x7f6cfcc3ed4b]
2024-07-27T18:47:51.0541438Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xc3cad3)[0x7f6cfcc3cad3]
2024-07-27T18:47:51.0543516Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xc3eb5e)[0x7f6cfcc3eb5e]
2024-07-27T18:47:51.0545634Z /home/runner/work/rust-cuda/rust-cuda/target/debug/deps/librust_cuda_kernel-f8e68a2959435f1e.so(+0xa7b282)[0x7f6cfca7b282]
2024-07-27T18:47:51.0547948Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(+0x53c5645)[0x7f6d177c5645]
2024-07-27T18:47:51.0550481Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(+0x53c537f)[0x7f6d177c537f]
2024-07-27T18:47:51.0554034Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(_RNvXs_NtCs5bDVmVmSdCw_12rustc_expand10proc_macroNtB4_13BangProcMacroNtNtB6_4base13BangProcMacro6expand+0x89)[0x7f6d1802b4c9]
2024-07-27T18:47:51.0557909Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(_RNvMs1_NtCs5bDVmVmSdCw_12rustc_expand6expandNtB5_13MacroExpander21fully_expand_fragment+0x31b37)[0x7f6d1348dfd7]
2024-07-27T18:47:51.0561615Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(_RNvMs1_NtCs5bDVmVmSdCw_12rustc_expand6expandNtB5_13MacroExpander12expand_crate+0x298)[0x7f6d17c7b0d8]
2024-07-27T18:47:51.0565145Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(_RNvNtCshR7PlEWAGD5_15rustc_interface6passes25resolver_for_lowering_raw+0xa33)[0x7f6d171fe333]
2024-07-27T18:47:51.0568106Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(+0x4dfd8eb)[0x7f6d171fd8eb]
2024-07-27T18:47:51.0570558Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(+0x4dfd8d9)[0x7f6d171fd8d9]
2024-07-27T18:47:51.0572964Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(+0x5b81a40)[0x7f6d17f81a40]
2024-07-27T18:47:51.0576204Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(+0x5b814ca)[0x7f6d17f814ca]
2024-07-27T18:47:51.0579062Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(+0x582aa63)[0x7f6d17c2aa63]
2024-07-27T18:47:51.0581710Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(+0x57cc689)[0x7f6d17bcc689]
2024-07-27T18:47:51.0585015Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/librustc_driver-9194d071d74e8e5f.so(+0x57cc43a)[0x7f6d17bcc43a]
2024-07-27T18:47:51.0588209Z /home/runner/.rustup/toolchains/nightly-2024-07-21-x86_64-unknown-linux-gnu/lib/libstd-c6c045f3358c0b22.so(rust_metadata_std_6ba14169a40c6134+0xc75bb)[0x7f6d123995bb]
2024-07-27T18:47:51.0589958Z /lib/x86_64-linux-gnu/libc.so.6(+0x94ac3)[0x7f6d12094ac3]
2024-07-27T18:47:51.0590814Z /lib/x86_64-linux-gnu/libc.so.6(+0x126850)[0x7f6d12126850]

The full log is from a CI run (https://github.com/juntyr/rust-cuda/actions/runs/10125660318/job/28001392785) of this repo (https://github.com/juntyr/rust-cuda/tree/670bee6f2d4550c1c6b721bf2f4d6e1863791886)

saethlin commented 2 months ago

very similar

These are only similar in that they are segfaults. The backtrace is completely different. Please file a separate issue.