Skip to content

Shorten thread names that exceed the 15-char Linux limit #125919

@danmoseley

Description

@danmoseley

Note

This issue was created with Copilot assistance.

Linux limits thread names to 15 characters (plus null terminator) via pthread_setname_np. Several runtime thread names exceed this and get silently truncated, making them indistinguishable in debuggers and diagnostic tools like ps, top, and htop.

(macOS allows 63 chars, FreeBSD allows 32 — Linux is the strictest.)

Current Name Len Suggested Name Len Location
.NET Stack overflow trace logger 33 .NET SO Tracer 14 src/coreclr/vm/eepolicy.cpp
.NET Stack overflow create dump 32 .NET SO Dumper 14 src/coreclr/vm/excep.cpp
.NET Tiered Compilation Worker 30 .NET Tiered JIT 15 src/coreclr/vm/tieredcompilation.cpp
.NET Long Running Task 23 .NET Long Task 14 ThreadPoolTaskScheduler.cs
.NET ThreadPool IO 18 .NET TP I/O 12 PortableThreadPool.IO.Windows.cs
.NET SynchManager 17 .NET Synch Mgr 14 src/coreclr/pal/src/synchmgr/synchmanager.cpp
.NET TP Worker 14
.NET Finalizer 14
.NET EventPipe 14
.NET DebugPipe 14
.NET Debugger 13
.NET TP Gate 12
.NET TP Wait 12
JSWebWorker 11
.NET Timer 10

Note: The managed debugger may rely on some of these thread names to identify special threads. If so either they should be left unchanged or there will need to be a synchronized debugger change to match.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions