Skip to content

test_runner: avoid reusing V8 serializers - #65951

Open
inoway46 wants to merge 1 commit into
nodejs:mainfrom
inoway46:fix-test-runner-v8-serializer-reuse
Open

test_runner: avoid reusing V8 serializers#65951
inoway46 wants to merge 1 commit into
nodejs:mainfrom
inoway46:fix-test-runner-v8-serializer-reuse

Conversation

@inoway46

@inoway46 inoway46 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Serializer#releaseBuffer() documents that a serializer should not be used after its buffer has been released.

This change follows that contract by using a dedicated serializer for the header length and a new serializer for each test event.

This was found while investigating the intermittent Windows crash in the referenced issue and may be its cause.

Refs: #65756

A serializer must not be used after releaseBuffer() is called. Use a
dedicated instance to calculate the header length and create a new
serializer for each test event.

Add a regression test that serializes the same object twice and verifies
that both frames can be deserialized independently.

Signed-off-by: inoway46 <inoueyuya416@gmail.com>
Assisted-by: Codex
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Sep 10, 2026
@inoway46
inoway46 marked this pull request as ready for review September 10, 2026 06:19
@inoway46 inoway46 changed the title test_runner: avoid reusing v8 serializers test_runner: avoid reusing V8 serializers Sep 10, 2026
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.17%. Comparing base (43d3fe9) to head (de0cc63).
⚠️ Report is 27 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #65951   +/-   ##
=======================================
  Coverage   90.16%   90.17%           
=======================================
  Files         771      771           
  Lines      265489   265490    +1     
  Branches    50471    50469    -2     
=======================================
+ Hits       239388   239414   +26     
+ Misses      17042    17007   -35     
- Partials     9059     9069   +10     
Files with missing lines Coverage Δ
lib/internal/test_runner/reporter/v8-serializer.js 100.00% <100.00%> (ø)

... and 31 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.

@StefanStojanovic StefanStojanovic 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 Sep 10, 2026
@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 Sep 10, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@inoway46 inoway46 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 Sep 12, 2026
@github-actions github-actions Bot added request-ci-failed Starting CI with the request-ci label failed and requires manual intervention. and removed request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Sep 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor
Failed to start CI
- Validating Jenkins credentials
✔  Jenkins credentials valid
- Querying data for job/node-test-pull-request/77307/
✔  Build data downloaded
   ℹ  Existing CI run found: https://ci.nodejs.org/job/node-test-pull-request/77307/
   ✖  Refusing to start a potentially duplicate CI job. Use the "Resume build" button in the Jenkins UI, or start a new CI manually.
https://github.com/nodejs/node/actions/runs/34678341119

@inoway46 inoway46 removed the request-ci-failed Starting CI with the request-ci label failed and requires manual intervention. label Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants