denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
94.61k stars 5.25k forks source link

thread 'main' panicked at inspector.rs:367 internal error: entered unreachable code #23926

Closed jeiea closed 4 months ago

jeiea commented 4 months ago

Steps to reproduce

Not reliable, with WSL2 tried debugger with node_modules project.

➜ deno --version
deno 1.43.5 (release, x86_64-unknown-linux-gnu)
v8 12.4.254.13
typescript 5.4.5

Expected behavior

Debugger attaches.

Actual behavior

Debugger listening on ws://127.0.0.1:9229/ws/0944b064-d2c7-493f-9ccb-516568fc986b
Visit chrome://inspect to connect to the debugger.
Deno is waiting for debugger to connect.

============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: linux x86_64
Version: 1.43.5
Args: ["/home/jeiea/.local/share/mise/installs/deno/latest/bin/deno", "run", "--allow-all", "--unstable-net", "--inspect-wait", "--watch", "server/index.ts"]

thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_core-0.280.0/inspector.rs:367:16:
internal error: entered unreachable code
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: deno_core::inspector::JsRuntimeInspector::poll_sessions
   4: deno_runtime::worker::MainWorker::wait_for_inspector_session
   5: deno::worker::CliMainWorker::evaluate_module_possibly_with_npm::{{closure}}
   6: deno::worker::CliMainWorker::execute_main_module_possibly_with_npm::{{closure}}
   7: deno::tools::run::run_script::{{closure}}
   8: deno::spawn_subcommand::{{closure}}
   9: <deno_unsync::task::MaskFutureAsSend<F> as core::future::future::Future>::poll
  10: tokio::runtime::task::raw::poll
  11: deno::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Process exited with code 1
bartlomieju commented 4 months ago

Do you have any reproduction code that you could share?

jeiea commented 4 months ago

I changed the code and lost track of how to reproduce it. Attaching the debugger in WSL doesn't seem to be smooth, but it seems to work after a few tries, so I'll close the issue for now.