Redirect of panic (via unix.Dup2) is not working reliably #64555
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Go version
go version go1.21.4 linux/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
I found a weird bug: When executing the following program on linux with both
also-redirect-log
(log.SetOutput
) andDoT
(NewDoTResolver
), the panic is not logged to the file. It seems to work fine on darwin (see ncruces/go-dns#13).main.go:
What did you expect to see?
The panic should have been logged into /tmp/test.log:
What did you see instead?
Other combination (either only
also-redirect-log
/DoT
or none) work fine:The text was updated successfully, but these errors were encountered: