Skip to content

rustc crashes with segmentation fault in 1.73.0 #116668

Closed
@amircodota

Description

@amircodota

When I compile a project with rust 1.73.0 on linux, I get a segmentation fault error.
When I compile it with 1.72.1 all is well.

How to reproduce

on linux

git clone https://github.com/qdrant/qdrant.git
cd qdrant/
cargo +1.73.0 build --release --no-default-features --features parking_lot --bin qdrant 

If reproduced, you should get this error

/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/librustc_driver-453cf35e1dd187fa.so(+0x3121c13)[0x7fd7b4f21c13]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7fd7b1a42520]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.73.0-stable.so(_ZN4llvm12DemandedBits15performAnalysisEv+0x12fa)[0x7fd7ae19017a]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.73.0-stable.so(_ZN4llvm8BDCEPass3runERNS_8FunctionERNS_15AnalysisManagerIS1_JEEE+0x73c)[0x7fd7ae18e5fc]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.73.0-stable.so(+0x5f8dea1)[0x7fd7ae18dea1]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.73.0-stable.so(_ZN4llvm11PassManagerINS_8FunctionENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0xeab)[0x7fd7ae54bbbb]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.73.0-stable.so(_ZN4llvm27ModuleToFunctionPassAdaptor3runERNS_6ModuleERNS_15AnalysisManagerIS1_JEEE+0x68f)[0x7fd7ae54a665]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.73.0-stable.so(+0x6349fd1)[0x7fd7ae549fd1]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.73.0-stable.so(_ZN4llvm11PassManagerINS_6ModuleENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0xb9)[0x7fd7ae236587]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/librustc_driver-453cf35e1dd187fa.so(+0x26d723c)[0x7fd7b44d723c]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/librustc_driver-453cf35e1dd187fa.so(+0x26cf1da)[0x7fd7b44cf1da]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/librustc_driver-453cf35e1dd187fa.so(+0x27c73f6)[0x7fd7b45c73f6]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/librustc_driver-453cf35e1dd187fa.so(_RNvXs1_Cs1HXOGTbQ6wr_18rustc_codegen_llvmNtB5_18LlvmCodegenBackendNtNtNtCs1yZWZnyBLnz_17rustc_codegen_ssa6traits5write19WriteBackendMethods12optimize_fat+0x30)[0x7fd7b4dc5fa0]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/librustc_driver-453cf35e1dd187fa.so(+0x27c5e7f)[0x7fd7b45c5e7f]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/librustc_driver-453cf35e1dd187fa.so(+0x26ca808)[0x7fd7b44ca808]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/librustc_driver-453cf35e1dd187fa.so(+0x2659256)[0x7fd7b4459256]
/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/lib/libstd-6498d8891e016dca.so(rust_metadata_std_3759e478f3a6c4f2+0x10b295)[0x7fd7b1d71295]
/lib/x86_64-linux-gnu/libc.so.6(+0x94ac3)[0x7fd7b1a94ac3]
/lib/x86_64-linux-gnu/libc.so.6(+0x126a40)[0x7fd7b1b26a40]
warning: `qdrant` (bin "qdrant") generated 4 warnings
error: could not compile `qdrant` (bin "qdrant"); 4 warnings emitted

