Include panic message in log

PiperOrigin-RevId: 315745386
This commit is contained in:
Michael Pratt
2020-06-10 12:38:20 -07:00
committed by gVisor bot
parent 6d43ac9574
commit fadbfd83d9
+2 -2
View File
@@ -482,10 +482,10 @@ func (cs *connState) handle(m message) (r message) {
defer func() {
if r == nil {
// Don't allow a panic to propagate.
recover()
err := recover()
// Include a useful log message.
log.Warningf("panic in handler: %s", debug.Stack())
log.Warningf("panic in handler: %v\n%s", err, debug.Stack())
// Wrap in an EFAULT error; we don't really have a
// better way to describe this kind of error. It will