[PR #2120] RT-HANG-DUMP-THREAD-STACKS: port the LEONIDA_HANG_DUMP thread-stack-dump knob to main #2124

Open
opened 2026-11-26 21:20:07 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2120
Author: @tengotengo
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: rt-hang-dump-thread-stacks


📝 Commits (1)

  • 44ca0bd Port LEONIDA_HANG_DUMP thread-stack-dump knob to main (RT-HANG-DUMP-THREAD-STACKS)

📊 Changes

1 file changed (+62 additions, -0 deletions)

View changed files

📝 runtime/shims/startup_trace.h (+62 -0)

📄 Description

Claimed in the coordination issue as: RT-HANG-DUMP-THREAD-STACKS (comment 7174559848 on #1608)

The boot prototype (a66c1422e line, public in this repo) has a LEONIDA_HANG_DUMP= env knob that dumps every thread's stack into the run. It is absent on post-#984 main: launch-3's LEONIDA_HANG_DUMP=30 was a silent no-op (grep-verified), so every defused-watchdog stall had to be diagnosed with eu-stack from the host instead.

This PR ports the minimal unit from the public boot-prototype commit d0c45aacc (code: DadaCap) into runtime/shims/startup_trace.h — a single file, +62 lines: the includes (tlhelp32.h, , ), the log_thread_stack/log_thread_stack_guarded/dump_thread_stacks/start_hang_dump block, and the one-line open() hook. Env-gated, off by default, stdlib-only. The doc-comment hunk of d0c45aacc does not apply to current main (header drift) and is dropped; the code is complete without it.

Verified: compiles clean in the cross build on current main (gta6rt + gta6rt_tls_host, RelWithDebInfo, xwin). A live run (RTX 5060 Ti / Proton 11 SLR, post-#1558/#1723 main) is starting with the knob set — I'll report the fired dump as a follow-up.

No game data. AI-assisted.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2120 **Author:** [@tengotengo](https://github.com/tengotengo) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `rt-hang-dump-thread-stacks` --- ### 📝 Commits (1) - [`44ca0bd`](https://github.com/ubiquitarianism/leonida/commit/44ca0bd57b466f26537aea7a21b46489b8cd6e8d) Port LEONIDA_HANG_DUMP thread-stack-dump knob to main (RT-HANG-DUMP-THREAD-STACKS) ### 📊 Changes **1 file changed** (+62 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/startup_trace.h` (+62 -0) </details> ### 📄 Description Claimed in the coordination issue as: RT-HANG-DUMP-THREAD-STACKS (comment 7174559848 on #1608) The boot prototype (a66c1422e line, public in this repo) has a LEONIDA_HANG_DUMP=<seconds> env knob that dumps every thread's stack <seconds> into the run. It is absent on post-#984 main: launch-3's LEONIDA_HANG_DUMP=30 was a silent no-op (grep-verified), so every defused-watchdog stall had to be diagnosed with eu-stack from the host instead. This PR ports the minimal unit from the public boot-prototype commit d0c45aacc (code: DadaCap) into runtime/shims/startup_trace.h — a single file, +62 lines: the includes (tlhelp32.h, <thread>, <vector>), the log_thread_stack/log_thread_stack_guarded/dump_thread_stacks/start_hang_dump block, and the one-line open() hook. Env-gated, off by default, stdlib-only. The doc-comment hunk of d0c45aacc does not apply to current main (header drift) and is dropped; the code is complete without it. Verified: compiles clean in the cross build on current main (gta6rt + gta6rt_tls_host, RelWithDebInfo, xwin). A live run (RTX 5060 Ti / Proton 11 SLR, post-#1558/#1723 main) is starting with the knob set — I'll report the fired dump as a follow-up. No game data. AI-assisted. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2124
No description provided.