Skip to content

[v26.x backport] http2: send deferred RST_STREAM on stream destroy - #67444

Open
gabedemesa wants to merge 47 commits into
nodejs:v26.x-stagingfrom
gabedemesa:backport-67372-to-v26.x
Open

gabedemesa wants to merge 47 commits into
nodejs:v26.x-stagingfrom
gabedemesa:backport-67372-to-v26.x

Conversation

@gabedemesa

@gabedemesa gabedemesa commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #67372 to v26.x.

This is a cherry-pick of the landed commit, f8ab610, rebased onto the current staging branch.

The cherry-pick conflicted in lib/internal/http2/core.js, because onStreamClose() and closeStream() were restructured on main after v26.x branched. The same changes are applied to the v26.x versions of those functions:

  • STREAM_FLAGS_RST_DEFERRED is set where closeStream() defers finishCloseStream to 'finish', and cleared in finishCloseStream().
  • Http2Stream#_destroy() submits the deferred RST_STREAM when the stream is already closed with the flag set.
  • onStreamClose() clears the flag before destroying. On main this is done only in the locallyInitiated branch; on v26.x it is done unconditionally, which is equivalent because the flag can only be set on a stream that closeStream() has already marked closed.

The src/node_http2.cc change and both tests applied cleanly. Authorship is kept with the original author.

The tests needed one adjustment, in a separate fixup! commit. On main, a stream that receives a clean RST_STREAM before its body ends errors with ERR_HTTP2_STREAM_ABORTED; on v26.x it closes without an error. The tests expected the error, so on v26.x they expect no error on the receiving side instead. Both sides still close with rstCode 0, as the tests assert.

Verification (macOS arm64, local build of this branch)

  • test-http2-close-destroy-queued-body and test-http2-server-close-destroy-queued-body pass 50 out of 50 runs each.
  • Without the fix (lib/internal/http2/core.js and src/node_http2.cc reverted), both tests run away, reaching 1,627 MB and 1,866 MB of RSS before being stopped.
  • parallel/test-http2-* and sequential/test-http2-* pass.
  • ESLint and cpplint are clean for the changed files.
  • The reproductions from HTTP/2: client session outgoing queue grows without bound (Http2Session::CopyDataIntoOutgoing), OOM-killing the process undici#6181 stay bounded: fetch() uploads aborted mid-body, a server that holds the flow-control window until the client's AbortSignal.timeout() fires, and plain node:http2 close() followed by destroy() (respectively 136 MB, 70 MB, under 1 MB).

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/http2
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. http2 Issues and PRs related to the http2 subsystem. needs-ci PRs that need a full CI run. v26.x Issues that can be reproduced on v26.x or PRs targeting the v26.x-staging branch. labels Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

panva and others added 6 commits November 13, 2026 09:02
Explicit DH parameters are recognized as named groups during OpenSSL
provider import, but DHPointer::check() only skips primality checks for
groups constructed by name. This makes createDiffieHellman() block for
seconds on standard MODP groups.

Query the imported key's group name to restore the legacy DH_check()
shortcut without changing key generation. Add a deterministic regression
test with randomness disabled and cover explicit and padded parameters
through the JavaScript API.

Fixes: nodejs#67067
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: nodejs#67071
Backport-PR-URL: nodejs#67442
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
createHmac(), createSign(), createVerify() and the synchronous
one-shot sign, verify, HKDF and PBKDF2 functions looked up their
digest with Digest::FromName(). That returns OpenSSL's legacy EVP_MD,
so every EVP_DigestInit_ex() and HMAC init had to fetch the provider
implementation again through the method store.

Look these digests up through the per-Environment cache that
createHash() and crypto.hash() already use. Jobs on the thread pool
keep using Digest::FromName(): with the cache, Web Crypto digest and
HMAC throughput went down, because workers that finish sooner have to
be woken up for each new job more often.

Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
Assisted-by: Grok
PR-URL: nodejs#67109
Backport-PR-URL: nodejs#67442
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Every HMAC context was created with EVP_MAC_fetch() and keyed with the
digest passed by name, so the provider fetched the digest again on
each init. Both lookups go through OpenSSL's method store.

Keep an HMAC context without a key for each digest in the
per-Environment digest cache, and duplicate it in createHmac(). A
duplicated context already has its digest, so keying it with the same
digest no longer fetches anything.

Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
Assisted-by: Grok
PR-URL: nodejs#67109
Backport-PR-URL: nodejs#67442
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Clear errors raised by key comparison, SPKAC parsing, and JWK
import. Ensure TLS and private-key parsing only inspect errors
from their own OpenSSL calls.

