From ff957c21fc3bf25bdf9db19cfcb0c7144eececb8 Mon Sep 17 00:00:00 2001 From: James Dansereau <106631954+jkdansereau@users.noreply.github.com> Date: Thu, 3 Sep 2026 00:00:07 -0400 Subject: [PATCH] linux: quiet the false-positive kernel heartbeat watchdog portHeartbeatCheck fired on any >3s frame gap and re-fired every 2s, spamming ge007.crash.log with thread dumps during gdb pauses, level loads, and SIGTERM teardown on a slow/software-GL setup. Widen to 8s and stop after 3 reports. A genuine hang is permanent so it still gets caught. --- port/src/libultra.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/port/src/libultra.c b/port/src/libultra.c index b8ce0fd5..d4fe542f 100644 --- a/port/src/libultra.c +++ b/port/src/libultra.c @@ -173,8 +173,14 @@ static uint64_t portNextTimerUs(void); static void portHeartbeatCheck(void) { + /* A real hang is a permanent stall; transient >3 s gaps are normal on a + * slow/software-GL/debugger setup (level loads, gdb pauses, SIGTERM + * teardown) and were spamming ge007.crash.log with dozens of thread + * dumps. Use a longer window and stop after a few reports. */ + static int fired = 0; uint64_t now = sysGetMicroseconds(); - if (now - g_lastFrameUs > 3000000 && now - g_lastHeartbeatUs > 2000000) { + if (fired < 3 && now - g_lastFrameUs > 8000000 && now - g_lastHeartbeatUs > 5000000) { + fired++; g_lastHeartbeatUs = now; sysLogPrintf(LOG_ERROR, "kernel heartbeat: no frame rendered for %llu ms (frames=%d); state:",