Skip to content

[ICE]: cannot decode AttrId with CacheDecoder #154878

Closed
oxc-project/oxc
#27260

Description

@matthiaskrgr

Code

pub fn main() {
    let x = 42.0;
    #[expect(invalid_nan_comparisons)]
    let _b = x == f32::NAN;
}

rustc ./file.rs -Cincremental=.

running this twice should trigger the ICE

Meta

rustc --version --verbose:

rustc 1.96.0-nightly (9602bda1d 2026-04-05)
binary: rustc
commit-hash: 9602bda1dd0c1bbf5787e398385bbac81fd532f8
commit-date: 2026-04-05
host: x86_64-unknown-linux-gnu
release: 1.96.0-nightly
LLVM version: 22.1.2

Error output

<output>
Backtrace

thread 'rustc' (870554) panicked at /rustc-dev/c2efcc4ae006a6b2761cb42572fc9cee0d1ce4af/compiler/rustc_middle/src/query/on_disk_cache.rs:663:9:
cannot decode `AttrId` with `CacheDecoder`
stack backtrace:
   0:     0x7f2d869b66ab - <<std[8eed7d2a0d2e32a7]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[c3b3818c781903d6]::fmt::Display>::fmt
   1:     0x7f2d8701d748 - core[c3b3818c781903d6]::fmt::write
   2:     0x7f2d869cd976 - <std[8eed7d2a0d2e32a7]::sys::stdio::unix::Stderr as std[8eed7d2a0d2e32a7]::io::Write>::write_fmt
   3:     0x7f2d8698c9a8 - std[8eed7d2a0d2e32a7]::panicking::default_hook::{closure#0}
   4:     0x7f2d869a9d13 - std[8eed7d2a0d2e32a7]::panicking::default_hook
   5:     0x7f2d859b155c - std[8eed7d2a0d2e32a7]::panicking::update_hook::<alloc[f403ee7a715222b6]::boxed::Box<rustc_driver_impl[7e67e524f2e0558b]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7f2d869a9ff2 - std[8eed7d2a0d2e32a7]::panicking::panic_with_hook
   7:     0x7f2d8698ca9a - std[8eed7d2a0d2e32a7]::panicking::panic_handler::{closure#0}
   8:     0x7f2d869837a9 - std[8eed7d2a0d2e32a7]::sys::backtrace::__rust_end_short_backtrace::<std[8eed7d2a0d2e32a7]::panicking::panic_handler::{closure#0}, !>
   9:     0x7f2d8698e4cd - __rustc[1c0edf6a00b737dc]::rust_begin_unwind
  10:     0x7f2d83496bfc - core[c3b3818c781903d6]::panicking::panic_fmt
  11:     0x7f2d885344ed - <rustc_middle[165f22ec1c9787f3]::query::on_disk_cache::OnDiskCache>::load_side_effect
  12:     0x7f2d88535a4d - <rustc_query_impl[f409b05e3d872181]::dep_kind_vtables::non_query::SideEffect::{closure#0} as core[c3b3818c781903d6]::ops::function::FnOnce<(rustc_middle[165f22ec1c9787f3]::ty::context::TyCtxt, rustc_middle[165f22ec1c9787f3]::dep_graph::dep_node::DepNode, rustc_middle[165f22ec1c9787f3]::dep_graph::serialized::SerializedDepNodeIndex)>>::call_once
  13:     0x7f2d870b7874 - <rustc_middle[165f22ec1c9787f3]::dep_graph::graph::DepGraphData>::try_mark_previous_green
  14:     0x7f2d870b4a05 - <rustc_middle[165f22ec1c9787f3]::dep_graph::graph::DepGraph>::try_mark_green
  15:     0x7f2d870b484c - rustc_query_impl[f409b05e3d872181]::execution::ensure_can_skip_execution::<rustc_middle[165f22ec1c9787f3]::query::caches::DefaultCache<rustc_span[70fc2dc825ee8976]::def_id::LocalModDefId, rustc_middle[165f22ec1c9787f3]::query::erase::ErasedData<[u8; 0usize]>>>
  16:     0x7f2d87ffff2c - rustc_query_impl[f409b05e3d872181]::query_impl::lint_mod::execute_query_incr::__rust_end_short_backtrace
  17:     0x7f2d87fffa24 - rustc_lint[18575b0fd924e4b9]::late::check_crate::{closure#1}
  18:     0x7f2d87fff646 - rustc_lint[18575b0fd924e4b9]::late::check_crate
  19:     0x7f2d87ffed70 - rustc_interface[3d73cd67649ddf73]::passes::analysis::{closure#0}::{closure#0}::{closure#2}
  20:     0x7f2d87ffeb62 - rustc_data_structures[cae841260e08523c]::sync::parallel::par_fns
  21:     0x7f2d87ffeafc - rustc_interface[3d73cd67649ddf73]::passes::analysis::{closure#0}::{closure#0}
  22:     0x7f2d87ffeb62 - rustc_data_structures[cae841260e08523c]::sync::parallel::par_fns
  23:     0x7f2d870b8863 - rustc_interface[3d73cd67649ddf73]::passes::analysis
  24:     0x7f2d8859d73e - rustc_query_impl[f409b05e3d872181]::execution::try_execute_query::<rustc_middle[165f22ec1c9787f3]::query::caches::SingleCache<rustc_middle[165f22ec1c9787f3]::query::erase::ErasedData<[u8; 0usize]>>, true>
  25:     0x7f2d8859d0aa - rustc_query_impl[f409b05e3d872181]::query_impl::analysis::execute_query_incr::__rust_end_short_backtrace
  26:     0x7f2d8826c15e - rustc_interface[3d73cd67649ddf73]::interface::run_compiler::<(), rustc_driver_impl[7e67e524f2e0558b]::run_compiler::{closure#0}>::{closure#1}
  27:     0x7f2d8821a03e - std[8eed7d2a0d2e32a7]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[3d73cd67649ddf73]::util::run_in_thread_with_globals<rustc_interface[3d73cd67649ddf73]::util::run_in_thread_pool_with_globals<rustc_interface[3d73cd67649ddf73]::interface::run_compiler<(), rustc_driver_impl[7e67e524f2e0558b]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  28:     0x7f2d8821a8e0 - <std[8eed7d2a0d2e32a7]::thread::lifecycle::spawn_unchecked<rustc_interface[3d73cd67649ddf73]::util::run_in_thread_with_globals<rustc_interface[3d73cd67649ddf73]::util::run_in_thread_pool_with_globals<rustc_interface[3d73cd67649ddf73]::interface::run_compiler<(), rustc_driver_impl[7e67e524f2e0558b]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[c3b3818c781903d6]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  29:     0x7f2d8821b7ec - <std[8eed7d2a0d2e32a7]::sys::thread::unix::Thread>::new::thread_start
  30:     0x7f2d81ca597a - <unknown>
  31:     0x7f2d81d292bc - <unknown>
  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 make sure that you have updated to the latest nightly

note: please attach the file at `/tmp/IM/rustc-ice-2026-04-06T10_05_15-870552.txt` to your bug report

note: rustc 1.96.0-nightly (c2efcc4ae 2026-04-06) running on x86_64-unknown-linux-gnu

note: compiler flags: -C incremental=[REDACTED]

query stack during panic:
#0 [analysis] running analysis passes on crate `file`
end of query stack
there was a panic while trying to force a dep node
try_mark_green dep node stack:
#0 lint_mod(file[d10f])
end of try_mark_green dep node stack

Activity

  1. added
    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.
    C-bugCategory: This is a bug.
    on Apr 6, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Apr 6, 2026
  3. added
    A-attributesArea: Attributes (`#[…]`, `#![…]`)
    A-incr-compArea: Incremental compilation
    regression-untriagedUntriaged performance or correctness regression.
    on Apr 6, 2026
  4. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Apr 6, 2026
  5. changed the title [-][ICE]: cannot decode `AttrId` with `CacheDecoder[/-] [+][ICE]: cannot decode `AttrId` with `CacheDecoder`[/+] on Apr 6, 2026
  6. matthiaskrgr commented on Apr 6, 2026

    @matthiaskrgr
    MemberAuthor

    have not run bisection yet but i assume this is more fallout of #152369
    works on beta ices on nighly

  7. Bryntet commented on Apr 6, 2026

    @Bryntet
    Contributor

    @rustbot claim

  8. BenjaminBrienen commented on Apr 7, 2026

    @BenjaminBrienen
    Contributor

    I also got this

    thread 'rustc' panicked at /rustc-dev/bcded331651b60a0383b3ff51db4f24c4495ac53/compiler/rustc_middle/src/query/on_disk_cache.rs:663:9:
    cannot decode `AttrId` with `CacheDecoder`
    stack backtrace:
       0:     0x7270491b906b - <std[7d30a76dffadf049]::backtrace::Backtrace>::create
       1:     0x7270491b8fb5 - <std[7d30a76dffadf049]::backtrace::Backtrace>::force_capture
       2:     0x7270481d3c8b - std[7d30a76dffadf049]::panicking::update_hook::<alloc[e0b931b7d0af5c50]::boxed::Box<rustc_driver_impl[5448826ccd3e97a1]::install_ice_hook::{closure#1}>>::{closure#0}
       3:     0x7270491cbb62 - std[7d30a76dffadf049]::panicking::panic_with_hook
       4:     0x7270491ae60a - std[7d30a76dffadf049]::panicking::panic_handler::{closure#0}
       5:     0x7270491a2b39 - std[7d30a76dffadf049]::sys::backtrace::__rust_end_short_backtrace::<std[7d30a76dffadf049]::panicking::panic_handler::{closure#0}, !>
       6:     0x7270491b003d - __rustc[a638a912b495cae0]::rust_begin_unwind
       7:     0x727045ca951c - core[623525b5c18656f3]::panicking::panic_fmt
       8:     0x72704ad4b22d - <rustc_middle[6f95cc988acd69b2]::query::on_disk_cache::OnDiskCache>::load_side_effect
       9:     0x72704ad4c78d - <rustc_query_impl[44740c00700bfba1]::dep_kind_vtables::non_query::SideEffect::{closure#0} as core[623525b5c18656f3]::ops::function::FnOnce<(rustc_middle[6f95cc988acd69b2]::ty::context::TyCtxt, rustc_middle[6f95cc988acd69b2]::dep_graph::dep_node::DepNode, rustc_middle[6f95cc988acd69b2]::dep_graph::serialized::SerializedDepNodeIndex)>>::call_once
      10:     0x7270498b8cb4 - <rustc_middle[6f95cc988acd69b2]::dep_graph::graph::DepGraphData>::try_mark_previous_green
      11:     0x7270498b5e69 - <rustc_middle[6f95cc988acd69b2]::dep_graph::graph::DepGraph>::try_mark_green
      12:     0x7270498b5cae - rustc_query_impl[44740c00700bfba1]::execution::ensure_can_skip_execution::<rustc_middle[6f95cc988acd69b2]::query::caches::DefaultCache<rustc_span[5cb0e44dc3869b0b]::def_id::LocalModDefId, rustc_middle[6f95cc988acd69b2]::query::erase::ErasedData<[u8; 0usize]>>>
      13:     0x72704a801d2c - rustc_query_impl[44740c00700bfba1]::query_impl::lint_mod::execute_query_incr::__rust_end_short_backtrace
      14:     0x72704a801824 - rustc_lint[887d74ac1027174b]::late::check_crate::{closure#1}
      15:     0x72704a801446 - rustc_lint[887d74ac1027174b]::late::check_crate
      16:     0x72704a800b70 - rustc_interface[aed5607d16a7f406]::passes::analysis::{closure#0}::{closure#0}::{closure#2}
      17:     0x72704a800962 - rustc_data_structures[94965839176f1595]::sync::parallel::par_fns
      18:     0x72704a8008fc - rustc_interface[aed5607d16a7f406]::passes::analysis::{closure#0}::{closure#0}
      19:     0x72704a800962 - rustc_data_structures[94965839176f1595]::sync::parallel::par_fns
      20:     0x7270498b9ca3 - rustc_interface[aed5607d16a7f406]::passes::analysis
      21:     0x72704adadabe - rustc_query_impl[44740c00700bfba1]::execution::try_execute_query::<rustc_middle[6f95cc988acd69b2]::query::caches::SingleCache<rustc_middle[6f95cc988acd69b2]::query::erase::ErasedData<[u8; 0usize]>>, true>
      22:     0x72704adad42a - rustc_query_impl[44740c00700bfba1]::query_impl::analysis::execute_query_incr::__rust_end_short_backtrace
      23:     0x72704aa8309e - rustc_interface[aed5607d16a7f406]::interface::run_compiler::<(), rustc_driver_impl[5448826ccd3e97a1]::run_compiler::{closure#0}>::{closure#1}
      24:     0x72704aa386fe - std[7d30a76dffadf049]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[aed5607d16a7f406]::util::run_in_thread_with_globals<rustc_interface[aed5607d16a7f406]::util::run_in_thread_pool_with_globals<rustc_interface[aed5607d16a7f406]::interface::run_compiler<(), rustc_driver_impl[5448826ccd3e97a1]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
      25:     0x72704aa38fa0 - <std[7d30a76dffadf049]::thread::lifecycle::spawn_unchecked<rustc_interface[aed5607d16a7f406]::util::run_in_thread_with_globals<rustc_interface[aed5607d16a7f406]::util::run_in_thread_pool_with_globals<rustc_interface[aed5607d16a7f406]::interface::run_compiler<(), rustc_driver_impl[5448826ccd3e97a1]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[623525b5c18656f3]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
      26:     0x72704aa39eac - <std[7d30a76dffadf049]::sys::thread::unix::Thread>::new::thread_start
      27:     0x72704429caa4 - start_thread
                                   at ./nptl/pthread_create.c:447:8
      28:     0x727044329c6c - clone3
                                   at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0
      29:                0x0 - <unknown>
    
    
    rustc version: 1.96.0-nightly (bcded3316 2026-04-06)
    platform: x86_64-unknown-linux-gnu
    
    query stack during panic:
    #0 [analysis] running analysis passes on crate `wgsl_analyzer`
    end of query stack
    
  9. added and removed
    regression-untriagedUntriaged performance or correctness regression.
    on Apr 7, 2026
  10. 1 remaining item

  11. added a commit that references this issue on Apr 8, 2026
  12. added a commit that references this issue on Apr 8, 2026
  13. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Apr 9, 2026
  14. added and removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Apr 9, 2026
  15. added a commit that references this issue on Apr 9, 2026
  16. added a commit that references this issue on Apr 13, 2026
  17. added a commit that references this issue on Oct 1, 2026
    c399fb2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-attributesArea: Attributes (`#[…]`, `#![…]`)A-incr-compArea: Incremental compilationC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-criticalCritical priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions