Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
libuv assertion on Windows with Node.js 23.x | GoodFirstPicks

libuv assertion on Windows with Node.js 23.x

nodejs/node 14 comments 1mo ago
View on GitHub
highopenScope: somewhat clearSkill match: noNode.jsJavaScript

Why this is a good first issue

The issue involves a libuv assertion on Windows and requires deep knowledge of Node.js internals.

AI Summary

The issue involves a libuv assertion on Windows, likely due to incorrect usage of uv_async_send() after uv_close(). The problem was traced to a large PR (3143 files), making it difficult to pinpoint the exact source. Deep knowledge of Node.js internals and libuv is required to diagnose and fix.

Issue Description

Version

23.x+

Platform

Windows

Subsystem

No response

What steps will reproduce the bug?

Write the following file as registryServer.mjs:

registryServer.mjs

The original file is https://github.com/nodejs/corepack/blob/main/tests/_registryServer.mjs, I tried to trim the unrelated stuff but it's still a large file:

import { createHash, createSign, generateKeyPairSync } from "node:crypto";
import { once } from "node:events";
import { createServer } from "node:http";
import { gzipSync } from "node:zlib";

let privateKey, keyid;

({ privateKey } = generateKeyPairSync(`ec`, {
  namedCurve: `sect239k1`,
}));

const { privateKey: p, publicKey } = generateKeyPairSync(`ec`, {
  namedCurve: `sect239k1`,
  publicKeyEncoding: {
    type: `spki`,
    format: `pem`,
  },
});
privateKey ??= p;
keyid = `SHA256:${createHash(`SHA256`).end(publicKey).digest(`base64`)}`;
process.env.COREPACK_INTEGRITY_KEYS = JSON.stringify({
  npm: [
    {
      expires: null,
      keyid,
      keytype: `ecdsa-sha2-sect239k1`,
      scheme: `ecdsa-sha2-sect239k1`,
      key: publicKey.split(`\n`).slice(1, -2).join(``),
    },
  ],
});

function createSimpleTarArchive(fileName, fileContent, mode = 0o644) {
  const contentBuffer = Buffer.from(fileContent);

  const header = Buffer.alloc(512); // TAR headers are 512 bytes
  header.write(fileName);
  header.write(`100${mode.toString(8)} `, 100, 7, `utf-8`); // File mode (octal) followed by a space
  header.write(`0001750 `, 108, 8, `utf-8`); // Owner's numeric user ID (octal) followed by a space
  header.write(`0001750 `, 116, 8, `utf-8`); // Group's numeric user ID (octal) followed by a space
  header.write(`${contentBuffer.length.toString(8)} `, 124, 12, `utf-8`); // File size in bytes (octal) followed by a space
  header.write(
    `${Math.floor(new Date(2000, 1, 1) / 1000).toString(8)} `,
    136,
    12,
    `utf-8`
  ); // Last modification time in numeric Unix tim

GitHub Labels

windows

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!

Risk Flags

  • libuv assertion
  • Windows-specific
  • large PR history
Loading labels...

Details

Points10 pts
Difficultyhigh
Scopesomewhat clear
Skill Matchno
Test Focusedno