Caused by:
  process didn't exit successfully: `/home/amir/.rustup/toolchains/1.73.0-x86_64-unknown-linux-gnu/bin/rustc --crate-name qdrant --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=204 --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto=fat --cfg 'feature="parking_lot"' -C metadata=678c84f13770865d -C extra-filename=-678c84f13770865d --out-dir /home/amir/work/qdrant/target/release/deps -L dependency=/home/amir/work/qdrant/target/release/deps --extern actix_cors=/home/amir/work/qdrant/target/release/deps/libactix_cors-5d753288e4e6e1d9.rlib --extern actix_files=/home/amir/work/qdrant/target/release/deps/libactix_files-d206554be5000416.rlib --extern actix_multipart=/home/amir/work/qdrant/target/release/deps/libactix_multipart-e4119f55be86e64c.rlib --extern actix_web_validator=/home/amir/work/qdrant/target/release/deps/libactix_web_validator-f128b23484ab37de.rlib --extern anyhow=/home/amir/work/qdrant/target/release/deps/libanyhow-1376d6f5954dcf8f.rlib --extern api=/home/amir/work/qdrant/target/release/deps/libapi-74988dce99cf8d16.rlib --extern chrono=/home/amir/work/qdrant/target/release/deps/libchrono-7a0f10592547f130.rlib --extern clap=/home/amir/work/qdrant/target/release/deps/libclap-be247841c8445007.rlib --extern collection=/home/amir/work/qdrant/target/release/deps/libcollection-12b7be4776cdde4f.rlib --extern colored=/home/amir/work/qdrant/target/release/deps/libcolored-af2403cb46be9aa8.rlib --extern common=/home/amir/work/qdrant/target/release/deps/libcommon-7b887a942e9ae78b.rlib --extern config=/home/amir/work/qdrant/target/release/deps/libconfig-4c8ba52845fcc7ae.rlib --extern constant_time_eq=/home/amir/work/qdrant/target/release/deps/libconstant_time_eq-05a34683a9500646.rlib --extern futures=/home/amir/work/qdrant/target/release/deps/libfutures-7a65cb071a0e33a5.rlib --extern futures_util=/home/amir/work/qdrant/target/release/deps/libfutures_util-ed9527f9c672721f.rlib --extern itertools=/home/amir/work/qdrant/target/release/deps/libitertools-d8d087d1b77ebb89.rlib --extern log=/home/amir/work/qdrant/target/release/deps/liblog-e9330644bc5cecfd.rlib --extern memory=/home/amir/work/qdrant/target/release/deps/libmemory-c205ba57935be5a0.rlib --extern num_traits=/home/amir/work/qdrant/target/release/deps/libnum_traits-6e6b42730eba894d.rlib --extern num_cpus=/home/amir/work/qdrant/target/release/deps/libnum_cpus-9c5009be1fd05028.rlib --extern parking_lot=/home/amir/work/qdrant/target/release/deps/libparking_lot-c669684e36361cf8.rlib --extern prometheus=/home/amir/work/qdrant/target/release/deps/libprometheus-72772a37e76487a9.rlib --extern prost=/home/amir/work/qdrant/target/release/deps/libprost-183387812257cc8f.rlib --extern raft=/home/amir/work/qdrant/target/release/deps/libraft-89453d70fa8145be.rlib --extern raft_proto=/home/amir/work/qdrant/target/release/deps/libraft_proto-44bdfb8c4851b3da.rlib --extern reqwest=/home/amir/work/qdrant/target/release/deps/libreqwest-d83626a88d6bbd7c.rlib --extern rustls=/home/amir/work/qdrant/target/release/deps/librustls-dd3c7f94cdd3e204.rlib --extern rustls_pemfile=/home/amir/work/qdrant/target/release/deps/librustls_pemfile-fee18894ea33de01.rlib --extern schemars=/home/amir/work/qdrant/target/release/deps/libschemars-e151af419579664c.rlib --extern segment=/home/amir/work/qdrant/target/release/deps/libsegment-6ccbfec029f00e9d.rlib --extern serde=/home/amir/work/qdrant/target/release/deps/libserde-7250163179c417ba.rlib --extern serde_cbor=/home/amir/work/qdrant/target/release/deps/libserde_cbor-b1da93ac39a02281.rlib --extern serde_json=/home/amir/work/qdrant/target/release/deps/libserde_json-07e099448f80c968.rlib --extern slog=/home/amir/work/qdrant/target/release/deps/libslog-89efcb485691e0df.rlib --extern slog_stdlog=/home/amir/work/qdrant/target/release/deps/libslog_stdlog-40019af6d9aaba15.rlib --extern storage=/home/amir/work/qdrant/target/release/deps/libstorage-cd01e47fad08cf03.rlib --extern sys_info=/home/amir/work/qdrant/target/release/deps/libsys_info-504e7c1041746bf1.rlib --extern tar=/home/amir/work/qdrant/target/release/deps/libtar-93ebe77f2e73ae60.rlib --extern thiserror=/home/amir/work/qdrant/target/release/deps/libthiserror-05462fe689457c5f.rlib --extern tikv_jemallocator=/home/amir/work/qdrant/target/release/deps/libtikv_jemallocator-2f70f552465631e0.rlib --extern tokio=/home/amir/work/qdrant/target/release/deps/libtokio-f94a48abeb349ab1.rlib --extern tonic=/home/amir/work/qdrant/target/release/deps/libtonic-aab94c1a615270a6.rlib --extern tonic_reflection=/home/amir/work/qdrant/target/release/deps/libtonic_reflection-650ef766ecd687af.rlib --extern tower=/home/amir/work/qdrant/target/release/deps/libtower-a4b4ca25b067cb0f.rlib --extern tower_layer=/home/amir/work/qdrant/target/release/deps/libtower_layer-764c2b33180e9a63.rlib --extern tracing=/home/amir/work/qdrant/target/release/deps/libtracing-162e7d8fba50553e.rlib --extern tracing_log=/home/amir/work/qdrant/target/release/deps/libtracing_log-50e78ce7e71a2b46.rlib --extern tracing_subscriber=/home/amir/work/qdrant/target/release/deps/libtracing_subscriber-47bc2e85f74ba27b.rlib --extern uuid=/home/amir/work/qdrant/target/release/deps/libuuid-baf1bcf0d0cc6ebf.rlib --extern validator=/home/amir/work/qdrant/target/release/deps/libvalidator-b0cfc16999d19c5d.rlib --extern wal=/home/amir/work/qdrant/target/release/deps/libwal-f80d42582edca8ce.rlib -L native=/home/amir/work/qdrant/target/release/build/quantization-6c07ea8a878b1467/out -L native=/home/amir/work/qdrant/target/release/build/librocksdb-sys-88a70bdc670d21fe/out -L native=/home/amir/work/qdrant/target/release/build/librocksdb-sys-88a70bdc670d21fe/out -L native=/home/amir/work/qdrant/target/release/build/ring-3f1e21ee488f9992/out -L native=/home/amir/work/qdrant/target/release/build/sys-info-4646848c5d0dabf2/out -L native=/home/amir/work/qdrant/target/release/build/tikv-jemalloc-sys-bd4540182a1fbc4f/out/build/lib` (signal: 11, SIGSEGV: invalid memory reference)

If I do the same, but use 1.72.1, all is well.

git clone https://github.com/qdrant/qdrant.git
cd qdrant/
cargo +1.72.1 build --release --no-default-features --features parking_lot --bin qdrant 

Metadata

Metadata

Assignees

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions