Skip to content

event loop regression after libuv v1.45.0 update #48512

Closed
@trevnorris

Description

@trevnorris

Version

all

Platform

all

Subsystem

event loop

What steps will reproduce the bug?

// Backwards compatibility, this shouldn't run.
setTimeout(() => { throw new Error('bad') }, 1).unref();

const t = Date.now();
while (Date.now() - t < 10);

What do you see instead?

The test fails because of the change libuv/libuv@6600954 that landed in v1.45.0. What's happening is that unref'ing the timer shouldn't count as a handle internally, but the first iteration of timers runs regardless because the bootstrap takes longer than the timer's timeout.

Additional information

This was fixed in libuv/libuv@24d1d08, and should be included in the next libuv release. Node.js should update libuv as soon as is released (see libuv/libuv#4060).

Metadata

Metadata

Assignees

No one assigned

    Labels

    libuvIssues and PRs related to the libuv dependency or the uv binding.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions