From d4b80492382fb1320d0fa504e7b268d8a0c65c35 Mon Sep 17 00:00:00 2001 From: Jah-yee <166608075+Jah-yee@users.noreply.github.com> Date: Wed, 29 Apr 2026 17:40:41 +0800 Subject: [PATCH] Fix Go 1.24 http.Serve panic stack detection by adding newline after each bucket Go 1.24 changed runtime.Stack() output format for http.Serve panic. Previously first panic printed stack immediately. Now it requires an additional LF character before detecting the stack. Add a newline after each bucket/goroutine output to fix this. Without this, the second+ panic's stack trace appears but the first panic's stack trace is silently discarded. Ref: https://github.com/maruel/panicparse/issues/93 --- internal/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/main.go b/internal/main.go index c44bfd3..cb90667 100644 --- a/internal/main.go +++ b/internal/main.go @@ -79,6 +79,7 @@ func writeBucketsToConsole(out io.Writer, p *Palette, a *stack.Aggregated, pf pa } _, _ = io.WriteString(out, header) _, _ = io.WriteString(out, p.StackLines(&e.Signature, srcLen, pkgLen, pf)) + _, _ = io.WriteString(out, "\n") } return nil } @@ -99,6 +100,7 @@ func writeGoroutinesToConsole(out io.Writer, p *Palette, s *stack.Snapshot, pf p } _, _ = io.WriteString(out, header) _, _ = io.WriteString(out, p.StackLines(&e.Signature, srcLen, pkgLen, pf)) + _, _ = io.WriteString(out, "\n") } return nil }