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

src: make workers messaging more resilient #38510

Closed
wants to merge 2 commits into from

Conversation

juanarbol
Copy link
Member

@juanarbol juanarbol commented May 3, 2021

Fixes: #38499

@github-actions github-actions bot 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
@juanarbol juanarbol added the worker Issues and PRs related to Worker support. label May 3, 2021
@jasnell
Copy link
Member

jasnell commented May 3, 2021

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 addaleax May 3, 2021 14:08
Copy link
Member

@addaleax addaleax left a comment

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 :)

src/node_messaging.cc Outdated Show resolved Hide resolved
src/node_errors.h Outdated Show resolved Hide resolved
This reverts commit 73370b4.

The unit test is preserved to make sure it does not break
nodejs#26463 again.
@juanarbol juanarbol force-pushed the juan/fix-worker-crash branch from c4233b4 to a73a147 Compare May 3, 2021 20:16
@juanarbol juanarbol marked this pull request as ready for review May 3, 2021 20:16
Copy link
Member

@Trott Trott left a comment

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
Member Author

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 juanarbol force-pushed the juan/fix-worker-crash branch 3 times, most recently from 6eea0f2 to 40f807a Compare May 3, 2021 20:46
doc/api/errors.md Outdated Show resolved Hide resolved
@juanarbol juanarbol force-pushed the juan/fix-worker-crash branch from 40f807a to f7269dc Compare May 4, 2021 17:37
@jasnell jasnell removed the needs-ci PRs that need a full CI run. label May 4, 2021
@nodejs-github-bot

This comment has been minimized.

@jasnell jasnell 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
Copy link
Collaborator

nodejs-github-bot commented May 6, 2021

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

@jasnell
Copy link
Member

jasnell commented May 6, 2021

Landed in bed947b...75073ab

@jasnell jasnell 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: #38510
Fixes: #38499
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
jasnell pushed a commit that referenced this pull request May 6, 2021
PR-URL: #38510
Fixes: #38499
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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: #38510
Fixes: #38499
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request May 17, 2021
PR-URL: #38510
Fixes: #38499
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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: #38510
Fixes: #38499
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request May 30, 2021
PR-URL: #38510
Fixes: #38499
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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: #38510
Fixes: #38499
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Jun 5, 2021
PR-URL: #38510
Fixes: #38499
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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: #38510
Fixes: #38499
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Jun 5, 2021
PR-URL: #38510
Fixes: #38499
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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: #38510
Fixes: #38499
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Jun 11, 2021
PR-URL: #38510
Fixes: #38499
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@juanarbol juanarbol deleted the juan/fix-worker-crash branch August 26, 2021 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs 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++. worker Issues 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