New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime: panic while panicking discards error message #52257
Comments
I don't see what the runtime can do with an example like that. It can't print the original panic value, because attempting to print it will itself panic. You seem to be suggesting that it should print it anyhow, but there is literally nothing to print. The attempt to find something to print failed. |
This seems to be asking for printing the second panic value? |
Yes, that's correct. Right now a workaround to get the second panic value printed is to do something like |
Ah, got it, thanks. Sorry for the confusion. |
No worries, it's admittedly a fairly bizarre scenario. I've updated the playground link with a hopefully clearer explanation, copied here for convenience: https://go.dev/play/p/IpGNUlM9YFP |
Change https://go.dev/cl/399874 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
#17671 fixed a hang caused by recursive panicking, but as a side effect, panic messages are now always discarded even if the recursion isn't endless. Is it feasible for the runtime to attempt to print the error even in the middle of a panic, and only stop after reaching a certain recursion depth?
Minimal example is available here: https://go.dev/play/p/IpGNUlM9YFP
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: