Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: parcel freezes on start #23281

Closed
marvinhagemeister opened this issue Apr 8, 2024 · 6 comments · Fixed by #25243
Closed

Bug: parcel freezes on start #23281

marvinhagemeister opened this issue Apr 8, 2024 · 6 comments · Fixed by #25243
Assignees
Labels
bug Something isn't working correctly node compat

Comments

@marvinhagemeister
Copy link
Contributor

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>
  1. Run DENO_FUTURE=1 deno run -A npm:parcel src/index.html

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

@marvinhagemeister marvinhagemeister added bug Something isn't working correctly node compat labels Apr 8, 2024
@bartlomieju
Copy link
Member

Is it burning 100% cpu maybe?

@marvinhagemeister
Copy link
Contributor Author

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

@bartlomieju
Copy link
Member

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

@bartlomieju bartlomieju added the node native extension related to the node-api (.node) label Apr 23, 2024
@marvinhagemeister
Copy link
Contributor Author

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
Copy link
Contributor Author

Reopening as we ran into this again

@mmastrac mmastrac removed their assignment May 21, 2024
@marvinhagemeister marvinhagemeister removed their assignment Jun 3, 2024
@devsnek devsnek removed the node native extension related to the node-api (.node) label Jun 11, 2024
@devsnek
Copy link
Member

devsnek commented Jun 11, 2024

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

lucacasonato pushed a commit that referenced this issue Aug 29, 2024
…#25243)

Fixes #23281. Part of #20613.

We were emitting the `online` event in the constructor, so the caller
could never receive it (since there was no time for them to add a
listener). Instead, emit the event where it's intended – after the
worker is initialized.

---

After this parcel no longer freezes, but still will fail due to other
bugs (which will be fixed in other PRs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node compat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants