-
Notifications
You must be signed in to change notification settings - Fork 30k
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
v12.22.0 proposal #37797
v12.22.0 proposal #37797
Conversation
This reverts commit 037ac99. As flaky CI failures have revealed, this feature was implemented incorrectly. `stop_sub_worker_contexts()` needs to be called on the thread on which the `Environment` is currently running, it’s not thread-safe. The current API requires `Stop()` to be thread-safe, though. We could add a new API for this, but unless there’s demand, that’s probably not necessary as `FreeEnvironment()` will also stop Workers, which is commonly the next action on an `Environment` instance after having `Stop()` called on it. Refs: #32531 PR-URL: #32623 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
The legacy HTTP parser, used by default in versions of Node.js prior to 12.0.0, is deprecated. The legacy HTTP parser cannot be guaranteed to be supported after April 2021. This commit introduces a deprecation warning for the legacy HTTP parser. PR-URL: #37603 Refs: #31441 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Original commit message: ``` cpu-profiler: Use Handle version of SourcePositionTableIterator The surrounding code can trigger an allocation through InliningStack which can eventually end up allocating a line ends array. This is fine as-is because the existing iterator code makes a copy of the byte array. It just triggers the no_gc dcheck in debug mode. Fixed: v8:10778 Change-Id: Ic8c502767ec6c3d3b1f5e84df60638bd2fc6be75 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339102 Auto-Submit: Peter Marshall <petermarshall@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#69247} ``` Refs: v8/v8@beebee4 PR-URL: #37293 Backport-PR-URL: #37578 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
This test is added as it usually crashes without applying the v8 patch: v8/v8@beebee4 PR-URL: #37293 Backport-PR-URL: #37578 Refs: v8/v8@beebee4 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com>
Allow calling eventLoopUtilization() directly on a worker thread: const worker = new Worker('./foo.js'); const elu = worker.performance.eventLoopUtilization(); setTimeout(() => { worker.performance.eventLoopUtilization(elu); }, 10); Add a new performance object on the Worker instance that will hopefully one day hold all the other performance metrics, such as nodeTiming. Include benchmarks and tests. PR-URL: #35664 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: James M Snell <jasnell@gmail.com> Backport-PR-URL: #37165
The active worker check compared the time from sending message till response arrived from worker with the complete time the worker was running till it responses to the spin request. If sending back the message is slow for some reason the test fails. Adapt the test to compare the time seen inside the worker with the time read from main thread. PR-URL: #35891 Fixes: #35844 Refs: #35886 Refs: #35664 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Backport-PR-URL: #37165
Add an v8.takeCoverage() API that allows the user to write the coverage started by NODE_V8_COVERAGE to disk on demand. The coverage can be written multiple times during the lifetime of the process, each time the execution counter will be reset. When the process is about to exit, one last coverage will still be written to disk. Also refactors the internal profiler connection code so that we use the inspector response id to identify the profile response instead of using an ad-hoc flag in C++. PR-URL: #33807 Backport-PR-URL: #36352 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ben Coe <bencoe@gmail.com>
Add a v8.stopCoverage() API to stop the coverage collection started by NODE_V8_COVERAGE - this would be useful in conjunction with v8.takeCoverage() if the user don't want to emit the coverage at the process exit but still want to collect it on demand at some point. PR-URL: #33807 Backport-PR-URL: #36352 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Ben Coe <bencoe@gmail.com>
Unlike JS-only modules, native add-ons are always associated with a dynamic shared object from which they are loaded. Being able to retrieve its absolute path is important to native-only add-ons, i.e. add-ons that are not themselves being loaded from a JS-only module located in the same package as the native add-on itself. Currently, the file name is obtained at environment construction time from the JS `module.filename`. Nevertheless, the presence of `module` is not required, because the file name could also be passed in via a private property added onto `exports` from the `process.dlopen` binding. As an attempt at future-proofing, the file name is provided as a URL, i.e. prefixed with the `file://` protocol. Fixes: nodejs/node-addon-api#449 PR-URL: #37195 Backport-PR-URL: #37328 Co-authored-by: Michael Dawson <mdawson@devrus.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
PR-URL: #35781 Backport-PR-URL: #37718 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
PR-URL: #37712 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Notable changes The legacy HTTP parser is runtime deprecated: - The legacy HTTP parser, selected by the `--http-parser=legacy` command line option, is deprecated with the pending End-of-Life of Node.js 10.x (where it is the only HTTP parser implementation provided) at the end of April 2021. It will now warn on use but otherwise continue to function and may be removed in a future Node.js 12.x release. - The default HTTP parser based on llhttp is not affected. By default it is stricter than the now deprecated legacy HTTP parser. If interoperability with HTTP implementations that send invalid HTTP headers is required, the HTTP parser can be started in a less secure mode with the `--insecure-http-parser` command line option. ES Modules: - ES Modules are now considered stable. node-api: - Added an experimental API to allow retrieval of the add-on file name. New API's to control code coverage data collection: - `v8.stopCoverage()` and `v8.takeCoverage()` have been added. New API to monitor event loop utilization by Worker threads - `worker.performance.eventLoopUtilization()` has been added. PR-URL: #37797
60bc246
to
8fcbe98
Compare
@nodejs/releasers I'm aiming to get this out on the 30 March 2021. That gives us a month before Node.js 10.x goes End-of-Life (see the notable changes about the legacy HTTP parser deprecation). Since this is a semver-minor I've pulled in #37712 which has just gone out in Node.js 15.12.0 but will have been out for just less than two weeks by 30 March 2021. I am planning on also including #37796 (need to wait for CI's to complete/pass). Any suggestions for improvements to the notable changes section welcome. |
Notable changes The legacy HTTP parser is runtime deprecated: - The legacy HTTP parser, selected by the `--http-parser=legacy` command line option, is deprecated with the pending End-of-Life of Node.js 10.x (where it is the only HTTP parser implementation provided) at the end of April 2021. It will now warn on use but otherwise continue to function and may be removed in a future Node.js 12.x release. - The default HTTP parser based on llhttp is not affected. By default it is stricter than the now deprecated legacy HTTP parser. If interoperability with HTTP implementations that send invalid HTTP headers is required, the HTTP parser can be started in a less secure mode with the `--insecure-http-parser` command line option. ES Modules: - ES Modules are now considered stable. node-api: - Updated to node-api version 8 and added an experimental API to allow retrieval of the add-on file name. New API's to control code coverage data collection: - `v8.stopCoverage()` and `v8.takeCoverage()` have been added. New API to monitor event loop utilization by Worker threads - `worker.performance.eventLoopUtilization()` has been added. PR-URL: #37797
8fcbe98
to
e91a165
Compare
undici is failing in CITGM with the current Node.js 12.22.0 proposal across multiple (probably all as not all have completed) platforms:
I can reproduce locally on Fedora 33. It looks like the new warning for the legacy HTTP parser deprecation is being emitted and causing two of the tests to fail. I believe nodejs/undici#564 will fix it as running citgm against the current main branch of undici ( FWIW Lines 33 to 34 in 1b4790b
FYI @nodejs/undici |
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
Underscore CITGM failure:
looks to be because there's no tag (deliberately at this time) for Underscore 1.12.1 in GitHub: jashkenas/underscore#2915 (comment) |
Add support for loading modules using percent-encoded URLs. PR-URL: #37392 Backport-PR-URL: #37859 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Notable changes The legacy HTTP parser is runtime deprecated: - The legacy HTTP parser, selected by the `--http-parser=legacy` command line option, is deprecated with the pending End-of-Life of Node.js 10.x (where it is the only HTTP parser implementation provided) at the end of April 2021. It will now warn on use but otherwise continue to function and may be removed in a future Node.js 12.x release. - The default HTTP parser based on llhttp is not affected. By default it is stricter than the now deprecated legacy HTTP parser. If interoperability with HTTP implementations that send invalid HTTP headers is required, the HTTP parser can be started in a less secure mode with the `--insecure-http-parser` command line option. ES Modules: - ES Modules are now considered stable. node-api: - Updated to node-api version 8 and added an experimental API to allow retrieval of the add-on file name. New API's to control code coverage data collection: - `v8.stopCoverage()` and `v8.takeCoverage()` have been added. New API to monitor event loop utilization by Worker threads - `worker.performance.eventLoopUtilization()` has been added. PR-URL: #37797
e91a165
to
d2fca67
Compare
Fix two races in test-performance-eventlooputil resulting in a flaky test. elu1 was capture after start time t from spin look. If OS descides to reschedule the process after capturing t but before getting elu for >=50ms the spin loop is actually a nop. elu1 doesn't show this and as a result elut3 = eventLoopUtilization(elu1) results in elu3.active === 0. Moving capturing of t after capturing t, just before the spin look avoids this. Similar if OS decides to shedule a different process between getting the total elu from start and the diff elu showing the spin loop the check to verify that total active time is long then the spin loop fails. Exchanging these statements avoids this race. PR-URL: #36028 Fixes: #35309 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Notable changes The legacy HTTP parser is runtime deprecated: - The legacy HTTP parser, selected by the `--http-parser=legacy` command line option, is deprecated with the pending End-of-Life of Node.js 10.x (where it is the only HTTP parser implementation provided) at the end of April 2021. It will now warn on use but otherwise continue to function and may be removed in a future Node.js 12.x release. - The default HTTP parser based on llhttp is not affected. By default it is stricter than the now deprecated legacy HTTP parser. If interoperability with HTTP implementations that send invalid HTTP headers is required, the HTTP parser can be started in a less secure mode with the `--insecure-http-parser` command line option. ES Modules: - ES Modules are now considered stable. node-api: - Updated to node-api version 8 and added an experimental API to allow retrieval of the add-on file name. New API's to control code coverage data collection: - `v8.stopCoverage()` and `v8.takeCoverage()` have been added. New API to monitor event loop utilization by Worker threads - `worker.performance.eventLoopUtilization()` has been added. PR-URL: #37797
d2fca67
to
6a5797b
Compare
Saw some |
Release build: https://ci-release.nodejs.org/job/iojs+release/6766/ |
Notable changes The legacy HTTP parser is runtime deprecated: - The legacy HTTP parser, selected by the `--http-parser=legacy` command line option, is deprecated with the pending End-of-Life of Node.js 10.x (where it is the only HTTP parser implementation provided) at the end of April 2021. It will now warn on use but otherwise continue to function and may be removed in a future Node.js 12.x release. - The default HTTP parser based on llhttp is not affected. By default it is stricter than the now deprecated legacy HTTP parser. If interoperability with HTTP implementations that send invalid HTTP headers is required, the HTTP parser can be started in a less secure mode with the `--insecure-http-parser` command line option. ES Modules: - ES Modules are now considered stable. node-api: - Updated to node-api version 8 and added an experimental API to allow retrieval of the add-on file name. New API's to control code coverage data collection: - `v8.stopCoverage()` and `v8.takeCoverage()` have been added. New API to monitor event loop utilization by Worker threads - `worker.performance.eventLoopUtilization()` has been added. PR-URL: #37797
2021-03-30, Version 12.22.0 'Erbium' (LTS), @richardlau
Notable changes
The legacy HTTP parser is runtime deprecated
The legacy HTTP parser, selected by the
--http-parser=legacy
command lineoption, is deprecated with the pending End-of-Life of Node.js 10.x (where it
is the only HTTP parser implementation provided) at the end of April 2021. It
will now warn on use but otherwise continue to function and may be removed in
a future Node.js 12.x release.
The default HTTP parser based on llhttp is not affected. By default it is
stricter than the now deprecated legacy HTTP parser. If interoperability with
HTTP implementations that send invalid HTTP headers is required, the HTTP
parser can be started in a less secure mode with the
--insecure-http-parser
command line option.
Contributed by Beth Griggs #37603.
ES Modules
ES Modules are now considered stable.
Contributed by Guy Bedford #35781
node-api
Updated to node-api version 8 and added an experimental API to allow
retrieval of the add-on file name.
Contributed by Gabriel Schulhof #37652 and #37195.
New API's to control code coverage data collection
v8.stopCoverage()
andv8.takeCoverage()
have been added.Contributed by Joyee Cheung #33807.
New API to monitor event loop utilization by Worker threads
worker.performance.eventLoopUtilization()
has been added.Contributed by Trevor Norris #35664.
Commits
1872625990
] - (SEMVER-MINOR) deps: update to cjs-module-lexer@1.1.0 (Guy Bedford) #37712dfa04d9035
] - deps: V8: cherry-pick beebee4f80ff (Peter Marshall) #37293bf8733fe22
] - doc: mark modules implementation as stable (Guy Bedford) #357810a35d49f56
] - Revert "embedding: make Stop() stop Workers" (Anna Henningsen) #32623a0b610450a
] - (SEMVER-MINOR) http: runtime deprecate legacy HTTP parser (Beth Griggs) #376032da24ac302
] - lib: add URI handling functions to primordials (Antoine du Hamel) #373947b0ed4ba92
] - module: improve support of data: URLs (Antoine du Hamel) #3739293dd799a86
] - (SEMVER-MINOR) node-api: define version 8 (Gabriel Schulhof) #37652f5692093d3
] - (SEMVER-MINOR) node-api: allow retrieval of add-on file name (Gabriel Schulhof) #371956cef0e3678
] - src,test: add regression test for nested Worker termination (Anna Henningsen) #32623364bf03a68
] - test: fix races in test-performance-eventlooputil (Gerhard Stoebich) #36028d7a4ccdf09
] - test: correct test-worker-eventlooputil (Gerhard Stoebich) #358910f6d44500c
] - test: add cpu-profiler-crash test (Santiago Gimeno) #3729386f34ee18c
] - (SEMVER-MINOR) v8: implement v8.stopCoverage() (Joyee Cheung) #338078ddea3f16d
] - (SEMVER-MINOR) v8: implement v8.takeCoverage() (Joyee Cheung) #33807eec7542781
] - (SEMVER-MINOR) worker: add eventLoopUtilization() (Trevor Norris) #35664cc @nodejs/releasers