Assisted-by: Codex
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: nodejs#67225
Backport-PR-URL: nodejs#67442
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Honor requested primality check counts with provider-backed OpenSSL.

Support empty passphrases for encrypted SEC1 PEM output.

Assisted-by: Codex
Signed-off-by: Brad Anderson <brad@sankatygroup.com>
PR-URL: nodejs#67039
Backport-PR-URL: nodejs#67442
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
FIPS-capable providers can use names other than fips. Remove the
named-provider lookup and explicit self-test from the startup flags,
leaving algorithm availability checks to each operation.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: nodejs#67358
Backport-PR-URL: nodejs#67442
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
npm-cli-bot and others added 11 commits November 13, 2026 09:08
PR-URL: nodejs#67264
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Original commit message:

    [heap] Always decrement age in RetainMaps()

    When the prototype and constructor were already marked we did not
    age the map because of the assumption that this would only keep the
    transition tree alive. However, this does not hold because of
    the JSFunctions inside an AccessorPair in DescriptorArray.

    This can result in retaining maps indefinitely when not triggering
    memory reducing GCs. This CL therefore simplifies the code to
    always age maps instead. This is neutral on Speedometer and Jetstream.

    Bug: 571157135
    Change-Id: I8fb633a0ec0c1d66e4596390ca48e1c7006c9cc2
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8557820
    Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#110622}

Refs: v8/v8@497c2e6
PR-URL: nodejs#66728
Reviewed-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Original commit message:

    [sandbox] Fix JSDispatchTable entry mark-bit erasure

    A race condition exists in V8's concurrent marking and deoptimization
    logic where Code::SetMarkedForDeoptimization updates a dispatch table
    entry without running a write barrier. During concurrent marking, a
    background thread's CAS mark can be overwritten by the mutator's blind
    store, leading to a live entry being swept.

    Fixed: 525686865
    Change-Id: I0cebd44b62ad5c16c19d73e5586058b1d2265ee4
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8074259
    Commit-Queue: Olivier Flückiger <olivf@chromium.org>
    Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
    Auto-Submit: Olivier Flückiger <olivf@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#108583}

