Skip to content

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

Closed

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.

Activity

  1. dotnet-policy-service commented on Mar 22, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
    See info in area-owners.md if you want to be subscribed.

  2. added
    untriaged
    on Mar 22, 2026
  3. jkotas commented on Mar 22, 2026

    @jkotas
    Member

    .NET TC Worker

    We should drop the "worker" from the name, it has very little information value. Once we do that, it can something more self-describing like ".NET Tiered JIT".

    .NET LR Task

    "LR" is very cryptic. Can this be something more self-describing like ".NET Long Task"?

    .NET TP I/O

    Windows specific. (We can still change the name to make it more similar to other TP names.)

  4. danmoseley commented on Mar 22, 2026

    @danmoseley
    ContributorAuthor

    Any issues with debugger dependency or we can freely change?
    I can kick copilot if there's no special considerations

  5. jkotas commented on Mar 22, 2026

    @jkotas
    Member

    We have tweaked the thread names a few times before and I do not recall debugger or diagnostic tools having an issue with that.

  6. danmoseley commented on Mar 22, 2026

    @danmoseley
    ContributorAuthor

    @Copilot please change names as per the table above

  7. added a commit that references this issue on Mar 24, 2026
    21630d9
  8. removed
    untriaged
    on Mar 24, 2026
  9. locked and limited conversation to collaborators on Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions