Closed
Description
Code
I tried this code:
nix build github:homotopy-io/homotopy-rs?rev=0cc608109c699f7fac2e7979f2f0d440ac4ac786
I expected to see this happen: successful compilation
Instead, this happened:
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/v4fmilsv73fjm9gy6ggvdlkds4m8a9af-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
[naersk] cargo_version (read): 1.60.0 (d1fd9fe 2022-03-01)
[naersk] cargo_message_format (set): json-diagnostic-rendered-ansi
[naersk] cargo_release: --release
[naersk] cargo_options:
[naersk] cargo_build_options: $cargo_release -j "$NIX_BUILD_CORES" --message-format=$cargo_message_format -p homotopy-web
[naersk] cargo_test_options: $cargo_release -j "$NIX_BUILD_CORES"
[naersk] RUST_TEST_THREADS: 32
[naersk] cargo_bins_jq_filter: select(.reason == "compiler-artifact" and .executable != null and .profile.test == false)
[naersk] cargo_build_output_json (created): /build/tmp.AMfM0fmYyn
[naersk] crate_sources: /nix/store/hjmyjcasiifgnpm0s0ss264ry3100iq8-crates-io
[naersk] RUSTFLAGS:
[naersk] CARGO_BUILD_RUSTFLAGS:
[naersk] CARGO_BUILD_RUSTFLAGS (updated): --remap-path-prefix /nix/store/hjmyjcasiifgnpm0s0ss264ry3100iq8-crates-io=/sources
[naersk] pre-installing dep /nix/store/4risald0r359aliark65q2fmhif5ml0j-homotopy-web-deps-0.1.2
@nix { "action": "setPhase", "phase": "buildPhase" }
building
cargo build $cargo_release -j "$NIX_BUILD_CORES" --message-format=$cargo_message_format -p homotopy-web
�[0m�[0m�[1m�[32m Compiling�[0m homotopy-common v0.1.0 (/build/source/homotopy-common)
�[0m�[0m�[1m�[32m Compiling�[0m homotopy-core v0.1.0 (/build/source/homotopy-core)
�[0m�[0m�[1m�[32m Compiling�[0m homotopy-graphics v0.1.0 (/build/source/homotopy-graphics)
�[0m�[0m�[1m�[32m Compiling�[0m homotopy-web v0.1.2 (/build/source/homotopy-web)
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/librustc_driver-75e5f32fc3580f6c.so(+0x4b3d23)[0x7ffff469bd23]
/nix/store/ayrsyv7npr0lcbann4k9lxr19x813f0z-glibc-2.34-115/lib/libc.so.6(+0x41100)[0x7ffff3cab100]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/libLLVM-14-rust-1.60.0-stable.so(_ZN4llvm10BasicBlockC1ERNS_11LLVMContextERKNS_5TwineEPNS_8FunctionEPS0_+0xc5)[0x7ffff132a075]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/libLLVM-14-rust-1.60.0-stable.so(+0x2707510)[0x7ffff0f23510]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/libLLVM-14-rust-1.60.0-stable.so(+0x27008af)[0x7ffff0f1c8af]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/libLLVM-14-rust-1.60.0-stable.so(_ZN4llvm11simplifyCFGEPNS_10BasicBlockERKNS_19TargetTransformInfoEPNS_14DomTreeUpdaterERKNS_18SimplifyCFGOptionsENS_8ArrayRefINS_6WeakVHEEE+0x2315)[0x7ffff0ed8965]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/libLLVM-14-rust-1.60.0-stable.so(+0x26b7bc5)[0x7ffff0ed3bc5]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/libLLVM-14-rust-1.60.0-stable.so(+0x26b529a)[0x7ffff0ed129a]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/libLLVM-14-rust-1.60.0-stable.so(+0x2387229)[0x7ffff0ba3229]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/libLLVM-14-rust-1.60.0-stable.so(_ZN4llvm27ModuleToFunctionPassAdaptor3runERNS_6ModuleERNS_15AnalysisManagerIS1_JEEE+0x329)[0x7ffff1aa7659]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/libLLVM-14-rust-1.60.0-stable.so(+0x328b31d)[0x7ffff1aa731d]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/libLLVM-14-rust-1.60.0-stable.so(_ZN4llvm11PassManagerINS_6ModuleENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0x144)[0x7ffff19285c4]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/librustc_driver-75e5f32fc3580f6c.so(+0x23dfef1)[0x7ffff65c7ef1]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/librustc_driver-75e5f32fc3580f6c.so(+0x23cdb54)[0x7ffff65b5b54]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/librustc_driver-75e5f32fc3580f6c.so(+0x23ce0a1)[0x7ffff65b60a1]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/librustc_driver-75e5f32fc3580f6c.so(+0x2365d7d)[0x7ffff654dd7d]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/librustc_driver-75e5f32fc3580f6c.so(+0x238380f)[0x7ffff656b80f]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/librustc_driver-75e5f32fc3580f6c.so(+0x2372bc7)[0x7ffff655abc7]
/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/lib/libstd-8d61b92a0a02f53a.so(rust_metadata_std_cd3cf6af28dff6de+0xa7d03)[0x7ffff3f21d03]
/nix/store/ayrsyv7npr0lcbann4k9lxr19x813f0z-glibc-2.34-115/lib/libc.so.6(+0x89eb2)[0x7ffff3cf3eb2]
/nix/store/ayrsyv7npr0lcbann4k9lxr19x813f0z-glibc-2.34-115/lib/libc.so.6(+0x10c31c)[0x7ffff3d7631c]
�[0m�[0m�[1m�[31merror�[0m�[1m:�[0m could not compile `homotopy-web`
Caused by:
process didn't exit successfully: `/nix/store/v1kdj5bb8pp5bb3pk23s96nfbfpic6f0-rust-minimal-1.60.0/bin/rustc --crate-name homotopy_web --edition=2021 homotopy-web/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type cdylib --crate-type rlib --emit=dep-info,link -C opt-level=3 --cfg 'feature="console_error_panic_hook"' --cfg 'feature="default"' -C metadata=d0edfb7c13dcde66 --out-dir /build/source/target/wasm32-unknown-unknown/release/deps --target wasm32-unknown-unknown -L dependency=/build/source/target/wasm32-unknown-unknown/release/deps -L dependency=/build/source/target/release/deps --extern arrayvec=/build/source/target/wasm32-unknown-unknown/release/deps/libarrayvec-064facd1d3b4ac08.rlib --extern closure=/build/source/target/wasm32-unknown-unknown/release/deps/libclosure-22ef8d2fe5957b87.rlib --extern console_error_panic_hook=/build/source/target/wasm32-unknown-unknown/release/deps/libconsole_error_panic_hook-2057c4514695902f.rlib --extern euclid=/build/source/target/wasm32-unknown-unknown/release/deps/libeuclid-3dae85bc5bb07a71.rlib --extern gloo=/build/source/target/wasm32-unknown-unknown/release/deps/libgloo-b43aad26b340de48.rlib --extern gloo_timers=/build/source/target/wasm32-unknown-unknown/release/deps/libgloo_timers-bc23fdea00850d70.rlib --extern homotopy_common=/build/source/target/wasm32-unknown-unknown/release/deps/libhomotopy_common-0ba795d2fc24788e.rlib --extern homotopy_core=/build/source/target/wasm32-unknown-unknown/release/deps/libhomotopy_core-5b86ed58e29945d8.rlib --extern homotopy_graphics=/build/source/target/wasm32-unknown-unknown/release/deps/libhomotopy_graphics-5b9942fcbc1b42fd.rlib --extern im=/build/source/target/wasm32-unknown-unknown/release/deps/libim-f68605f388142b72.rlib --extern instant=/build/source/target/wasm32-unknown-unknown/release/deps/libinstant-15f531c8d8e23534.rlib --extern js_sys=/build/source/target/wasm32-unknown-unknown/release/deps/libjs_sys-d892199c945c5dfe.rlib --extern log=/build/source/target/wasm32-unknown-unknown/release/deps/liblog-f0424ddc1a3d06f8.rlib --extern lyon_path=/build/source/target/wasm32-unknown-unknown/release/deps/liblyon_path-4c1b5b611b75ca6b.rlib --extern obake=/build/source/target/wasm32-unknown-unknown/release/deps/libobake-5427d7eb3090cf45.rlib --extern palette=/build/source/target/wasm32-unknown-unknown/release/deps/libpalette-087ea92923972b9c.rlib --extern paste=/build/source/target/release/deps/libpaste-9f4ba831280a7332.so --extern quote=/build/source/target/wasm32-unknown-unknown/release/deps/libquote-0bea2f79134eb277.rlib --extern rmp_serde=/build/source/target/wasm32-unknown-unknown/release/deps/librmp_serde-104a28574bf452c8.rlib --extern serde=/build/source/target/wasm32-unknown-unknown/release/deps/libserde-8cef68772708519b.rlib --extern syn=/build/source/target/wasm32-unknown-unknown/release/deps/libsyn-fc3acf24a1e49ab3.rlib --extern thiserror=/build/source/target/wasm32-unknown-unknown/release/deps/libthiserror-033ceb9e6bdfab8c.rlib --extern ultraviolet=/build/source/target/wasm32-unknown-unknown/release/deps/libultraviolet-40630f624adb9f9d.rlib --extern wasm_bindgen=/build/source/target/wasm32-unknown-unknown/release/deps/libwasm_bindgen-a75edcdc1a8fc987.rlib --extern wasm_logger=/build/source/target/wasm32-unknown-unknown/release/deps/libwasm_logger-235f2a8f6828be52.rlib --extern web_sys=/build/source/target/wasm32-unknown-unknown/release/deps/libweb_sys-96345e1705e5ba46.rlib --extern yew=/build/source/target/wasm32-unknown-unknown/release/deps/libyew-e97f053b58fd785b.rlib --extern yew_agent=/build/source/target/wasm32-unknown-unknown/release/deps/libyew_agent-af8da546ff0d9932.rlib --extern yew_macro=/build/source/target/release/deps/libyew_macro-967187fef99f778d.so --remap-path-prefix /nix/store/hjmyjcasiifgnpm0s0ss264ry3100iq8-crates-io=/sources` (signal: 11, SIGSEGV: invalid memory reference)
[naersk] cargo returned with exit code 101, exiting
Version it worked on
It most recently worked on (nix build github:homotopy-io/homotopy-rs?rev=5ba852c72a3e552d3668233a14fd9769dea0797e
):
rustc 1.59.0 (9d1b2106e 2022-02-23)
binary: rustc
commit-hash: 9d1b2106e23b1abd32fce1f17267604a5102f57a
commit-date: 2022-02-23
host: x86_64-unknown-linux-gnu
release: 1.59.0
LLVM version: 13.0.0
Version with regression
rustc --version --verbose
:
rustc 1.60.0 (7737e0b5c 2022-04-04)
binary: rustc
commit-hash: 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c
commit-date: 2022-04-04
host: x86_64-unknown-linux-gnu
release: 1.60.0
LLVM version: 14.0.0
Other information
We've determined that https://github.com/homotopy-io/homotopy-rs/blob/0cc608109c699f7fac2e7979f2f0d440ac4ac786/homotopy-web/src/app/workspace.rs#L101 is the culprit; either removing that line or replacing <0>
with <1>
both fix the compiler crashing (although this does not produce the code we want).
This looks like it's possibly related to the LLVM version.
@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Category: This is a bug.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Target: WASM (WebAssembly), http://webassembly.org/High priorityPerformance or correctness regression from one stable version to another.