Refs: v8/v8@c21a93e
PR-URL: nodejs#66729
Fixes: nodejs#66661
Reviewed-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Original commit message:

    PPC: Fix safepoint record

    This patch is needed after http://crrev.com/c/7899697 started failing
    this test intermittently during GC on pntr compressed debug builds:
    ```
    === mjsunit/compiler/regress-crbug-1464516 ===
    --- stderr ---
    #
    # Fatal error in ../../src/objects/tagged-impl.h, line 138
    # Debug check failed: kCanBeWeak || (!IsSmi() == HAS_STRONG_HEAP_OBJECT_TAG(ptr_)).
    ```

    PPC could emit a trampoline pool right after `MacroAssembler::Call`
    returns which could make any subsequent `DefineSafepoint` calls
    record the incorrect `pc_offset` as it then points to after the emitted pool.

    This CL patches every "MacroAssembler::Call" site to record the pc_offset before the trampoline pool is emitted similar to how it's
    done on riscv.

    It's essentially porting the following changes to PPC:
    f385232a87a46af77c97e9095c8a25e559c37ce7
    2c6618f2d927a91dd54727abf096828521f7439f

    Change-Id: I2095bce8b69b0c4f064117ed95ee2f3245436e62
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7918866
    Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
    Reviewed-by: John <junyan1@ibm.com>
    Commit-Queue: Milad Farazmand <mfarazma@ibm.com>
    Cr-Commit-Position: refs/heads/main@{#107921}

Refs: v8/v8@f331137
PR-URL: nodejs#67261
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Original commit message:

    [regexp] Fix modifiers for ChoiceNodes during Analysis

    During the analysis pass we didn't reset flags after visiting
    alternatives of a ChoiceNode, which is required as the sub-graph of an
    alternative might modify the flags.

    Fixed: 510487690
    Change-Id: I6b2660a98b34cd12740538af4ce61685609934a0
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7826630
    Commit-Queue: Patrick Thier <pthier@chromium.org>
    Auto-Submit: Patrick Thier <pthier@chromium.org>
    Reviewed-by: Jakob Linke <jgruber@chromium.org>
    Commit-Queue: Jakob Linke <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#107120}

Refs: v8/v8@e540e11
Refs: nodejs#66277
PR-URL: nodejs#67207
Reviewed-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Original commit message:

    [regexp] Reset flags after resetting state in Parser

    When restoring the previous state after parsing a closing parenthesis
    we also need to restore flags explicitly from the restored state.

    Fixed: 523687962
    Change-Id: I63a5bd9fec2f9b7f6fb43b6893027c3c3d0755f0
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7950157
    Auto-Submit: Patrick Thier <pthier@chromium.org>
    Commit-Queue: Jakob Linke <jgruber@chromium.org>
    Reviewed-by: Jakob Linke <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#108021}

Refs: v8/v8@19e7a57
Refs: nodejs#66277
PR-URL: nodejs#67207
Reviewed-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Original commit message:

    [regexp] Record flags on deferred worklist items

    ActionNode::Emit for MODIFY_FLAGS was previously changed to restore
    outer_flags on the way out to avoid leaking inner flags to trailing
    deferred nodes. However, this caused nodes deferred from within the
    modifier group to be compiled with the outer flags when processed by
    Compiler::Assemble.

    Instead of restoring flags in ActionNode::Emit, record the active flags
    at the point where a node is deferred in Compiler::AddWork, and restore
    them from the work-list item before emitting it.

    This partially reverts
    https://chromium-review.googlesource.com/c/v8/v8/+/8174589.

    Change-Id: I3a552f9223b88ba99889e4375b8d1ea761257b94
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8213283
    Reviewed-by: Patrick Thier <pthier@chromium.org>
    Auto-Submit: Jakob Linke <jgruber@chromium.org>
    Commit-Queue: Patrick Thier <pthier@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#109102}

Refs: v8/v8@b69a1a1
Co-authored-by: Radu Samson <radu.samson@ext.ec.europa.eu>
Refs: nodejs#66277
PR-URL: nodejs#67207
Reviewed-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Original commit message:

    [regexp] Reset compiler flags between word boundary branches

    When compiling \b and \B word boundary checks in AssertionNode where the
    succeeding character type is unknown, two code paths (before_non_word and
    before_word) are generated sequentially.

    If the boundary assertion is placed inside a modifier group (e.g.
    (?i:\.|\bNULL)), emitting the first branch traverses through on_success
    and reaches the ActionNode that restores outer flags at group exit.
    This mutates flags without restoring it when returning to emit the
    second branch. Consequently, subsequent nodes in the second branch
    (before_word) were incorrectly compiled with outer flags instead
    of the modifier group's flags.

    This CL saves compiler->flags() and restores them before emitting the
    before_word branch in AssertionNode::EmitBoundaryCheck.

    TAG=agy

    Fixed: 544575761
    Change-Id: I7f08bcb99c749d5e22636c8bd6eb44bd1d3e2e39
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8257209
    Reviewed-by: Victor Gomes <victorgomes@chromium.org>
    Commit-Queue: Patrick Thier <pthier@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#109236}

Refs: v8/v8@d315af3
Refs: nodejs#66277
PR-URL: nodejs#67207
Reviewed-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Original commit message:

    [regexp] Reset flags between negative lookaround branches

    e540e1161b0 (bug 510487690) reset the analysis-time flags between the
    alternatives of a ChoiceNode, since an alternative's sub-graph may
    contain a MODIFY_FLAGS node. NegativeLookaroundChoiceNode has its own
    visitor and was left out, so a modifier group inside a negative
    lookaround still leaks its flags into the continuation.

      /(?!(?i:x|y))[K]/.exec('kz') // "k", should be null

    The lookaround body is visited first and leaves the group's flags
    behind; the continuation's class ranges are then made case independent
    under those flags rather than the pattern's, so [K] picks up 'k'.

    Only class ranges are affected: TextNode::MakeCaseIndependent
    materializes the equivalents during analysis, while atoms get their case
    closure at emission time from the restored flags. A single- alternative
    body does not reproduce either, since its restore node is emitted last.

    Change-Id: I4077076b9dbee6acf75918a2c4f7bf7d86cab059
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8175612
    Auto-Submit: Jakob Linke <jgruber@chromium.org>
    Reviewed-by: Patrick Thier <pthier@chromium.org>
    Commit-Queue: Patrick Thier <pthier@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#109043}

Refs: v8/v8@1e7ee91
Co-authored-by: Radu Samson <radu.samson@ext.ec.europa.eu>
Refs: nodejs#66277
PR-URL: nodejs#67207
Reviewed-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Original commit message:

    [riscv]Fix unordered FP comparison and emit at the consumer

    The lowering for kFloatLessThanOrUnordered and
    kFloatLessThanOrEqualOrUnordered incorrectly mapped to (LT, true)
    and (LE, true), respectively. Since ComputeBranchInfo can negate a
    branch condition after emitting the comparison, complementary
    conditions must use the same comparison and invert its predicate.
    The incorrect mappings dropped the negation, breaking NaN semantics.
    For example, optimized Wasm loops like
    `do { x += 1.0; } while (!(x > 0.0));` produced wrong results.

    Fix the mappings: kFloatLessThanOrUnordered now uses negated GE,
    and kFloatLessThanOrEqualOrUnordered uses negated GT. To prevent
    this class of bug, also convert kRiscvCmpS and kRiscvCmpD into
    pseudo-instructions like the integer kRiscvCmp. The actual
    comparison is now emitted at the single flags consumer (branch,
    boolean materialization, or select) through the new EmitFPCompare
    helper, using the consumer's final FlagsCondition. This ensures
    the predicate and machine condition are resolved consistently.
    Generated code remains byte-identical.

    Bug: 557938134
    Change-Id: I230e181753c5e9c6e7fbea651e551192a76e4005
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8360836
    Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
    Auto-Submit: Yahan Lu (LuYahan) <yahan@iscas.ac.cn>
    Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
    Cr-Commit-Position: refs/heads/main@{#109690}

Refs: v8/v8@8521e2e
Co-authored-by: LuYahan <yahan@iscas.ac.cn>
PR-URL: nodejs#65898
Reviewed-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Original commit message:

    [heap] Treat zero allocation throughput as a low allocation rate

    Since https://crrev.com/c/5935313 allocation throughput is tracked with
    SmoothedBytesAndDuration, which has no lower bound. A sampled throughput
    of exactly 0 -- nothing was allocated, or the smoothed value decayed to
    0 after a long idle period -- made ComputeMutatorUtilizationImpl()
    return a mutator utilization of 0 ("maximal allocation"). For an isolate
    that never allocates on the CppHeap, HasLowAllocationRate() is then
    never true and the MemoryReducer cannot start a GC through its
    low-allocation condition; only the 100s watchdog can. Node.js hits this
    for any process that does not use node:vm.

    Remove the special case. A mutator speed of 0 now yields a mutator
    utilization of 1, i.e. the lowest possible allocation rate. gc_speed is
    either the conservative default or at least 1 byte/ms, so the formula
    stays well defined.

    Bug: 570738027
    Change-Id: I84cd51607df3c31c2f1e02bb2fe258e5506131ce
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8521518
    Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
    Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
    Reviewed-by: Omer Katz <omerkatz@chromium.org>
    Commit-Queue: Omer Katz <omerkatz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#110599}

Refs: v8/v8@2444c10
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs#66736
@gabedemesa
gabedemesa force-pushed the backport-67372-to-v26.x branch 3 times, most recently from ad86579 to 61c2dcf Compare November 16, 2026 17:13
@gabedemesa
gabedemesa marked this pull request as ready for review November 16, 2026 17:16
When a compat API response finishes and the request had no body,
kMaybeDestroy() takes the graceful-close path and sends
RST_STREAM(NO_ERROR) right away. If the connection flow-control
window is exhausted at that point, the empty END_STREAM DATA frame
is still queued, so the reset goes out first and the END_STREAM
frame is dropped, truncating an otherwise complete response.

Skip the graceful close when the request already ended with its
HEADERS frame, since there is no request body to abort.

Fixes: nodejs#66525
Refs: nodejs#64265
Refs: nodejs#64663
Signed-off-by: Barath <barathraj048@gmail.com>
PR-URL: nodejs#66672
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Efe Karasakal <hi@efe.dev>
manusingh090 and others added 17 commits November 17, 2026 14:48
The "exports" field type lists `string[]`, but the packages
documentation never describes how an array of targets is resolved.
Document that items are tried in order, that only invalid targets and
unmatched conditions are skipped, and that a missing file does not
cause the next item to be tried.

Fixes: nodejs#58600
Signed-off-by: Manjeet Singh <024manjeetsingh@gmail.com>
PR-URL: nodejs#67393
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
The subtest watched all of tmpdir, so files created there by the
subtests running alongside it restarted the child and broke its
output. The fix is to watch a directory of its own instead to not
conflict.

Refs: nodejs#66232
Assisted-by: Claude
Signed-off-by: Farid Zakaria <farid.m.zakaria@gmail.com>
PR-URL: nodejs#67041
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
Adds the facility to ignore root certificates by fingerprint using
mk-ca-bundle's -x parameter.

Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: nodejs#67403
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
When a certificate's notBefore or notAfter time cannot be parsed,
validFrom and validTo return the string 'Bad time value', and
validFromDate and validToDate return an invalid Date. Relational
comparisons with an invalid Date are always false, so a naive expiry
check can treat such a certificate as valid. Document the current
behavior and tell callers to reject invalid dates first.

Signed-off-by: Sarthak Ahuja <39986642+SarthakAhuja@users.noreply.github.com>
PR-URL: nodejs#67406
Refs: nodejs#67285
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Some test cases made a single change right after creating a watcher.
On macOS, libuv starts the FSEvents stream asynchronously, so that
change could be missed and the test hung until it timed out.

Keep making the change until the watcher reports it, as the other
cases in the file already do.

Refs: nodejs/reliability#1715
Refs: nodejs/reliability#1644
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: nodejs#67298
Refs: https://github.com/nodejs/node/actions/runs/42177414954
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
Original commit message:

    [temporal] Compute zoneinfo64.res length from ResB index table

    ICU4C's offsetTOCLookupFn sets UDataMemory::length = -1 for the last
    entry in a .dat archive (which occurs for zoneinfo64.res in small-icu
    builds where zu.res is excluded), and pointerTOCLookupFn sets length = -1
    for all entries in pointer TOC builds.

    When UDataMemory::length is -1, compute the bundle byte length from the
    ResB header offset (udata_getMemory(memory) - data) and the
    self-describing URES_INDEX_BUNDLE_TOP word in the ResB index table,
    matching ICU4C's res_init() in uresdata.cpp. Also check USING_SYSTEM_ICU
    in addition to V8_ENABLE_TEMPORAL_SYSTEMICU when deciding whether
    internal udatamem.h is available.

    Bug: 576986967
    Change-Id: I7a2c881eb3891a97eafb244f71aa405ff2434b51
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8642579
    Commit-Queue: Manish Goregaokar <manishearth@google.com>
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#111181}

Refs: v8/v8@a051772
Co-authored-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: nodejs#67416
Refs: https://issues.chromium.org/issues/576986967
Refs: nodejs#62676
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Steven R Loomis <srl295@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
A JavaScript number is always bound with sqlite3_bind_double(), so it is
written as REAL even when it has no fractional part. A BigInt is bound
with sqlite3_bind_int64() and is the way to write an INTEGER. The type
conversion table listed number under both INTEGER and REAL without
saying which applies when, so the rule had to be discovered by
experiment.

Column type affinity hides this most of the time, which is why the cases
it does not cover are surprising. Comparing against a TEXT column is the
worst of them: the number 3 compares as '3.0' and silently fails to
match a stored '3', with no error to point at the cause. Document the
rule, the reason for it, and that case, and remove number from the
table's INTEGER row. Point the virtual table section's link at the new
text.

better-sqlite3 binds numbers the same way and has fielded the same
question repeatedly (WiseLibs/better-sqlite3#165, nodejs#627, nodejs#897, nodejs#1144,
nodejs#1313), each time closed as working as intended.

Fixes: nodejs#63826
Refs: WiseLibs/better-sqlite3#627
Assisted-by: Claude Opus 5.5
Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
PR-URL: nodejs#67424
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Guilherme Araújo <arauujogui@gmail.com>
Assisted-by: Claude Opus 5.5
Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
PR-URL: nodejs#67425
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs#67434
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
The pbkdf2() call that keeps the only threadpool worker busy used a
6-byte password and a 4-byte salt. OpenSSL 4 FIPS rejects those, so
the derivation failed at once and freed the worker. The queued stat
could then start before req.cancel() ran, and it completed without
ECANCELED.

Use inputs that meet the FIPS minimums and check that the derivation
succeeds.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
PR-URL: nodejs#67449
Refs: nodejs#67248
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
The PSK server's pskCallback answered every identity, but OpenSSL also
asks it about the resumption ticket, cut at its first NUL byte. When
that prefix is valid UTF-8, about 1% of the time, the ticket was taken
for an external PSK and the handshake failed with decrypt_error. Only
answer for the identity the client sends.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
PR-URL: nodejs#67450
Refs: nodejs/reliability#1722
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: nodejs#67343
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
The binary tarball target only codesigns bin/node. Notarization runs
only for the pkg, and tools/osx-notarize.sh only knows how to submit a
pkg, so every darwin tarball binary ships signed but without a ticket.
Gatekeeper then applies a full trust evaluation to each process spawned
through it, which slows down every CLI shim on macOS.

Make tools/osx-notarize.sh take a path instead of a version id. A .pkg
keeps the existing flow. Any other file is treated as a Mach-O binary:
it is zipped with ditto, submitted with notarytool, and the ticket is
verified with `codesign --verify -R=notarized` using the existing retry
helper. spctl cannot be used for that check, it rejects command line
tools as "not an app". The binary itself is not modified, so published
checksums do not change. A bare version id is still accepted and
resolved to node-<version>.pkg for the release branches.

Call the script from the binary target after codesign. It is a no-op
unless the NOTARIZATION_* variables are exported, so the tarball jobs
keep behaving as today until the release job injects them.

Refs: nodejs#67140
Refs: nodejs/build#3538
Refs: nodejs/build#4545
Refs: nodejs#66855
Assisted-by: Claude
Assisted-by: Codex
Signed-off-by: Ulises Gascon <ulisesgascongonzalez@gmail.com>
PR-URL: nodejs#67143
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: nodejs#67386
Refs: nodejs#66951
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Signed-off-by: Ultroncn <82553854+Ultroncn@users.noreply.github.com>
PR-URL: nodejs#67463
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs#67108
Reviewed-By: James M Snell <jasnell@gmail.com>
Do not include the vendored simdutf when compiling merve if shared
simdutf is used to ensure the headers match the linked library.

Signed-off-by: Yao Zi <me@ziyao.cc>
PR-URL: nodejs#67410
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: James M Snell <jasnell@gmail.com>
@aduh95
aduh95 force-pushed the v26.x-staging branch 4 times, most recently from 4dd7c56 to e578ab4 Compare November 17, 2026 16:18
And setup `test-shared.yml` so we can detect regressions.

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs#66844
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
inoway46 and others added 2 commits November 17, 2026 08:50
close() with NO_ERROR waits for 'finish' before sending RST_STREAM.
If the body is stuck behind flow control and the stream is destroyed
first, RST_STREAM is never sent and nghttp2 keeps the stream open.
On the next WINDOW_UPDATE, OnRead finds no stream and returns 0
without EOF, so nghttp2 sends empty DATA frames until OOM. Both
client and server streams are affected.

Send the deferred RST_STREAM in _destroy(). As a backstop, return
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE from OnRead when the stream is
gone, which nghttp2 documents as the way to reset a stream on error.

Fixes: nodejs#67363
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: nodejs#67372
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
On v26.x, a clean RST_STREAM received before the body ends closes the
stream without an error, unlike main, where it errors with
ERR_HTTP2_STREAM_ABORTED. Expect no error on the receiving side. The
tests still run out of memory without the fix.

Assisted-by: a closed-source coding agent
Signed-off-by: Gabe De Mesa <gdemesa@opengov.com>
@gabedemesa
gabedemesa force-pushed the backport-67372-to-v26.x branch from 61c2dcf to 31175cd Compare November 17, 2026 19:11
@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.92%. Comparing base (ca26282) to head (31175cd).
⚠️ Report is 1614 commits behind head on v26.x-staging.

Files with missing lines Patch % Lines
src/node_http2.cc 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           v26.x-staging   #67444      +/-   ##
=================================================
+ Coverage          90.24%   90.92%   +0.68%     
=================================================
  Files                729      775      +46     
  Lines             242760   275763   +33003     
  Branches           46044    53026    +6982     
=================================================
+ Hits              219073   250749   +31676     
- Misses             15133    15798     +665     
- Partials            8554     9216     +662     
Files with missing lines Coverage Δ
lib/internal/http2/core.js 95.37% <100.00%> (-0.15%) ⬇️
src/node_http2.cc 82.39% <0.00%> (+0.52%) ⬆️

... and 439 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We would need to backport #66314 first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. http2 Issues and PRs related to the http2 subsystem. needs-ci PRs that need a full CI run. v26.x Issues that can be reproduced on v26.x or PRs targeting the v26.x-staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.