rust-lang / rust-lang/rust

[ICE]: thread 'main' (8829) panicked at /rustc-dev/31fca3adb283cc9dfd56b49cdee9a96eb9c96ffd/library/std/src/thread/lifecycle.rs:247:14: threads should not terminate unexpectedly

Open
#158,618 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug I-ICE needs-triage S-needs-repro T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Code
#![no_main]
#![no_std]

#[ariel_os::task(autostart)]
async fn coap_run() {
    use coap_handler_implementations::{HandlerBuilder, SimpleRendered, new_dispatcher};

    let handler = new_dispatcher()
        .at(&["connect"], SimpleRendered("Hello from Ariel OS"));

    ariel_os::coap::coap_run(handler).await;
}
[package]
name = "iot-device"
version = "0.1.0"
edition = "2024"

[dependencies]
ariel-os = { path = "build/imports/ariel-os/src/ariel-os", features = ["coap-server"] }
ariel-os-boards = { path = "build/imports/ariel-os/src/ariel-os-boards" }
coap-handler = "0.2.0"
coap-handler-implementations = "0.6.1"
coap-message = "0.3.2"
imports:
  - git:
      url: https://github.com/ariel-os/ariel-os
      tag: v0.5.0
    dldir: ariel-os

apps:
  - name: iot-device
    selects:
      - coap-server
Meta

rustc --version --verbose:

rustc 1.96.1 (31fca3adb 2026-06-26)
binary: rustc
commit-hash: 31fca3adb283cc9dfd56b49cdee9a96eb9c96ffd
commit-date: 2026-06-26
host: x86_64-unknown-linux-gnu
release: 1.96.1
LLVM version: 22.1.2
Error output
laze build -b espressif-esp32-c6-devkitc-1 run
laze: project root: /mnt/development/Entwicklung/iot-dealer/iot-device relpath: . project_file: laze-project.yml
laze: building all for espressif-esp32-c6-devkitc-1
laze: reading cache took 3.841576ms.
warning: patch `cyw43 v0.5.0 (https://github.com/ariel-os/embassy?rev=603583d9#603583d9)` was not used in the crate graph
warning: patch `embassy-net v0.9.1 (https://github.com/ariel-os/embassy?rev=37683fe299f12028e5a77af9f742f496da08afcd#37683fe2)` was not used in the crate graph
warning: patch `esp-println v0.16.1 (https://github.com/ariel-os/esp-hal?rev=531c629afdd80ea464682ce7f4db8baed97967a6#531c629a)` was not used in the crate graph
warning: patch `esp-radio v0.17.0 (https://github.com/ariel-os/esp-hal?rev=531c629afdd80ea464682ce7f4db8baed97967a6#531c629a)` was not used in the crate graph
warning: patch `esp-radio-rtos-driver v0.2.0 (https://github.com/ariel-os/esp-hal?rev=531c629afdd80ea464682ce7f4db8baed97967a6#531c629a)` was not used in the crate graph
help: Check that the patched package version and available features are compatible
      with the dependency requirements. If the patch has a different version from
      what is locked in the Cargo.lock file, run `cargo update` to use the new
      version. This may also occur with an optional dependency that is not enabled.
    Updating crates.io index
    Updating git repository `https://github.com/alexmoon/nrf-sdc`
    Updating git repository `https://github.com/esp-rs/esp-wifi-sys`
   Compiling heapless v0.8.0
   Compiling syn v1.0.109
   Compiling jiff v0.2.31

thread 'main' (8829) panicked at /rustc-dev/31fca3adb283cc9dfd56b49cdee9a96eb9c96ffd/library/std/src/thread/lifecycle.rs:247:14:
threads should not terminate unexpectedly
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: rustc_driver_impl::run_compiler
   4: rustc_driver_impl::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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: rustc 1.96.1 (31fca3adb 2026-06-26) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C debug-assertions=off

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

query stack during panic:
end of query stack
   Compiling embassy-sync v0.7.2
   Compiling embassy-sync v0.6.2
   Compiling esp-sync v0.1.1 (https://github.com/ariel-os/esp-hal?rev=531c629afdd80ea464682ce7f4db8baed97967a6#531c629a)
   Compiling embassy-embedded-hal v0.5.0
   Compiling ariel-os-random v0.5.0 (/mnt/development/Entwicklung/iot-dealer/iot-device/build/imports/ariel-os/src/ariel-os-random)
   Compiling embedded-nal-coap v0.1.0-alpha.5
   Compiling esp-println v0.16.1 (https://github.com/ariel-os/esp-hal?rev=531c629afdd80ea464682ce7f4db8baed97967a6#531c629a)
   Compiling esp-radio-rtos-driver v0.2.0 (https://github.com/ariel-os/esp-hal?rev=531c629afdd80ea464682ce7f4db8baed97967a6#531c629a)
   Compiling ariel-os-log v0.5.0 (/mnt/development/Entwicklung/iot-dealer/iot-device/build/imports/ariel-os/src/ariel-os-log)
   Compiling esp-hal v1.0.0 (https://github.com/ariel-os/esp-hal?rev=531c629afdd80ea464682ce7f4db8baed97967a6#531c629a)
   Compiling svgbobdoc v0.3.0
   Compiling data-encoding-macro-internal v0.1.18
   Compiling data-encoding-macro v0.1.20
   Compiling rlsf v0.2.2
   Compiling cbor-edn v0.0.9
   Compiling esp-alloc v0.9.0 (https://github.com/ariel-os/esp-hal?rev=531c629afdd80ea464682ce7f4db8baed97967a6#531c629a)
   Compiling ariel-os-coap v0.5.0 (/mnt/development/Entwicklung/iot-dealer/iot-device/build/imports/ariel-os/src/ariel-os-coap)
   Compiling ariel-os-alloc v0.5.0 (/mnt/development/Entwicklung/iot-dealer/iot-device/build/imports/ariel-os/src/ariel-os-alloc)
   Compiling ariel-os-threads v0.5.0 (/mnt/development/Entwicklung/iot-dealer/iot-device/build/imports/ariel-os/src/ariel-os-threads)
   Compiling esp-phy v0.1.1 (https://github.com/ariel-os/esp-hal?rev=531c629afdd80ea464682ce7f4db8baed97967a6#531c629a)
   Compiling ariel-os-power v0.5.0 (/mnt/development/Entwicklung/iot-dealer/iot-device/build/imports/ariel-os/src/ariel-os-power)
   Compiling esp-radio v0.17.0 (https://github.com/ariel-os/esp-hal?rev=531c629afdd80ea464682ce7f4db8baed97967a6#531c629a)
   Compiling ariel-os-rt v0.5.0 (/mnt/development/Entwicklung/iot-dealer/iot-device/build/imports/ariel-os/src/ariel-os-rt)
Backtrace

   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: rustc_driver_impl::run_compiler
   4: rustc_driver_impl::main

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the laze build -b espressif-esp32-c6-devkitc-1 run failure with the provided Ariel OS, CoAP, and Rust versions. Inspect the panic at library/std/src/thread/lifecycle.rs:247 and the rustc_driver_impl::run_compiler entry point, then narrow the triggering crate or input. Done means identifying the compiler failure and adding a regression test or a confirmed fix path.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.