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

Panic when unhandled error in worker in worker #12068

Closed
kuuote opened this issue Sep 14, 2021 · 3 comments
Closed

Panic when unhandled error in worker in worker #12068

kuuote opened this issue Sep 14, 2021 · 3 comments

Comments

@kuuote
Copy link

kuuote commented Sep 14, 2021

Repro step

  1. Place following files

a.js:

new Worker(new URL("./b.js", import.meta.url).href, {type: "module"});

b.js:

new Worker(new URL("./c.js", import.meta.url).href, {type: "module"});

c.js:

throw Error();
  1. Run deno run --allow-read a.js

Problem

Panic with this error.

error: Uncaught (in worker "") Error
throw Error();
      ^
    at file:///home/arch/c.js:1:7
thread 'worker-0' panicked at 'coding error: either js is polling or the worker is terminated', runtime/web_worker.rs:531:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: Uncaught (in promise) Error: Unhandled error event reached main worker.
    at Worker.#pollControl (deno:runtime/js/11_workers.js:261:23)

Expected

I want to occurs JS Error similar to case of only one worker.

error: Uncaught (in worker "") Error
throw Error();
      ^
    at file:///home/arch/b.js:1:7
error: Uncaught (in promise) Error: Unhandled error event reached main worker.
    at Worker.#pollControl (deno:runtime/js/11_workers.js:261:23)

Environment

deno 1.13.2 (release, x86_64-unknown-linux-gnu)
v8 9.3.345.11
typescript 4.3.5
@bartlomieju
Copy link
Member

CC @andreubotella

@andreubotella
Copy link
Contributor

This is the same panic as in #11342, and probably related to the nested worker case in #11342 (comment)

@bartlomieju
Copy link
Member

Thanks, closing in favor of #11342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants