From 2a5adbf0c4e63cd18a5a74579fe8ef58d4ea683f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 17:55:37 +0000 Subject: [PATCH 1/4] Initial plan From 10878f748e6c87612b79d186713d0f57676c88cc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 18:01:42 +0000 Subject: [PATCH 2/4] Shorten thread names that exceed 15-char Linux limit - .NET Stack overflow trace logger -> .NET SO Tracer (eepolicy.cpp) - .NET Stack overflow create dump -> .NET SO Dumper (excep.cpp) - .NET Tiered Compilation Worker -> .NET Tiered JIT (tieredcompilation.cpp) - .NET Long Running Task -> .NET Long Task (ThreadPoolTaskScheduler.cs) - .NET ThreadPool IO -> .NET TP I/O (PortableThreadPool.IO.Windows.cs) - .NET SynchManager -> .NET Synch Mgr (synchmanager.cpp) Fixes: linux pthread_setname_np silently truncating names > 15 chars Co-authored-by: danmoseley <6385855+danmoseley@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/a38ad624-ca24-4ec4-909a-8c3265181984 --- src/coreclr/pal/src/synchmgr/synchmanager.cpp | 2 +- src/coreclr/vm/eepolicy.cpp | 2 +- src/coreclr/vm/excep.cpp | 2 +- src/coreclr/vm/tieredcompilation.cpp | 2 +- .../src/System/Threading/PortableThreadPool.IO.Windows.cs | 2 +- .../src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/coreclr/pal/src/synchmgr/synchmanager.cpp b/src/coreclr/pal/src/synchmgr/synchmanager.cpp index e972697e0281e6..f5ba78f9417c08 100644 --- a/src/coreclr/pal/src/synchmgr/synchmanager.cpp +++ b/src/coreclr/pal/src/synchmgr/synchmanager.cpp @@ -1160,7 +1160,7 @@ namespace CorUnix reinterpret_cast(pArg); CPalThread * pthrWorker = InternalGetCurrentThread(); - SetThreadDescription(PAL_GetCurrentThread(), W(".NET SynchManager")); + SetThreadDescription(PAL_GetCurrentThread(), W(".NET Synch Mgr")); while (!fWorkerIsDone) { diff --git a/src/coreclr/vm/eepolicy.cpp b/src/coreclr/vm/eepolicy.cpp index 4931f2d990e5e1..31cd7d8120141f 100644 --- a/src/coreclr/vm/eepolicy.cpp +++ b/src/coreclr/vm/eepolicy.cpp @@ -715,7 +715,7 @@ void DECLSPEC_NORETURN EEPolicy::HandleFatalStackOverflow(EXCEPTION_POINTERS *pE DisplayStackOverflowException(); - HandleHolder stackDumpThreadHandle = Thread::CreateUtilityThread(Thread::StackSize_Small, LogStackOverflowStackTraceThread, GetThreadNULLOk(), W(".NET Stack overflow trace logger")); + HandleHolder stackDumpThreadHandle = Thread::CreateUtilityThread(Thread::StackSize_Small, LogStackOverflowStackTraceThread, GetThreadNULLOk(), W(".NET SO Tracer")); if (stackDumpThreadHandle != INVALID_HANDLE_VALUE) { // Wait for the stack trace logging completion diff --git a/src/coreclr/vm/excep.cpp b/src/coreclr/vm/excep.cpp index d53c2052479bf3..e986cb9d55d2b4 100644 --- a/src/coreclr/vm/excep.cpp +++ b/src/coreclr/vm/excep.cpp @@ -3430,7 +3430,7 @@ CreateCrashDumpIfEnabled(bool stackoverflow) { if (stackoverflow) { - HandleHolder createDumpThreadHandle = Thread::CreateUtilityThread(Thread::StackSize_Small, (LPTHREAD_START_ROUTINE)LaunchCreateDump, (void*)createDumpCommandLine, W(".NET Stack overflow create dump")); + HandleHolder createDumpThreadHandle = Thread::CreateUtilityThread(Thread::StackSize_Small, (LPTHREAD_START_ROUTINE)LaunchCreateDump, (void*)createDumpCommandLine, W(".NET SO Dumper")); if (createDumpThreadHandle != INVALID_HANDLE_VALUE) { // Wait for the dump to be generated diff --git a/src/coreclr/vm/tieredcompilation.cpp b/src/coreclr/vm/tieredcompilation.cpp index 71231e36426b27..08a020f6932a70 100644 --- a/src/coreclr/vm/tieredcompilation.cpp +++ b/src/coreclr/vm/tieredcompilation.cpp @@ -398,7 +398,7 @@ void TieredCompilationManager::CreateBackgroundWorker() #endif newThread->SetBackground(true); - if (!newThread->CreateNewThread(0, BackgroundWorkerBootstrapper0, newThread, W(".NET Tiered Compilation Worker"))) + if (!newThread->CreateNewThread(0, BackgroundWorkerBootstrapper0, newThread, W(".NET Tiered JIT"))) { newThread->DecExternalCount(false); ThrowOutOfMemory(); diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.IO.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.IO.Windows.cs index b186ebff30ff22..10439ee44ef254 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.IO.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.IO.Windows.cs @@ -227,7 +227,7 @@ public IOCompletionPoller(nint port) _thread.IsThreadPoolThread = true; _thread.IsBackground = true; - _thread.Name = ".NET ThreadPool IO"; + _thread.Name = ".NET TP I/O"; // Thread pool threads must start in the default execution context without transferring the context, so // using UnsafeStart() instead of Start() diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs index b0c2c20208d9b1..b54fdfce85c2ca 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ThreadPoolTaskScheduler.cs @@ -49,7 +49,7 @@ protected internal override void QueueTask(Task task) new Thread(s_longRunningThreadWork) { IsBackground = true, - Name = ".NET Long Running Task" + Name = ".NET Long Task" }.UnsafeStart(task); } else From 02f058b917f1afb8e185ac7682939cbdef838376 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 18:10:19 +0000 Subject: [PATCH 3/4] Update .NET Long Running Task -> .NET Long Task in worker-thread.ts Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/10921e85-2536-4fa5-a782-44aa9b6732b1 --- src/mono/browser/runtime/pthreads/worker-thread.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/browser/runtime/pthreads/worker-thread.ts b/src/mono/browser/runtime/pthreads/worker-thread.ts index 75b249812d338f..5b2a0b551ced5e 100644 --- a/src/mono/browser/runtime/pthreads/worker-thread.ts +++ b/src/mono/browser/runtime/pthreads/worker-thread.ts @@ -152,7 +152,7 @@ export function mono_wasm_pthread_on_pthread_attached (pthread_id: PThreadPtr, t // FIXME: this is a hack to get constant length thread names monoThreadInfo.threadName = name; monoThreadInfo.isTimer = name == ".NET Timer"; - monoThreadInfo.isLongRunning = name == ".NET Long Running Task"; + monoThreadInfo.isLongRunning = name == ".NET Long Task"; monoThreadInfo.isThreadPoolGate = name == ".NET TP Gate"; update_thread_info(); currentWorkerThreadEvents.dispatchEvent(makeWorkerThreadEvent(dotnetPthreadAttached, pthread_self)); From 5f61d84ed16b99aa9274aba49a3d674e699d4e83 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 23:09:58 +0000 Subject: [PATCH 4/4] Rename .NET Synch Mgr -> .NET Sync Mgr in synchmanager.cpp Co-authored-by: danmoseley <6385855+danmoseley@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/aad0daaf-b02d-4a6f-b844-dae63308ef71 --- src/coreclr/pal/src/synchmgr/synchmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/pal/src/synchmgr/synchmanager.cpp b/src/coreclr/pal/src/synchmgr/synchmanager.cpp index f5ba78f9417c08..5745b99298bad6 100644 --- a/src/coreclr/pal/src/synchmgr/synchmanager.cpp +++ b/src/coreclr/pal/src/synchmgr/synchmanager.cpp @@ -1160,7 +1160,7 @@ namespace CorUnix reinterpret_cast(pArg); CPalThread * pthrWorker = InternalGetCurrentThread(); - SetThreadDescription(PAL_GetCurrentThread(), W(".NET Synch Mgr")); + SetThreadDescription(PAL_GetCurrentThread(), W(".NET Sync Mgr")); while (!fWorkerIsDone) {