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 — src: distinguish env stopping flags by legendecas · Pull Request #45907 · nodejs/node

Conversation

@legendecas

@legendecas legendecas commented Dec 19, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Currently, !env->can_call_into_js() and env->is_stopping() have different semantics by their names. The is_stopping() flag implies !env->can_call_into_js().

However, this implication is not enforced in Environment::FreeEnvironment. Environment::FreeEnvironment creates a DisallowJavascriptExecutionScope, the flag Environment::can_call_into_js() needs to be set as false.

As Environment::can_call_into_js_ is a simple boolean flag, it should not be accessed off-thread. This also fixes an issue that the flag Environment::can_call_into_js_ is been modified in Environment::ExitEnv, which may be called from other threads.

Sorry, something went wrong.

Uh oh!

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

bricss and mcollina reacted with eyes emoji
All reactions
  • 👀 2 reactions
@nodejs-github-bot

nodejs-github-bot commented Dec 19, 2022

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/http2
  • @nodejs/modules
  • @nodejs/net
  • @nodejs/vm
All reactions

Sorry, something went wrong.

Uh oh!

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

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Dec 19, 2022
addaleax
addaleax requested changes Dec 19, 2022
View reviewed changes
Comment thread src/api/environment.cc Resolved

Uh oh!

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

Comment thread src/env.h Resolved

Uh oh!

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

Comment thread src/module_wrap.cc Resolved

Uh oh!

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

Comment thread src/node_contextify.cc Resolved

Uh oh!

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

Comment thread src/env-inl.h Resolved

Uh oh!

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

@legendecas
legendecas force-pushed the env-is-stopping branch from ac5ee86 to c7b4297 Compare January 5, 2023 15:50
@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jan 5, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jan 5, 2023
@nodejs-github-bot

nodejs-github-bot commented Jan 5, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@legendecas
src: distinguish env stopping flags
3d49eed
`Environment::FreeEnvironment` creates a
`DisallowJavascriptExecutionScope`, so the flag
`Environment::can_call_into_js()` should also be set as `false`. As
`Environment::can_call_into_js_` is a simple boolean flag, it should not
be accessed off-threads.
@legendecas
legendecas force-pushed the env-is-stopping branch from c7b4297 to 3d49eed Compare January 5, 2023 16:54
addaleax
addaleax approved these changes Jan 5, 2023
View reviewed changes
@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jan 8, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jan 8, 2023
@nodejs-github-bot

nodejs-github-bot commented Jan 8, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

mcollina
mcollina approved these changes Jan 8, 2023
View reviewed changes

@mcollina mcollina 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.

I've spent a bit of time trying to figure out those lines of code.

I'd be more comfortable with an added test for this change, but I agree it might be very hard to check.

Sorry, something went wrong.

Uh oh!

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

All reactions
This was referenced Jan 11, 2023
CI Reliability 2023-01-11 nodejs/reliability#480
Open
CI Reliability 2023-01-12 nodejs/reliability#481
Open
CI Reliability 2023-01-13 nodejs/reliability#482
Open
@nodejs-github-bot

nodejs-github-bot commented Jan 13, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot mentioned this pull request Jan 14, 2023
CI Reliability 2023-01-14 nodejs/reliability#483
Open
19 tasks
@mcollina mcollina added commit-queue PRs queued for automated landing through the Commit Queue. and removed needs-ci PRs that need a full CI run. labels Jan 14, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Jan 14, 2023
@nodejs-github-bot
nodejs-github-bot merged commit bb40507 into nodejs:main Jan 14, 2023
@nodejs-github-bot

nodejs-github-bot commented Jan 14, 2023

Copy link
Copy Markdown
Collaborator

Landed in bb40507

All reactions

Sorry, something went wrong.

Uh oh!

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

@legendecas
legendecas deleted the env-is-stopping branch January 14, 2023 11:17
This was referenced Jan 15, 2023
CI Reliability 2023-01-15 nodejs/reliability#484
Open
CI Reliability 2023-01-16 nodejs/reliability#485
Open
CI Reliability 2023-01-17 nodejs/reliability#486
Open
RafaelGSS pushed a commit to RafaelGSS/node that referenced this pull request Jan 17, 2023
@legendecas @RafaelGSS
src: distinguish env stopping flags
fa863f7
`Environment::FreeEnvironment` creates a
`DisallowJavascriptExecutionScope`, so the flag
`Environment::can_call_into_js()` should also be set as `false`. As
`Environment::can_call_into_js_` is a simple boolean flag, it should not
be accessed off-threads.

PR-URL: nodejs#45907
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
RafaelGSS pushed a commit that referenced this pull request Jan 20, 2023
@legendecas @RafaelGSS
src: distinguish env stopping flags
d3d62ed
`Environment::FreeEnvironment` creates a
`DisallowJavascriptExecutionScope`, so the flag
`Environment::can_call_into_js()` should also be set as `false`. As
`Environment::can_call_into_js_` is a simple boolean flag, it should not
be accessed off-threads.

PR-URL: #45907
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request Jan 20, 2023
v19.5.0 proposal #46286
Merged
juanarbol pushed a commit that referenced this pull request Jan 26, 2023
@legendecas @juanarbol
src: distinguish env stopping flags
7768f03
`Environment::FreeEnvironment` creates a
`DisallowJavascriptExecutionScope`, so the flag
`Environment::can_call_into_js()` should also be set as `false`. As
`Environment::can_call_into_js_` is a simple boolean flag, it should not
be accessed off-threads.

PR-URL: #45907
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@juanarbol juanarbol mentioned this pull request Jan 28, 2023
V18.14.0 proposal #46396
Merged
juanarbol pushed a commit that referenced this pull request Jan 31, 2023
@legendecas @juanarbol
src: distinguish env stopping flags
9648b06
`Environment::FreeEnvironment` creates a
`DisallowJavascriptExecutionScope`, so the flag
`Environment::can_call_into_js()` should also be set as `false`. As
`Environment::can_call_into_js_` is a simple boolean flag, it should not
be accessed off-threads.

PR-URL: #45907
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@legendecas legendecas mentioned this pull request Feb 20, 2023
src: fix cb scope bugs involved in termination #45596
Merged
@bcoe bcoe mentioned this pull request Dec 18, 2023
Infinite loop at shutdown #47748
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mcollina mcollina mcollina approved these changes
@addaleax addaleax addaleax approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories.

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.

4 participants

@legendecas @nodejs-github-bot @mcollina @addaleax
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.