Skip to content

src: make workers messaging more resilient - #38510

Closed
juanarbol wants to merge 2 commits into
nodejs:masterfrom
juanarbol:juan/fix-worker-crash
Closed

src: make workers messaging more resilient#38510
juanarbol wants to merge 2 commits into
nodejs:masterfrom
juanarbol:juan/fix-worker-crash

Conversation

@juanarbol

@juanarboljuanarbol commented May 3, 2021

Copy link
Copy Markdown
Member

Fixes: #38499

@github-actionsgithub-actionsBot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels May 3, 2021
@juanarboljuanarbol added the worker Issues and PRs related to Worker support. label May 3, 2021
@jasnell

Copy link
Copy Markdown
Member

I would suggest that moveMessagePortToContext() should throw earlier if it's given a MessagePort that is already closed, or in the process of closing such that the execution doesn't even get this far along.

@jasnell
jasnell requested a review from addaleaxMay 3, 2021 14:08

@addaleaxaddaleax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with a test :)

Comment threadsrc/node_messaging.cc Outdated
Comment threadsrc/node_errors.h Outdated
This reverts commit 73370b4.
The unit test is preserved to make sure it does not break
nodejs#26463 again.
@juanarbol
juanarbolforce-pushed the juan/fix-worker-crash branch from c4233b4 to a73a147CompareMay 3, 2021 20:16
@juanarbol
juanarbol marked this pull request as ready for review May 3, 2021 20:16

@TrottTrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, just noticed that the error code was put back but it wasn't removed from the legacy section of the errors.md doc. That should probably happen, yeah?

@juanarbol

Copy link
Copy Markdown
MemberAuthor

Whoops, just noticed that the error code was put back but it wasn't removed from the legacy section of the errors.md doc. That should probably happen, yeah?

Yeap, totally, do you think I should add some extra data to the history of the error?

@juanarbol
juanarbolforce-pushed the juan/fix-worker-crash branch 3 times, most recently from 6eea0f2 to 40f807aCompareMay 3, 2021 20:46
Comment threaddoc/api/errors.md Outdated
@juanarbol
juanarbolforce-pushed the juan/fix-worker-crash branch from 40f807a to f7269dcCompareMay 4, 2021 17:37
@jasnelljasnell removed the needs-ci PRs that need a full CI run. label May 4, 2021
@nodejs-github-bot

This comment has been minimized.

@jasnelljasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 4, 2021
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

nodejs-github-bot commented May 6, 2021

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/37936/ 💚

@jasnell

Copy link
Copy Markdown
Member

Landed in bed947b...75073ab

@jasnelljasnell closed this May 6, 2021
jasnell pushed a commit that referenced this pull request May 6, 2021
This reverts commit 73370b4.
The unit test is preserved to make sure it does not break
#26463 again.
PR-URL: #38510Fixes: #38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
jasnell pushed a commit that referenced this pull request May 6, 2021
PR-URL: #38510Fixes: #38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request May 17, 2021
This reverts commit 73370b4.
The unit test is preserved to make sure it does not break
#26463 again.
PR-URL: #38510Fixes: #38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request May 17, 2021
PR-URL: #38510Fixes: #38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targostargos mentioned this pull request May 18, 2021
targos pushed a commit that referenced this pull request May 30, 2021
This reverts commit 73370b4.
The unit test is preserved to make sure it does not break
#26463 again.
PR-URL: #38510Fixes: #38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request May 30, 2021
PR-URL: #38510Fixes: #38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jun 5, 2021
This reverts commit 73370b4.
The unit test is preserved to make sure it does not break
#26463 again.
PR-URL: #38510Fixes: #38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jun 5, 2021
PR-URL: #38510Fixes: #38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jun 5, 2021
This reverts commit 73370b4.
The unit test is preserved to make sure it does not break
#26463 again.
PR-URL: #38510Fixes: #38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jun 5, 2021
PR-URL: #38510Fixes: #38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targostargos mentioned this pull request Jun 6, 2021
targos pushed a commit that referenced this pull request Jun 11, 2021
This reverts commit 73370b4.
The unit test is preserved to make sure it does not break
#26463 again.
PR-URL: #38510Fixes: #38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jun 11, 2021
PR-URL: #38510Fixes: #38499
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@juanarbol
juanarbol deleted the juan/fix-worker-crash branch August 26, 2021 17:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.c++Issues and PRs that require attention from people who are familiar with C++.workerIssues and PRs related to Worker support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

worker_threads.moveMessagePortToContext results in an abort

6 participants

@juanarbol@jasnell@nodejs-github-bot@Trott@addaleax@aduh95