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: lock the thread properly in snapshot builder #56327

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

joyeecheung
Copy link
Member

@joyeecheung joyeecheung commented Dec 20, 2024

Otherwise it can crash DCHECK when V8 expects that at least someone is locking the current thread.

Fixes: nodejs/node-v8#294

Otherwise it can crash DCHECK when V8 expects that at least someone
is locking the current thread.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-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 Dec 20, 2024
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.54%. Comparing base (fd8de67) to head (056befb).
Report is 83 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #56327   +/-   ##
=======================================
  Coverage   88.54%   88.54%           
=======================================
  Files         657      657           
  Lines      190295   190394   +99     
  Branches    36536    36544    +8     
=======================================
+ Hits       168491   168582   +91     
- Misses      14981    14991   +10     
+ Partials     6823     6821    -2     
Files with missing lines Coverage Δ
src/node_snapshotable.cc 75.16% <100.00%> (+0.02%) ⬆️

... and 35 files with indirect coverage changes

@targos
Copy link
Member

targos commented Dec 21, 2024

Just to help me understand, do we have to lock because of this check?
https://github.com/v8/v8/blob/cf11e59dd2e7c0478c9332f7d36d4b88954725df/src/heap/cppgc-js/cpp-heap.cc#L1308-L1315

@nodejs-github-bot

This comment was marked as outdated.

@joyeecheung
Copy link
Member Author

Just to help me understand, do we have to lock because of this check?

Yes, it's not technically serious for us to not lock it because we don't have other threads trying to take over the isolate here, but V8 uses it as a shortcut for current thread check, so it's needed to circumvent the DHCECK.

@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 6, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 6, 2025
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Jan 7, 2025

@jasnell jasnell added commit-queue Add this label to land a pull request using GitHub Actions. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. and removed needs-ci PRs that need a full CI run. labels Jan 7, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 7, 2025
@nodejs-github-bot nodejs-github-bot merged commit 7c3aa9f into nodejs:main Jan 7, 2025
74 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 7c3aa9f

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++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

node_mksnapshot fails for debug builds
7 participants