GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — async_hooks: fix AsyncLocalStorage in unhandledRejection cases by bmeck · Pull Request #41202 · nodejs/node

Conversation

@bmeck

@bmeck bmeck commented Dec 16, 2021

Copy link
Copy Markdown
Member

Right now async local storage doesn't properly propagate through unhandledRejections. This fixes that.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bmeck
async_hooks: fix AsyncLocalStorage in unhandledRejection cases
92442d4
@bmeck bmeck added confirmed-bug Issues and PRs for confirmed bugs. promises Issues and PRs related to ECMAScript promises. async_hooks Issues and PRs related to the async hooks subsystem. labels Dec 16, 2021
@bmeck
bmeck requested review from Qard and vdeturckheim December 16, 2021 18:46
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. labels Dec 16, 2021
@bmeck
fixup: linter
6e250d8
jasnell
jasnell approved these changes Dec 17, 2021
View reviewed changes
@bmeck bmeck added the wip Issues and PRs that are still a work in progress. label Dec 17, 2021
@bmeck

bmeck commented Dec 17, 2021

Copy link
Copy Markdown
Member Author

there is some kind of bug with the async id stack with this PR, DO NOT MERGE yet

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bmeck

bmeck commented Dec 17, 2021

Copy link
Copy Markdown
Member Author

@Qard and I did some poking and it seems some other stuff is likely messed up around here #41222 , I cannot write a test that covers all the branches of unhandledRejection + uncaughtExceptionMonitor because of it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vdeturckheim
vdeturckheim approved these changes Dec 17, 2021
View reviewed changes

@vdeturckheim vdeturckheim left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM with the call stack issues to be fixed. This would actually help me for implementing an idea I have for #40954

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vdeturckheim

vdeturckheim commented Dec 17, 2021

Copy link
Copy Markdown
Member

@bmeck does that mean only the tests are broken and not the actual feature?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bmeck
fixup: more complete test, blocked
ecbd8aa
@bmeck

bmeck commented Dec 17, 2021

Copy link
Copy Markdown
Member Author

@vdeturckheim the feature isn't fully fixed it looks like, if you register uncaughtExceptionMonitor things look like they aren't correct. unhandledRejection seems to work fine with this PR. Registering both events gets all sort of broken (regardless of this PR).

vdeturckheim reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bmeck added 2 commits December 17, 2021 13:55
@bmeck
fixup: more robust test
7afcf6c
@bmeck
fixup: make test work and handle when hooks are disabled
4935ad7
@bmeck

bmeck commented Dec 20, 2021

Copy link
Copy Markdown
Member Author

@Qard please re-review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Qard
Qard reviewed Dec 20, 2021
View reviewed changes

@Qard Qard left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks to be some lint errors, but after those are resolved should be good to go.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/parallel/test-async-wrap-pop-id-during-load.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bmeck
fixup: lint
6339fba
@nodejs-github-bot

nodejs-github-bot commented Dec 20, 2021

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bmeck added 2 commits December 20, 2021 15:28
@bmeck
fixup: lint
2154a42
@bmeck
fixup: lint
0f5d6d0
@nodejs-github-bot

nodejs-github-bot commented Dec 20, 2021

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Qard
Qard approved these changes Dec 21, 2021
View reviewed changes
JungMinu
JungMinu approved these changes Dec 21, 2021
View reviewed changes
@bmeck bmeck added author ready PRs with CI started, the required approvals, and no outstanding review comments. and removed wip Issues and PRs that are still a work in progress. labels Dec 21, 2021
@bmeck

bmeck commented Dec 21, 2021

Copy link
Copy Markdown
Member Author

Landed in c3866b0

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bmeck bmeck closed this Dec 21, 2021
bmeck added a commit that referenced this pull request Dec 21, 2021
@bmeck
async_hooks: fix AsyncLocalStorage in unhandledRejection cases
c3866b0
PR-URL: #41202
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Vladimir de Turckheim <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
This was referenced Dec 22, 2021
CI Reliability 2021-12-22 nodejs/reliability#152
Open
CI Reliability 2021-12-23 nodejs/reliability#153
Open
CI Reliability 2021-12-24 nodejs/reliability#154
Open
CI Reliability 2021-12-25 nodejs/reliability#155
Open
CI Reliability 2021-12-26 nodejs/reliability#156
Open
CI Reliability 2021-12-27 nodejs/reliability#157
Open
targos pushed a commit that referenced this pull request Jan 14, 2022
@bmeck @targos
async_hooks: fix AsyncLocalStorage in unhandledRejection cases
56345a3
PR-URL: #41202
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Vladimir de Turckheim <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
@targos targos mentioned this pull request Jan 16, 2022
v17.4.0 release proposal #41557
Merged
danielleadams pushed a commit that referenced this pull request Jan 31, 2022
@bmeck @danielleadams
async_hooks: fix AsyncLocalStorage in unhandledRejection cases
4cdb2e8
PR-URL: #41202
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Vladimir de Turckheim <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
danielleadams pushed a commit that referenced this pull request Feb 1, 2022
@bmeck @danielleadams
async_hooks: fix AsyncLocalStorage in unhandledRejection cases
b688f20
PR-URL: #41202
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Vladimir de Turckheim <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
@danielleadams danielleadams mentioned this pull request Feb 1, 2022
v16.14.0 proposal #41804
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Qard Qard Qard approved these changes
@jasnell jasnell jasnell approved these changes
@JungMinu JungMinu JungMinu approved these changes
+1 more reviewer
@vdeturckheim vdeturckheim vdeturckheim approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

async_hooks Issues and PRs related to the async hooks subsystem. author ready PRs with CI started, the required approvals, and no outstanding review comments. confirmed-bug Issues and PRs for confirmed bugs. needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. promises Issues and PRs related to ECMAScript promises.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@bmeck @vdeturckheim @nodejs-github-bot @Qard @jasnell @JungMinu
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.