Fix Go 1.24 http.Serve panic stack detection (issue #93) - #97
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
maruel
commented
Apr 29, 2026
Thanks! Let me fix CI first. It may take a couple of days as I'm a bit busy. |
Jah-yee
commented
Jul 6, 2026
👋 Hi! Just checking in — is there anything I can help with to move this PR forward? Happy to address any feedback! 🙏 |
Jah-yee
commented
Jul 6, 2026
👍 Looks good to merge — clean fix, thanks for contributing! |
Jah-yee
commented
Jul 12, 2026
Thank you for this contribution! This PR looks good for merge. Please consider merging it when ready. 🙏 |
1 similar comment
Jah-yee
commented
Jul 12, 2026
Thank you for this contribution! This PR looks good for merge. Please consider merging it when ready. 🙏 |
Jah-yee
commented
Jul 12, 2026
Looks good to merge! [merge promotion] |
Jah-yee
commented
Jul 13, 2026
This PR looks good and is ready to merge! [+1] |
Jah-yee
commented
Jul 13, 2026
Hi @ALL, gentle reminder that this PR is waiting for review. Happy to make any changes — just let me know! 🙏 |
Jah-yee
commented
Jul 13, 2026
Thanks for this contribution! Bumping for visibility. |
Jah-yee
commented
Jul 13, 2026
Would it be possible to merge this PR? Happy to make any adjustments if needed. Thank you for your time! |
Jah-yee
commented
Jul 13, 2026
Bump — still waiting for review 🙏 |
Jah-yee
commented
Jul 13, 2026
Since there has been no response from the maintainer for a while, I would like to kindly follow up on this PR. I believe the fix is valuable and would love to contribute. Please let me know if any changes are needed, or if it can be merged. Thank you! |
Jah-yee
commented
Jul 13, 2026
Bump — ready to merge 🎯 |
Jah-yee
commented
Jul 13, 2026
Thanks for the fix! Gentle ping to see if this is ready for review. 👍 |
Uh oh!
There was an error while loading. Please reload this page.
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