Skip to content

Fix Go 1.24 http.Serve panic stack detection (issue #93)#97

Open
Jah-yee wants to merge 1 commit intomaruel:mainfrom
Jah-yee:panicparse-fix-93
Open

Fix Go 1.24 http.Serve panic stack detection (issue #93)#97
Jah-yee wants to merge 1 commit intomaruel:mainfrom
Jah-yee:panicparse-fix-93

Conversation

@Jah-yee
Copy link
Copy Markdown

@Jah-yee Jah-yee commented Apr 29, 2026

Summary

Go 1.24 changed the output format of runtime.Stack() for http.Serve panics. Previously the first panic printed its stack trace immediately, but now it requires an additional LF character before the stack is detected. This causes the first panic's stack trace to be silently discarded.

Fix

Add a newline after each bucket/goroutine output in writeBucketsToConsole() and writeGoroutinesToConsole(). This ensures that even when http.Serve panics sequentially, the parser receives the necessary line delimiter to properly detect and parse each stack trace.

Ref

…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: maruel#93
@maruel
Copy link
Copy Markdown
Owner

maruel commented Apr 29, 2026

Thanks! Let me fix CI first. It may take a couple of days as I'm a bit busy.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants