Fix Go 1.24 http.Serve panic stack detection (issue #93)#97
Open
Jah-yee wants to merge 1 commit intomaruel:mainfrom
Open
Fix Go 1.24 http.Serve panic stack detection (issue #93)#97Jah-yee wants to merge 1 commit intomaruel:mainfrom
Jah-yee wants to merge 1 commit intomaruel:mainfrom
Conversation
…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
Owner
|
Thanks! Let me fix CI first. It may take a couple of days as I'm a bit busy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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