Closed
Description
My current attempts to compile my project, discord-frontend
, fails with the hartex-discord-worker
crate (the following output comes from GitHub Actions CI):
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-00c03654e9ecf095.so(+0x3130563)[0x7f5c1fdad563]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f5c1c8df520]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(+0x695253b)[0x7f5c1995253b]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(+0x6974d85)[0x7f5c19974d85]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit24constructVariableDIEImplERKNS_11DbgVariableEb+0x1e5f)[0x7f5c1920a61f]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x174)[0x7f5c192042b4]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x7c7)[0x7f5c19204907]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DwarfCompileUnit27constructSubprogramScopeDIEEPKNS_12DISubprogramEPNS_12LexicalScopeE+0xe9)[0x7f5c1920793f]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm10DwarfDebug15endFunctionImplEPKNS_15MachineFunctionE+0x246)[0x7f5c19202386]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm16DebugHandlerBase11endFunctionEPKNS_15MachineFunctionE+0x5e)[0x7f5c194c7ede]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm10AsmPrinter16emitFunctionBodyEv+0x29e9)[0x7f5c19169629]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(+0x6166bf2)[0x7f5c19166bf2]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0xb1c)[0x7f5c18f6b3dc]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.74.0-nightly.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x266)[0x7f5c1939a06e]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-00c03654e9ecf095.so(+0x26e46e6)[0x7f5c1f3616e6]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-00c03654e9ecf095.so(+0x26e3598)[0x7f5c1f360598]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-00c03654e9ecf095.so(+0x26e0b8b)[0x7f5c1f35db8b]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-00c03654e9ecf095.so(+0x26dd984)[0x7f5c1f35a984]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-00c03654e9ecf095.so(+0x26db3e9)[0x7f5c1f3583e9]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-00c03654e9ecf095.so(+0x26673f6)[0x7f5c1f2e43f6]
/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libstd-19964a87984cce8a.so(rust_metadata_std_3de2780fbf87294b+0x10c425)[0x7f5c1cbee425]
/lib/x86_64-linux-gnu/libc.so.6(+0x94b43)[0x7f5c1c931b43]
/lib/x86_64-linux-gnu/libc.so.6(+0x126a00)[0x7f5c1c9c3a00]
error: could not compile `hartex_discord_worker` (bin "hartex_discord_worker")
Caused by:
process didn't exit successfully: `/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name hartex_discord_worker --edition=2021 hartex-discord-worker/src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C debuginfo=2 -C metadata=f59fa0bdd95c617d -C extra-filename=-f59fa0bdd95c617d --out-dir /home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps -L dependency=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps --extern chrono=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libchrono-648d11e3fa899d27.rlib --extern futures_util=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libfutures_util-e999fdc95fe7a99c.rlib --extern hartex_discord_commands=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libhartex_discord_commands-cc51a29af88b6a75.rlib --extern hartex_discord_commands_core=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libhartex_discord_commands_core-f3856b2dd71d1097.rlib --extern hartex_discord_core=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libhartex_discord_core-bf2515b7ba4e43e0.rlib --extern hartex_discord_entitycache_cacheupdaters=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libhartex_discord_entitycache_cacheupdaters-fb74303614849e6b.rlib --extern hartex_discord_entitycache_core=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libhartex_discord_entitycache_core-83f72849f9449b9c.rlib --extern hartex_discord_utils=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libhartex_discord_utils-955e6f9c3a31a5ca.rlib --extern hartex_kafka_utils=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libhartex_kafka_utils-b7063b620b04f3be.rlib --extern hartex_log=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libhartex_log-ac1beba8b3cd4dfc.rlib --extern miette=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libmiette-a8f89bdfd704a7bf.rlib --extern once_cell=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libonce_cell-1e999b721ef15030.rlib --extern rdkafka=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/librdkafka-31b874f6c5386916.rlib --extern serde=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libserde-1a78f3c499e50d58.rlib --extern serde_json=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libserde_json-9847bb4128882422.rlib --extern serde_scan=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libserde_scan-59766ed54e814829.rlib --extern sqlx=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libsqlx-6e42040f5f9ae6a5.rlib --extern time=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libtime-0e6513f6e4d5781a.rlib --extern tracing=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/deps/libtracing-2627174e285ac941.rlib -C target-cpu=native -L native=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/build/ring-514d3ae34146361b/out -L native=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/build/rdkafka-sys-47d50d168ca65131/out/lib -L native=/home/runner/work/HarTex/HarTex/discord-frontend/target/release/build/lz4-sys-f2deb4eb4f71f0b8/out` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
I expected to see this happen: project to be compiled successfully
Instead, this happened: the compiler exited with SIGSEGV
, as shown from output above.
Meta
rustc --version --verbose
:
rustc 1.74.0-nightly (249595b75 2023-08-23)
binary: rustc
commit-hash: 249595b7523fc07a99c1adee90b1947739ca0e5b
commit-date: 2023-08-23
host: x86_64-unknown-linux-gnu
release: 1.74.0-nightly
LLVM version: 17.0.0
P.S. I have tested this on my local Windows machine, with the following version information, in which the compilation works fine:
rustc 1.74.0-nightly (249595b75 2023-08-23)
binary: rustc
commit-hash: 249595b7523fc07a99c1adee90b1947739ca0e5b
commit-date: 2023-08-23
host: x86_64-pc-windows-msvc
release: 1.74.0-nightly
LLVM version: 17.0.0
It seems like the segfault is only reproducible on Linux, but not Windows (I have personally not tested this on macOS, as I don't have an Apple machine at my disposal).
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generationArea: Debugging information in compiled programs (DWARF, PDB, etc.)Category: This is a bug.Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Relevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from stable to nightly.