Skip to content

[ICE]: panic while checking doc inside on_disk_cache.rs #154818

@camc314

Description

@camc314

https://github.com/oxc-project/oxc/actions/runs/23981979542/job/69947695852?pr=20936

Code

I'm not sure 

Meta

rustc --version --verbose:

 latest update on 2026-04-04, rust version 1.96.0-nightly (2972b5e59 2026-04-03)

Error output

   Compiling oxc_napi v0.123.0 (/home/runner/work/oxc/oxc/crates/oxc_napi)
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 make sure that you have updated to the latest nightly

note: please attach the file at `/home/runner/work/oxc/oxc/rustc-ice-2026-04-04T15_35_13-308.txt` to your bug report

note: rustc 1.96.0-nightly (2972b5e59 2026-04-03) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C embed-bitcode=no -C incremental=[REDACTED] -C strip=debuginfo -C linker-features=-lld

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

query stack during panic:
#0 [analysis] running analysis passes on crate `oxc_data_structures`
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 typeck_root(oxc_data_structures[13a5]::slice_iter::{impl#1}::advance_unchecked)
end of try_mark_green dep node stack
error: could not compile `oxc_data_structures` (lib)

Caused by:
  process didn't exit successfully: `/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name oxc_data_structures --edition=2024 crates/oxc_data_structures/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no '--warn=clippy::pedantic' '--warn=clippy::nursery' '--warn=clippy::complexity' '--warn=clippy::cargo' '--warn=clippy::all' '--allow=clippy::wildcard_imports' '--allow=clippy::useless_let_if_seq' '--allow=clippy::use_self' --warn=unused_unsafe '--warn=clippy::unused_result_ok' '--warn=clippy::unused_peekable' --warn=unsafe_op_in_unsafe_fn '--warn=clippy::unnecessary_safety_comment' --warn=unit-bindings '--warn=clippy::unimplemented' --warn=unexpected_cfgs '--warn=clippy::undocumented_unsafe_blocks' '--allow=clippy::too_many_lines' '--allow=clippy::too_many_arguments' '--warn=clippy::too_long_first_doc_paragraph' '--warn=clippy::todo' --warn=tail_expr_drop_order '--warn=clippy::suspicious_operation_groupings' '--allow=clippy::struct_excessive_bools' '--allow=clippy::similar_names' '--allow=clippy::significant_drop_tightening' '--warn=clippy::significant_drop_in_scrutinee' '--warn=clippy::self_named_module_files' '--warn=clippy::rest_pat_in_fully_bound_structs' '--warn=clippy::redundant_clone' '--warn=clippy::rc_mutex' '--warn=clippy::rc_buffer' '--warn=clippy::pub_underscore_fields' '--warn=clippy::print_stdout' '--warn=clippy::print_stderr' '--warn=clippy::precedence_bits' '--warn=clippy::pathbuf_init_then_push' '--allow=clippy::or_fun_call' '--allow=clippy::option_if_let_else' '--warn=clippy::non_zero_suggestions' '--allow=clippy::non_std_lazy_statics' '--allow=clippy::non_send_fields_in_send_ty' --warn=non_ascii_idents '--allow=clippy::must_use_candidate' '--allow=clippy::multiple_crate_versions' '--allow=clippy::missing_const_for_fn' '--warn=clippy::map_with_unused_argument_over_ranges' '--warn=clippy::iter_on_single_items' '--warn=clippy::infinite_loop' '--allow=clippy::impl_trait_in_params' '--warn=clippy::get_unwrap' '--allow=clippy::fn_params_excessive_bools' '--warn=clippy::filetype_is_file' '--allow=clippy::fallible_impl_from' '--warn=clippy::exit' '--warn=clippy::empty_structs_with_brackets' '--warn=clippy::empty_drop' '--allow=clippy::doc_markdown' '--warn=clippy::dbg_macro' '--allow=clippy::cognitive_complexity' '--warn=clippy::clone_on_ref_ptr' '--allow=clippy::branches_sharing_code' '--warn=clippy::allow_attributes' --warn=absolute_paths_not_starting_with_crate --check-cfg 'cfg(coverage)' --check-cfg 'cfg(coverage_nightly)' --cfg 'feature="assert_unchecked"' --cfg 'feature="box_macros"' --cfg 'feature="code_buffer"' --cfg 'feature="default"' --cfg 'feature="fieldless_enum"' --cfg 'feature="inline_string"' --cfg 'feature="rope"' --cfg 'feature="slice_iter"' --cfg 'feature="stack"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("all", "assert_unchecked", "box_macros", "code_buffer", "default", "fieldless_enum", "inline_string", "rope", "slice_iter", "stack"))' -C metadata=1fd2e6fed5b0790b -C extra-filename=-52a598f78f7a2aa4 --out-dir /home/runner/work/oxc/oxc/target/debug/deps -C incremental=/home/runner/work/oxc/oxc/target/debug/incremental -C strip=debuginfo -L dependency=/home/runner/work/oxc/oxc/target/debug/deps --extern ropey=/home/runner/work/oxc/oxc/target/debug/deps/libropey-4e8d01ddd6d5b9f7.rmeta -C linker-features=-lld` (exit status: 101)
warning: build failed, waiting for other jobs to finish...

Backtrace

thread 'rustc' (317) panicked at /rustc-dev/2972b5e59f1c5529b6ba770437812fd83ab4ebd4/compiler/rustc_middle/src/query/on_disk_cache.rs:663:9:
cannot decode `AttrId` with `CacheDecoder`
stack backtrace:
   0:     0x7fdf59dc0abb - <<std[de416e893de1faf9]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[9f8d6771964fc20c]::fmt::Display>::fmt
   1:     0x7fdf5a41e1c8 - core[9f8d6771964fc20c]::fmt::write
   2:     0x7fdf59dd7ac6 - <std[de416e893de1faf9]::sys::stdio::unix::Stderr as std[de416e893de1faf9]::io::Write>::write_fmt
   3:     0x7fdf59d96ac8 - std[de416e893de1faf9]::panicking::default_hook::{closure#0}
   4:     0x7fdf59db3ec3 - std[de416e893de1faf9]::panicking::default_hook
   5:     0x7fdf58dc2e4c - std[de416e893de1faf9]::panicking::update_hook::<alloc[57804382fb016052]::boxed::Box<rustc_driver_impl[7a9a631d48bc4eca]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7fdf59db41a2 - std[de416e893de1faf9]::panicking::panic_with_hook
   7:     0x7fdf59d96bba - std[de416e893de1faf9]::panicking::panic_handler::{closure#0}
   8:     0x7fdf59d8d8b9 - std[de416e893de1faf9]::sys::backtrace::__rust_end_short_backtrace::<std[de416e893de1faf9]::panicking::panic_handler::{closure#0}, !>
   9:     0x7fdf59d985ed - __rustc[5b7e1576be862841]::rust_begin_unwind
  10:     0x7fdf568a4dfc - core[9f8d6771964fc20c]::panicking::panic_fmt
   Compiling oxc_allocator v0.123.0 (/home/runner/work/oxc/oxc/crates/oxc_allocator)
  11:     0x7fdf5b914b6d - <rustc_middle[4d5ddcd23ba200cb]::query::on_disk_cache::OnDiskCache>::load_side_effect
  12:     0x7fdf5b9160cd - <rustc_query_impl[fdd9a9cd73aeb4]::dep_kind_vtables::non_query::SideEffect::{closure#0} as core[9f8d6771964fc20c]::ops::function::FnOnce<(rustc_middle[4d5ddcd23ba200cb]::ty::context::TyCtxt, rustc_middle[4d5ddcd23ba200cb]::dep_graph::dep_node::DepNode, rustc_middle[4d5ddcd23ba200cb]::dep_graph::serialized::SerializedDepNodeIndex)>>::call_once
  13:     0x7fdf5a4b7274 - <rustc_middle[4d5ddcd23ba200cb]::dep_graph::graph::DepGraphData>::try_mark_previous_green
  14:     0x7fdf5a4b6b0e - rustc_query_impl[fdd9a9cd73aeb4]::execution::ensure_can_skip_execution::<rustc_data_structures[3e48709548f32bc4]::vec_cache::VecCache<rustc_span[ae25d23050d7877d]::def_id::LocalDefId, rustc_middle[4d5ddcd23ba200cb]::query::erase::ErasedData<[u8; 0usize]>, rustc_middle[4d5ddcd23ba200cb]::dep_graph::graph::DepNodeIndex>>
  15:     0x7fdf5a4bdbe1 - rustc_query_impl[fdd9a9cd73aeb4]::query_impl::typeck_root::execute_query_incr::__rust_end_short_backtrace
  16:     0x7fdf5ad075e6 - <rustc_middle[4d5ddcd23ba200cb]::ty::context::TyCtxt>::par_hir_body_owners::<rustc_hir_analysis[ffc1d045f4785174]::check_crate::{closure#1}>::{closure#0}
  17:     0x7fdf5ad06fdf - rustc_hir_analysis[ffc1d045f4785174]::check_crate
  18:     0x7fdf5a4b7f61 - rustc_interface[e1d24a92004beaf7]::passes::analysis
  19:     0x7fdf5b98573e - rustc_query_impl[fdd9a9cd73aeb4]::execution::try_execute_query::<rustc_middle[4d5ddcd23ba200cb]::query::caches::SingleCache<rustc_middle[4d5ddcd23ba200cb]::query::erase::ErasedData<[u8; 0usize]>>, true>
  20:     0x7fdf5b9850aa - rustc_query_impl[fdd9a9cd73aeb4]::query_impl::analysis::execute_query_incr::__rust_end_short_backtrace
  21:     0x7fdf5b5b1990 - rustc_interface[e1d24a92004beaf7]::interface::run_compiler::<(), rustc_driver_impl[7a9a631d48bc4eca]::run_compiler::{closure#0}>::{closure#1}
  22:     0x7fdf5b5e3c3e - std[de416e893de1faf9]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[e1d24a92004beaf7]::util::run_in_thread_with_globals<rustc_interface[e1d24a92004beaf7]::util::run_in_thread_pool_with_globals<rustc_interface[e1d24a92004beaf7]::interface::run_compiler<(), rustc_driver_impl[7a9a631d48bc4eca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  23:     0x7fdf5b5e44e0 - <std[de416e893de1faf9]::thread::lifecycle::spawn_unchecked<rustc_interface[e1d24a92004beaf7]::util::run_in_thread_with_globals<rustc_interface[e1d24a92004beaf7]::util::run_in_thread_pool_with_globals<rustc_interface[e1d24a92004beaf7]::interface::run_compiler<(), rustc_driver_impl[7a9a631d48bc4eca]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[9f8d6771964fc20c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  24:     0x7fdf5b5e53ec - <std[de416e893de1faf9]::sys::thread::unix::Thread>::new::thread_start
  25:     0x7fdf5508aaa4 - <unknown>
  26:     0x7fdf55117c6c - <unknown>
  27:                0x0 - <unknown>

Metadata

Metadata

Assignees

No one assigned

    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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions