Skip to content

Nightly 1.68.0 failed to compile tokio with -Zprint-type-sizes #105589

Closed
@NobodyXu

Description

@NobodyXu

When running RUSTFLAGS=-Zprint-type-sizes cargo +nightly build --release >/tmp/output on cargo-binstall, rustc failed to compile tokio 1.23.0 with features sync, macros, time, io-util, net, time, rt, rt-multi-thread, fs, parking_lot, process and signal.

Meta

rustc --version --verbose:

rustc 1.68.0-nightly (bdb07a8ec 2022-12-11)
binary: rustc
commit-hash: bdb07a8ec8e77aa10fb84fae1d4ff71c21180bb4
commit-date: 2022-12-11
host: aarch64-apple-darwin
release: 1.68.0-nightly
LLVM version: 15.0.6

Error output

Command RUSTFLAGS=-Zprint-type-sizes cargo +nightly build --release >/tmp/output:

thread 'rustc' panicked at 'max_variant_size 145 > 144 overall_size', compiler/rustc_session/src/code_stat
s.rs:177:25
stack backtrace:
   0:        0x1012da874 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::f
mt::hc6661a943383350c
   1:        0x10132bb2c - core::fmt::write::hc08c1be3b97e4ce1
   2:        0x1012cdf2c - std::io::Write::write_fmt::he580cbfa9bcbf52a
   3:        0x1012da688 - std::sys_common::backtrace::print::h4528ca61d4f80cf9
   4:        0x1012dd138 - std::panicking::default_hook::{{closure}}::haca2542124caa09a
   5:        0x1012dce90 - std::panicking::default_hook::h8935004a9fbeb3ac
   6:        0x1094d4894 - rustc_driver[99fe8fd09beedb97]::DEFAULT_HOOK::{closure#0}::{closure#0}
   7:        0x1012dd830 - std::panicking::rust_panic_with_hook::h45cd5cdcffa82620
   8:        0x1012dd628 - std::panicking::begin_panic_handler::{{closure}}::h48e9312c235b6ab0
   9:        0x1012dacdc - std::sys_common::backtrace::__rust_end_short_backtrace::h5673d65f31c7265c
  10:        0x1012dd384 - _rust_begin_unwind
  11:        0x101357660 - core::panicking::panic_fmt::h9e2ef469fe5ca9e4
  12:        0x10d3e1ae8 - <rustc_session[7b5d2ae7e7b7fd4b]::code_stats::CodeStats>::print_type_sizes
  13:        0x1094b1358 - rustc_span[7ba562c801adb65a]::with_source_map::<core[4ca30972f44092a6]::result:
:Result<(), rustc_errors[5a4db3fef831c659]::ErrorGuaranteed>, rustc_interface[559bb8e04aee6111]::interface
::run_compiler<core[4ca30972f44092a6]::result::Result<(), rustc_errors[5a4db3fef831c659]::ErrorGuaranteed>
, rustc_driver[99fe8fd09beedb97]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  14:        0x1094a4dd8 - <scoped_tls[cd5ab3257e1c42c]::ScopedKey<rustc_span[7ba562c801adb65a]::SessionGl
obals>>::set::<rustc_interface[559bb8e04aee6111]::interface::run_compiler<core[4ca30972f44092a6]::result::
Result<(), rustc_errors[5a4db3fef831c659]::ErrorGuaranteed>, rustc_driver[99fe8fd09beedb97]::run_compiler:
:{closure#1}>::{closure#0}, core[4ca30972f44092a6]::result::Result<(), rustc_errors[5a4db3fef831c659]::Err
orGuaranteed>>
  15:        0x109479ae0 - std[6cca96a9eb021ef0]::sys_common::backtrace::__rust_begin_short_backtrace::<ru
stc_interface[559bb8e04aee6111]::util::run_in_thread_pool_with_globals<rustc_interface[559bb8e04aee6111]::
interface::run_compiler<core[4ca30972f44092a6]::result::Result<(), rustc_errors[5a4db3fef831c659]::ErrorGu
aranteed>, rustc_driver[99fe8fd09beedb97]::run_compiler::{closure#1}>::{closure#0}, core[4ca30972f44092a6]
::result::Result<(), rustc_errors[5a4db3fef831c659]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[4ca
30972f44092a6]::result::Result<(), rustc_errors[5a4db3fef831c659]::ErrorGuaranteed>>
  16:        0x109460740 - <<std[6cca96a9eb021ef0]::thread::Builder>::spawn_unchecked_<rustc_interface[559
bb8e04aee6111]::util::run_in_thread_pool_with_globals<rustc_interface[559bb8e04aee6111]::interface::run_co
mpiler<core[4ca30972f44092a6]::result::Result<(), rustc_errors[5a4db3fef831c659]::ErrorGuaranteed>, rustc_
driver[99fe8fd09beedb97]::run_compiler::{closure#1}>::{closure#0}, core[4ca30972f44092a6]::result::Result<
(), rustc_errors[5a4db3fef831c659]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[4ca30972f44092a6]::r
esult::Result<(), rustc_errors[5a4db3fef831c659]::ErrorGuaranteed>>::{closure#1} as core[4ca30972f44092a6]
::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  17:        0x1012e5c4c - std::sys::unix::thread::Thread::new::thread_start::h6a3ce04994adbf58
  18:        0x18062e06c - __pthread_deallocate

error: internal compiler error: unexpected panic

note: 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: rustc 1.68.0-nightly (bdb07a8ec 2022-12-11) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C opt-level=z -C panic=abort -C linker-plugin-lto -C codegen-units
=1 -C strip=symbols -Z print-type-sizes

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
   Compiling chrono v0.4.23
error: could not compile `tokio`
warning: build failed, waiting for other jobs to finish...

Metadata

Metadata

Labels

C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions