Open zhengcan opened 11 months ago
Can you reproduce this bug using the latest nightly version to get the new error output?
The error changed. :(
cargo clean
RUSTFLAGS="-Z threads=8" cargo build -p my-package --timings
rustc 1.76.0-nightly (5facb422f 2023-11-28)
binary: rustc
commit-hash: 5facb422f8a5a61df515572fe79b02433639d565
commit-date: 2023-11-28
host: x86_64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.5
Compiling tonic-build v0.9.2
Compiling pulsar v6.1.0
Compiling sqlx v0.7.3
Compiling sea-query-binder v0.5.0
Compiling tikv-jemalloc-ctl v0.5.4
Compiling tikv-jemallocator v0.5.4
Compiling sea-orm v0.12.7
thread 'rustc' panicked at /rustc/5facb422f8a5a61df515572fe79b02433639d565/compiler/rustc_middle/src/ty/context/tls.rs:111:50:
no ImplicitCtxt stored in tls
stack backtrace:
0: 0x7fad38b0fa2c - std::backtrace_rs::backtrace::libunwind::trace::h2e7c57e7e17503dd
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
1: 0x7fad38b0fa2c - std::backtrace_rs::backtrace::trace_unsynchronized::hc4f8c7ce34564c14
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7fad38b0fa2c - std::sys_common::backtrace::_print_fmt::hf00de5dd7a8c72f6
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/std/src/sys_common/backtrace.rs:68:5
3: 0x7fad38b0fa2c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h203547b5fd9015f9
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7fad38b62a70 - core::fmt::rt::Argument::fmt::hec0b869fa2b0c04d
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/core/src/fmt/rt.rs:142:9
5: 0x7fad38b62a70 - core::fmt::write::h4520556dae4cbd33
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/core/src/fmt/mod.rs:1120:17
6: 0x7fad38b0385f - std::io::Write::write_fmt::h0dc0eb5dbe759f9f
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/std/src/io/mod.rs:1766:15
7: 0x7fad38b0f814 - std::sys_common::backtrace::_print::h2c1cf2a2304e4249
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/std/src/sys_common/backtrace.rs:47:5
8: 0x7fad38b0f814 - std::sys_common::backtrace::print::hfeadd49293d7243e
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/std/src/sys_common/backtrace.rs:34:9
9: 0x7fad38b124a7 - std::panicking::default_hook::{{closure}}::h8cfa62dd09a2dad0
10: 0x7fad38b1220f - std::panicking::default_hook::h2fc7c3bf66bcf395
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/std/src/panicking.rs:292:9
11: 0x7fad3b877710 - std[bcbbccee7a0d5073]::panicking::update_hook::<alloc[27fcb56d285de1e]::boxed::Box<rustc_driver_impl[e65ba84121e83d63]::install_ice_hook::{closure#0}>>::{closure#0}
12: 0x7fad38b12be8 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h3e96e80b5f2fd625
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/alloc/src/boxed.rs:2021:9
13: 0x7fad38b12be8 - std::panicking::rust_panic_with_hook::h41e1d8d523f4086e
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/std/src/panicking.rs:783:13
14: 0x7fad38b1293e - std::panicking::begin_panic_handler::{{closure}}::h7f1cbcb8e5015738
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/std/src/panicking.rs:657:13
15: 0x7fad38b0fef6 - std::sys_common::backtrace::__rust_end_short_backtrace::hc8dd57cf42636e84
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/std/src/sys_common/backtrace.rs:171:18
16: 0x7fad38b126a2 - rust_begin_unwind
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/std/src/panicking.rs:645:5
17: 0x7fad38b5f145 - core::panicking::panic_fmt::h7b70a2d3ae61769a
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/core/src/panicking.rs:72:14
18: 0x7fad38b5eef3 - core::panicking::panic_display::h29bc7a085b2ba35c
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/core/src/panicking.rs:193:5
19: 0x7fad38b5eef3 - core::panicking::panic_str::h32de02550915d466
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/core/src/panicking.rs:168:5
20: 0x7fad38b5eef3 - core::option::expect_failed::h34cf594936540cfa
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/core/src/option.rs:1980:5
21: 0x7fad3b877468 - rustc_interface[25ba8a03b0702628]::util::run_in_thread_pool_with_globals::<rustc_interface[25ba8a03b0702628]::interface::run_compiler<core[3cbafecc582d7c30]::result::Result<(), rustc_span[3326ba25d5711314]::ErrorGuaranteed>, rustc_driver_impl[e65ba84121e83d63]::run_compiler::{closure#0}>::{closure#0}, core[3cbafecc582d7c30]::result::Result<(), rustc_span[3326ba25d5711314]::ErrorGuaranteed>>::{closure#2}
22: 0x7fad3b4691a5 - <rayon_core[1f88bcfda42dec2e]::registry::WorkerThread>::wait_until_cold
23: 0x7fad3b465d73 - <rayon_core[1f88bcfda42dec2e]::registry::ThreadBuilder>::run
24: 0x7fad3b8796d7 - <<crossbeam_utils[48f7014fbcba11b5]::thread::ScopedThreadBuilder>::spawn<<rayon_core[1f88bcfda42dec2e]::ThreadPoolBuilder>::build_scoped<rustc_interface[25ba8a03b0702628]::util::run_in_thread_pool_with_globals<rustc_interface[25ba8a03b0702628]::interface::run_compiler<core[3cbafecc582d7c30]::result::Result<(), rustc_span[3326ba25d5711314]::ErrorGuaranteed>, rustc_driver_impl[e65ba84121e83d63]::run_compiler::{closure#0}>::{closure#0}, core[3cbafecc582d7c30]::result::Result<(), rustc_span[3326ba25d5711314]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#0}, rustc_interface[25ba8a03b0702628]::util::run_in_thread_pool_with_globals<rustc_interface[25ba8a03b0702628]::interface::run_compiler<core[3cbafecc582d7c30]::result::Result<(), rustc_span[3326ba25d5711314]::ErrorGuaranteed>, rustc_driver_impl[e65ba84121e83d63]::run_compiler::{closure#0}>::{closure#0}, core[3cbafecc582d7c30]::result::Result<(), rustc_span[3326ba25d5711314]::ErrorGuaranteed>>::{closure#3}::{closure#0}::{closure#1}, core[3cbafecc582d7c30]::result::Result<(), rustc_span[3326ba25d5711314]::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, ()>::{closure#0} as core[3cbafecc582d7c30]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
25: 0x7fad3b87285e - std[bcbbccee7a0d5073]::sys_common::backtrace::__rust_begin_short_backtrace::<alloc[27fcb56d285de1e]::boxed::Box<dyn core[3cbafecc582d7c30]::ops::function::FnOnce<(), Output = ()> + core[3cbafecc582d7c30]::marker::Send>, ()>
26: 0x7fad3b879363 - <<std[bcbbccee7a0d5073]::thread::Builder>::spawn_unchecked_<alloc[27fcb56d285de1e]::boxed::Box<dyn core[3cbafecc582d7c30]::ops::function::FnOnce<(), Output = ()> + core[3cbafecc582d7c30]::marker::Send>, ()>::{closure#1} as core[3cbafecc582d7c30]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
27: 0x7fad38b1ca85 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h0287aedd2e9bb2a6
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/alloc/src/boxed.rs:2007:9
28: 0x7fad38b1ca85 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha2a303783003ab31
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/alloc/src/boxed.rs:2007:9
29: 0x7fad38b1ca85 - std::sys::unix::thread::Thread::new::thread_start::h9ef087ca1e700a25
at /rustc/5facb422f8a5a61df515572fe79b02433639d565/library/std/src/sys/unix/thread.rs:108:17
30: 0x7fad3843f1ca - start_thread
31: 0x7fad380aae73 - clone
32: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: please attach the file at `/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tikv-jemallocator-0.5.4/rustc-ice-2023-11-29T12_29_38-3321950.txt` to your bug report
note: compiler flags: --crate-type rlib -C embed-bitcode=no -C debuginfo=2 -C strip=debuginfo -Z threads=8
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
Rayon: detected unexpected panic; aborting
sccache: Compiler killed by signal 6
error: could not compile `tikv-jemallocator` (lib)
Caused by:
process didn't exit successfully: `/root/.cargo/bin/sccache /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name tikv_jemallocator --edition=2018 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tikv-jemallocator-0.5.4/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=193 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="background_threads_runtime_support"' --cfg 'feature="default"' --cfg 'feature="profiling"' --cfg 'feature="stats"' --cfg 'feature="unprefixed_malloc_on_supported_platforms"' -C metadata=6041b40d6c440df4 -C extra-filename=-6041b40d6c440df4 --out-dir /xxx/target/debug/deps -C strip=debuginfo -L dependency=/xxx/target/debug/deps --extern libc=/xxx/target/debug/deps/liblibc-bb657b5c4e3876b1.rmeta --extern tikv_jemalloc_sys=/xxx/target/debug/deps/libtikv_jemalloc_sys-e1d74beb1ab71759.rmeta --cap-lints allow -Z threads=8 -L native=/xxx/target/debug/build/tikv-jemalloc-sys-327bd943d12d3a35/out/build/lib` (exit status: 254)
warning: build failed, waiting for other jobs to finish...
That's all right. This is another bug that needs to be fixed
When trying to build again, I found that the rustc failed to build pulsar-rs.
git clone https://github.com/streamnative/pulsar-rs
cd pulsar-rs
cargo +nightly build
(with sccache)
Compiling reqwest v0.11.22
Compiling oauth2 v4.4.2
Compiling openidconnect v3.4.0
sccache: Compile terminated by signal 9
error: could not compile `pulsar` (lib)
(without sccache)
Compiling reqwest v0.11.22
Compiling oauth2 v4.4.2
Compiling openidconnect v3.4.0
error: could not compile `pulsar` (lib)
Caused by:
process didn't exit successfully: `/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name pulsar --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=180 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="async-native-tls"' --cfg 'feature="async-std"' --cfg 'feature="async-std-runtime"' --cfg 'feature="asynchronous-codec"' --cfg 'feature="auth-oauth2"' --cfg 'feature="compression"' --cfg 'feature="data-url"' --cfg 'feature="default"' --cfg 'feature="flate2"' --cfg 'feature="lz4"' --cfg 'feature="native-tls"' --cfg 'feature="oauth2"' --cfg 'feature="openidconnect"' --cfg 'feature="serde"' --cfg 'feature="serde_json"' --cfg 'feature="snap"' --cfg 'feature="tokio"' --cfg 'feature="tokio-native-tls"' --cfg 'feature="tokio-runtime"' --cfg 'feature="tokio-util"' --cfg 'feature="zstd"' -C metadata=7bc5fdac31e60d7a -C extra-filename=-7bc5fdac31e60d7a --out-dir /data/code/pulsar-rs/target/debug/deps -C incremental=/data/code/pulsar-rs/target/debug/incremental -L dependency=/data/code/pulsar-rs/target/debug/deps --extern async_native_tls=/data/code/pulsar-rs/target/debug/deps/libasync_native_tls-ec75ca68f4b2bdcf.rmeta --extern async_std=/data/code/pulsar-rs/target/debug/deps/libasync_std-0d9c5c5f29ac8bd0.rmeta --extern async_trait=/data/code/pulsar-rs/target/debug/deps/libasync_trait-149d91d3b6aa4c8b.so --extern asynchronous_codec=/data/code/pulsar-rs/target/debug/deps/libasynchronous_codec-8d923c9cc1c502ce.rmeta --extern bit_vec=/data/code/pulsar-rs/target/debug/deps/libbit_vec-2a7a3301ea676754.rmeta --extern bytes=/data/code/pulsar-rs/target/debug/deps/libbytes-9a0875bf2af5b73e.rmeta --extern chrono=/data/code/pulsar-rs/target/debug/deps/libchrono-d1b4672dea75f3da.rmeta --extern crc=/data/code/pulsar-rs/target/debug/deps/libcrc-08749639087a7b76.rmeta --extern data_url=/data/code/pulsar-rs/target/debug/deps/libdata_url-9e3c4cdd54ef68e5.rmeta --extern flate2=/data/code/pulsar-rs/target/debug/deps/libflate2-197315befb314de6.rmeta --extern futures=/data/code/pulsar-rs/target/debug/deps/libfutures-5199b02cac7e3855.rmeta --extern futures_io=/data/code/pulsar-rs/target/debug/deps/libfutures_io-7107eefe0a58e433.rmeta --extern futures_timer=/data/code/pulsar-rs/target/debug/deps/libfutures_timer-dedb0246f629f831.rmeta --extern log=/data/code/pulsar-rs/target/debug/deps/liblog-2700e1eecb3598fa.rmeta --extern lz4=/data/code/pulsar-rs/target/debug/deps/liblz4-a2372642d3f553ca.rmeta --extern native_tls=/data/code/pulsar-rs/target/debug/deps/libnative_tls-8a7d688c514d555f.rmeta --extern nom=/data/code/pulsar-rs/target/debug/deps/libnom-2a80471a153e9134.rmeta --extern oauth2=/data/code/pulsar-rs/target/debug/deps/liboauth2-3139848ddc944efd.rmeta --extern openidconnect=/data/code/pulsar-rs/target/debug/deps/libopenidconnect-719ac853ebca73ad.rmeta --extern pem=/data/code/pulsar-rs/target/debug/deps/libpem-5aa7e115a1b6deca.rmeta --extern prost=/data/code/pulsar-rs/target/debug/deps/libprost-3dcdb3bc23e5951b.rmeta --extern prost_derive=/data/code/pulsar-rs/target/debug/deps/libprost_derive-7a9d3cd015a82a23.so --extern rand=/data/code/pulsar-rs/target/debug/deps/librand-b6dffe97f63d671d.rmeta --extern regex=/data/code/pulsar-rs/target/debug/deps/libregex-8f510260ca59c4e9.rmeta --extern serde=/data/code/pulsar-rs/target/debug/deps/libserde-bf4c8b7a9306957d.rmeta --extern serde_json=/data/code/pulsar-rs/target/debug/deps/libserde_json-9b224220d4824172.rmeta --extern snap=/data/code/pulsar-rs/target/debug/deps/libsnap-aa6b714c7798f0ce.rmeta --extern tokio=/data/code/pulsar-rs/target/debug/deps/libtokio-66fcbe21b2a00d79.rmeta --extern tokio_native_tls=/data/code/pulsar-rs/target/debug/deps/libtokio_native_tls-16c371cb66cea536.rmeta --extern tokio_util=/data/code/pulsar-rs/target/debug/deps/libtokio_util-36ed6fc4b067b087.rmeta --extern url=/data/code/pulsar-rs/target/debug/deps/liburl-f7efc9f070eef56b.rmeta --extern uuid=/data/code/pulsar-rs/target/debug/deps/libuuid-6cb3175465a6f803.rmeta --extern zstd=/data/code/pulsar-rs/target/debug/deps/libzstd-731b9c5a4a624487.rmeta -L native=/data/code/pulsar-rs/target/debug/build/lz4-sys-0f1fc51cbaa8fce8/out -L native=/data/code/pulsar-rs/target/debug/build/ring-c039fe4ebd3fca87/out -L native=/data/code/pulsar-rs/target/debug/build/zstd-sys-903f9b70ea073e35/out`
(signal: 9, SIGKILL: kill)
This looks like a duplicate of https://github.com/rust-lang/rust/issues/111522, but I won't close because another issue about deadlock was mentioned above and I'm not sure what is its status.
Also looks like a duplicate of https://github.com/rust-lang/rust/issues/117899.
Command Line
Meta
rustc --version --verbose
:Error output
Backtrace
``` n/a (hard to reproduce) ```