darwin: uv_set_process_title registers every process with LaunchServices, causing launchservicesd storms
Summary
On macOS, uv_set_process_title() registers the calling process with LaunchServices: uv__set_process_title in src/unix/darwin-proctitle.c calls _LSApplicationCheckIn and _LSSetApplicationInformationItem. So every Node.js process that sets process.title checks in with launchservicesd as if it were an application. That includes npm and npx on every start, and every vitest or tinypool worker.
Each check-in makes launchservicesd notify every LaunchServices client on the system, and each client calls back with _LSCopyApplicationInformation. On a busy machine, a burst of Node processes turns into a notification storm. On a 28-core Mac Studio running macOS 26.6.2, the load average reached 834. launchservicesd grew to 511 threads, nearly all blocked on one internal lock, and the kernel took 65% of CPU. Unrelated GUI apps stalled and the Dock stopped rendering.
Reproduction
node -e 'process.title="uvtest"; setTimeout(()=>{}, 3000)' &
sleep 1; lsappinfo list | grep uvtest # the CLI process is now a registered "application"Evidence
A root spindump of launchservicesd during a storm. The only _LSApplicationCheckIn callers were node processes, all on this path:
node::ProcessTitleSetter
uv_set_process_title
uv__set_process_title
_LSApplicationCheckIn (LaunchServices)Of the calls blocked waiting on launchservicesd, 495 were _LSCopyApplicationInformation, issued from notification handlers (_LSScheduleNotificationFunction_block_invoke). The trigger was about 28 vitest workers starting at once, each setting its title.
Local fix and result
We rebuilt libuv 1.52.1 with uv__set_process_title taking the existing TARGET_OS_IPHONE path, which only calls uv__thread_setname. After that:
- the process no longer appears in
lsappinfo list process.titlestill reads back correctly- fs, tcp, child_process, dns, worker_threads, fs.watch and timers all behave the same
- npm and node 24/26 work normally
Suggestion
Don't register non-bundle processes with LaunchServices by default. One option: skip the check-in when the main bundle is not an app bundle, or when the process is not already registered. Another: make the LaunchServices display-name update opt-in. The display name only matters for processes that appear in Activity Monitor or the Dock as applications. For CLI tools it has a system-wide cost and no visible benefit.
Environment: macOS 26.6.2 (25G83), arm64, libuv 1.52.1 (Homebrew), Node.js 24.20.0 and 26.9.0.
Source: libuv/libuv