Quanlong Huang created IMPALA-13570: ---------------------------------------
Summary: Thread names not shown in top outputs Key: IMPALA-13570 URL: https://issues.apache.org/jira/browse/IMPALA-13570 Project: IMPALA Issue Type: Bug Components: Backend Reporter: Quanlong Huang We set the thread name when launching fragment instance threads. It contains the fragment instance id: {code:cpp} string thread_name = Substitute("$0 (finst:$1)", FragmentInstanceState::FINST_THREAD_NAME_PREFIX, PrintId(instance_ctx->fragment_instance_id)); unique_ptr<Thread> t; // Inject thread creation failures through debug actions if enabled. Status debug_action_status = DebugAction(query_options(), "FIS_FAIL_THREAD_CREATION"); start_finstances_status = !debug_action_status.ok() ? debug_action_status : Thread::Create(FragmentInstanceState::FINST_THREAD_GROUP_NAME, thread_name, [this, fis]() { this->ExecFInstance(fis); }, &t, true); {code} [https://github.com/apache/impala/blob/e5919f13f93ae6e5cfa9fb01219bddb84c9cc474/be/src/runtime/query-state.cc#L907-L918] However, in the top output, thread names are still shown as "impalad". When debugging in gdb, I also see the thread names are just "impalad". {noformat} PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 609 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:02.57 impalad 625 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.52 impalad 626 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 impalad 627 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 impalad 628 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 impalad 652 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.04 GC task thread# 653 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.04 GC task thread# 654 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.04 GC task thread# 655 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.04 GC task thread# 656 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.03 GC task thread# 657 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.04 GC task thread# 658 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.04 GC task thread# 659 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.04 GC task thread# 660 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.03 GC task thread# 661 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.04 GC task thread# 662 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.05 VM Thread 663 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 Reference Handl 664 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 Finalizer 665 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 Signal Dispatch 666 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 JDWP Transport 667 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 JDWP Event Help 668 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:01.59 C2 CompilerThre 669 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:01.51 C2 CompilerThre 670 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:01.10 C2 CompilerThre 671 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.71 C1 CompilerThre 672 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 Service Thread 673 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.02 VM Periodic Tas 680 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 org.apache.hado 682 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 client DomainSo 683 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 JVM pause monit 684 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 Transaction kee 686 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 Transaction kee 687 quanlong 20 0 11.914g 602804 165800 t 0.0 1.8 0:00.00 impalad{noformat} JVM thread names are shown correctly in top and gdb. It'd be nice to fix the thread names of fragment instance threads. So in the top output, we can directly see which fragment instance or query is occupying cpu/mem. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org For additional commands, e-mail: issues-all-h...@impala.apache.org