Skip to content

[GLUTEN-11677] Support get cpp stack using gdb from Spark UI#11676

Open
WangGuangxin wants to merge 3 commits intoapache:mainfrom
WangGuangxin:ui_cppstack
Open

[GLUTEN-11677] Support get cpp stack using gdb from Spark UI#11676
WangGuangxin wants to merge 3 commits intoapache:mainfrom
WangGuangxin:ui_cppstack

Conversation

@WangGuangxin
Copy link
Contributor

@WangGuangxin WangGuangxin commented Mar 2, 2026

What changes are proposed in this pull request?

In Vanilla Spark WebUI, it is easy to get the current java jstack, which is very helpful to diagnostic the hang/slow problems. But when it comes to Spark on Gluten, the jstack is meaningless since all heavy jobs are under JNI call.

This PR adds the same ability to capture native C++ stack traces from executors directly from the Gluten SQL tab in the Spark UI. It introduces an executors overview with a per‑executor "C++ Stack" action and a dedicated "Gluten C++ Stack" status page that streams the collected stack output.

image image

There are two modes, sync and async. The async mode is mainly because gdb data collection typically takes a long time, exceeding the yarn proxy timeout in our environment.

How was this patch tested?

Manually

Was this patch authored or co-authored using generative AI tooling?

Generated-by: TRAE with Doubao-Seed-Code

Related issue: #11677

@github-actions github-actions bot added CORE works for Gluten Core CLICKHOUSE labels Mar 2, 2026
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Run Gluten Clickhouse CI on x86

@WangGuangxin WangGuangxin changed the title Support get cpp stack using gdb from Spark UI [GLUTEN-11677] Support get cpp stack using gdb from Spark UI Mar 2, 2026
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Run Gluten Clickhouse CI on x86

1 similar comment
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Run Gluten Clickhouse CI on x86

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Run Gluten Clickhouse CI on x86

Copy link
Member

@zhouyuan zhouyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a great feature for debug executor hang! It's better to have a config to switch on/off for this feature?


private def ensureGdbInstalled(): Unit = {
if (!has("gdb")) {
val sudo = if (has("sudo")) "sudo " else ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In some env it may not allow to install other software

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLICKHOUSE CORE works for Gluten Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants