Build fails error: could not compile `mls-platform-api` (lib) - rustc crashes on sigsegv
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox-esr128 unaffected, firefox133 unaffected, firefox134 unaffected, firefox135 fix-optional, firefox136 fix-optional)
Tracking | Status | |
---|---|---|
firefox-esr128 | --- | unaffected |
firefox133 | --- | unaffected |
firefox134 | --- | unaffected |
firefox135 | --- | fix-optional |
firefox136 | --- | fix-optional |
People
(Reporter: stransky, Assigned: glandium, NeedInfo)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Updated to latest trunk, ran bootstrap, cleared build dir. I'm still getting build failure:
4:28.78 error: rustc interrupted by SIGSEGV, printing backtrace
4:28.79 Compiling idna_glue v0.1.0 (/raid/src/netwerk/base/idna_glue)
4:28.79 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x2c31aa6) [0x7f34a8a31aa6]
4:28.80 /lib64/libc.so.6(+0x19dd0) [0x7f34a5ad2dd0]
4:28.81 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(+0x61f7ab0) [0x7f34a41f7ab0]
4:28.81 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm16DwarfCompileUnit24constructVariableDIEImplERKNS_11DbgVariableEb+0x13fa) [0x7f34a41f70fc]
4:28.82 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0xca5) [0x7f34a4163b25]
4:28.83 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x88d) [0x7f34a416370d]
4:28.83 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x88d) [0x7f34a416370d]
4:28.84 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x88d) [0x7f34a416370d]
4:28.84 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x88d) [0x7f34a416370d]
4:28.85 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x88d) [0x7f34a416370d]
4:28.86 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x88d) [0x7f34a416370d]
4:28.87 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm16DwarfCompileUnit25createAndAddScopeChildrenEPNS_12LexicalScopeERNS_3DIEE+0x88d) [0x7f34a416370d]
4:28.87 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm16DwarfCompileUnit27constructSubprogramScopeDIEEPKNS_12DISubprogramEPNS_12LexicalScopeE+0xe1) [0x7f34a4162521]
4:28.88 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm10DwarfDebug15endFunctionImplEPKNS_15MachineFunctionE+0x224) [0x7f34a41610e8]
4:28.88 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm16DebugHandlerBase11endFunctionEPKNS_15MachineFunctionE+0x63) [0x7f34a41d313d]
4:28.89 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm10AsmPrinter16emitFunctionBodyEv+0x254c) [0x7f34a416b5cc]
4:28.89 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(+0x6169046) [0x7f34a4169046]
4:28.90 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0xd2a) [0x7f34a3f193ba]
4:28.91 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x2f) [0x7f34a3f1866f]
4:28.92 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libLLVM-17-rust-1.76.0-stable.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x266) [0x7f34a4120bba]
4:28.92 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(LLVMRustWriteOutputFile+0x190) [0x7f34aa816358]
4:28.92 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4a15f95) [0x7f34aa815f95]
4:28.92 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4a13713) [0x7f34aa813713]
4:28.92 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4a133c2) [0x7f34aa8133c2]
4:28.92 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4aabbf1) [0x7f34aa8abbf1]
4:28.93 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/librustc_driver-ef0b2e016afc8182.so(+0x4aab6c2) [0x7f34aa8ab6c2]
4:28.93 /home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.so(rust_metadata_std_79729d9c385e1623+0xbe8e5) [0x7f34a5d988e5]
4:28.93 /lib64/libc.so.6(+0x70cd7) [0x7f34a5b29cd7]
4:28.93 /lib64/libc.so.6(+0xf4c8c) [0x7f34a5badc8c]
4:28.93 note: we would appreciate a report at https://github.com/rust-lang/rust
4:28.93 note: backtrace dumped due to SIGSEGV! resuming signal
4:34.40 error: could not compile `mls-platform-api` (lib)
4:34.40 Caused by:
4:34.44 process didn't exit successfully: `/home/komat/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name mls_platform_api --edition=2021 /raid/src/third_party/rust/mls-platform-api/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C panic=abort -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=on --cfg 'feature="gecko"' -C metadata=865e936cd879efe3 -C extra-filename=-865e936cd879efe3 --out-dir /raid/src/objdir-opt/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C linker=/raid/src/build/cargo-linker -L dependency=/raid/src/objdir-opt/x86_64-unknown-linux-gnu/debug/deps -L dependency=/raid/src/objdir-opt/debug/deps --extern bincode=/raid/src/objdir-opt/x86_64-unknown-linux-gnu/debug/deps/libbincode-04ce379b886f75d2.rmeta --extern hex=/raid/src/objdir-opt/x86_64-unknown-linux-gnu/debug/deps/libhex-7a5ba0ff9dc4536e.rmeta --extern mls_rs=/raid/src/objdir-opt/x86_64-unknown-linux-gnu/debug/deps/libmls_rs-310d9833117839f5.rmeta --extern mls_rs_crypto_nss=/raid/src/objdir-opt/x86_64-unknown-linux-gnu/debug/deps/libmls_rs_crypto_nss-d0940a5479201695.rmeta --extern mls_rs_provider_sqlite=/raid/src/objdir-opt/x86_64-unknown-linux-gnu/debug/deps/libmls_rs_provider_sqlite-b9c3cb7e8e4fb7d6.rmeta --extern serde=/raid/src/objdir-opt/x86_64-unknown-linux-gnu/debug/deps/libserde-e5239840e5ae7d50.rmeta --extern serde_json=/raid/src/objdir-opt/x86_64-unknown-linux-gnu/debug/deps/libserde_json-0a46a355df9f8175.rmeta --extern sha2=/raid/src/objdir-opt/x86_64-unknown-linux-gnu/debug/deps/libsha2-a572cfe9119bdaa9.rmeta --extern thiserror=/raid/src/objdir-opt/x86_64-unknown-linux-gnu/debug/deps/libthiserror-dee6f7660f4d1271.rmeta --cap-lints allow -C debuginfo=2 -C force-frame-pointers=yes --cap-lints warn -Clto=off -L native=/raid/src/objdir-opt/dist/bin -L native=/raid/src/objdir-opt/security/nss/lib/nss/nss_nss3 -L native=/raid/src/objdir-opt/security/nss/lib/ssl/ssl_ssl3 -L native=/raid/src/objdir-opt/config/external/nspr/pr` (signal: 11, SIGSEGV: invalid memory reference)
Updated•2 months ago
|
Assignee | ||
Comment 1•2 months ago
|
||
We have jobs on CI building with rustc 1.76.0 and that don't have a problem. Does adding ac_add_options --enable-release
to your mozconfig works around it?
Comment 2•2 months ago
•
|
||
I am failing to reproduce this on the CI or my mac, can you upgrade to rust 1.83 and see it you still have a problem ?
(or something else than 1.76.0...)
Assignee | ||
Comment 3•2 months ago
|
||
I can totally reproduce locally.
Assignee | ||
Comment 4•2 months ago
|
||
And --enable-release totally works around it.
Comment 5•2 months ago
|
||
Set release status flags based on info from the regressing bug 1900537
Assignee | ||
Comment 6•2 months ago
|
||
Affects 1.76.0 and 1.77.0. 1.78.0 is the first version that came with LLVM 18, so this is likely to have been a bug in LLVM 17. Which also doesn't guarantee a version of rustc that is fixed, as downstreams may also be building rustc against difference versions of LLVM.
Assignee | ||
Comment 7•2 months ago
|
||
This is interestingly not reproducible on mac with the same version of rustc, but I think rustc defaults to a different version of DWARF on mac.
Reporter | ||
Comment 8•2 months ago
|
||
Thanks a lot guys, the --enable-release trick works.
Reporter | ||
Updated•2 months ago
|
Assignee | ||
Comment 9•2 months ago
|
||
I got things to compile by emptying either of the following functions (replacing their body with todo!()
) in the mls-rs
(not mls-platform-api
!) crate:
TreeKemPublic::update_hashes
tree_hash
I haven't reduced further.
Assignee | ||
Comment 10•2 months ago
|
||
I have a one-liner work-around/fix (as well as some improvement to code I saw in passing), how do we go about patching this/reviewing this, considering this comes from a forked repo on github?
Assignee | ||
Updated•2 months ago
|
Comment 11•2 months ago
|
||
If you want to contribute the patch, you could PR the change to the github repo and I could review and upgrade the crates in mc ?
If you want to point me to the right place, I can make the changes and find a reviewer to look at those before I merge on Github, then upgrate in mc.
Updated•1 month ago
|
Comment 12•1 month ago
|
||
Glandium, fixed it upstream [0]... which was highly appreciated by the mls-rs team... : )
Assignee | ||
Comment 13•1 month ago
|
||
Can you merge the PR on your repo and update the in-tree version, then uplift to beta?
Comment 14•20 days ago
|
||
Yes, I am trying to remove our fork of mls-rs and use it directly, which will fix the issue as you patched upstream.
I am not sure about the timeline though.
Description
•