denoland / deno

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

Bug: `parcel` freezes on start #23281

Closed marvinhagemeister closed 1 month ago

marvinhagemeister commented 6 months ago

Running parcel freezes the terminal and I can't even use ctrl+c to abort it.

Steps to reproduce

  1. Create index.html with these contents:
    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8"/>
    <title>My First Parcel App</title>
    </head>
    <body>
    <h1>Hello, World!</h1>
    </body>
    </html>
  2. Run DENO_FUTURE=1 deno run -A npm:parcel src/index.html

Version: Deno 1.42.1 (git 2670c1d58 2024-04-08) OS: mac

bartlomieju commented 6 months ago

Is it burning 100% cpu maybe?

marvinhagemeister commented 6 months ago

CPU usage is very low < 1%. Looking at chrome traces it seems like it's waiting on the native side.

bartlomieju commented 6 months ago

That suggests it's a problem with Node-API native extensions.

marvinhagemeister commented 5 months ago

Just tried with a build from git and I cannot reproduce the issue anymore. Running into a different error but will open a new issue for that.

marvinhagemeister commented 5 months ago

Reopening as we ran into this again

devsnek commented 3 months ago

It seems this is now stuck in op_spawn_sync

  * frame #0: 0x00007ffff7d8939d libc.so.6`__poll + 77
    frame #1: 0x0000555561093ff0 deno`std::sys::pal::unix::pipe::read2::hb5bb65a4a4d94c5c [inlined] std::sys::pal::unix::pipe::read2::_$u7b$$u7b$closure$u7d$$u7d$::heac52a63958bf671 at pipe.rs:105:27
    frame #2: 0x0000555561093fe0 deno`std::sys::pal::unix::pipe::read2::hb5bb65a4a4d94c5c [inlined] std::sys::pal::unix::cvt_r::h9d3c44b85170f181 at mod.rs:324:19
    frame #3: 0x0000555561093fe0 deno`std::sys::pal::unix::pipe::read2::hb5bb65a4a4d94c5c at pipe.rs:105:9
    frame #4: 0x000055556108d0c2 deno`std::process::Command::output::h7d41b04f86a42afb [inlined] std::sys_common::process::wait_with_output::h1fa4f21e305197e3 at process.rs:154:23
    frame #5: 0x000055556108d05e deno`std::process::Command::output::h7d41b04f86a42afb [inlined] std::sys::pal::unix::process::process_inner::_$LT$impl$u20$std..sys..pal..unix..process..process_common..Command$GT$::output::h1ea2426b61482c85 at process_unix.rs:185:9
    frame #6: 0x000055556108d037 deno`std::process::Command::output::h7d41b04f86a42afb at process.rs:1056:40
    frame #7: 0x000055555947e303 deno`deno_runtime::ops::process::op_spawn_sync::op_spawn_sync::v8_fn_ptr::h107241e801f18663 at process.rs:629:16
    frame #8: 0x000055555947e1b3 deno`deno_runtime::ops::process::op_spawn_sync::op_spawn_sync::v8_fn_ptr::h107241e801f18663 at process.rs:619:1
    frame #9: 0x000055555947d67d deno`deno_runtime::ops::process::op_spawn_sync::op_spawn_sync::v8_fn_ptr::h107241e801f18663(info=0x00007ffffffc1850) at process.rs:619:1
    frame #10: 0x0000555560288a67 deno`Builtins_CallApiCallbackGeneric + 167