Log unhandled faults only at DEBUG level.

PiperOrigin-RevId: 249561399
Change-Id: Ic73c68c8538bdca53068f38f82b7260939addac2
This commit is contained in:
Adin Scannell
2019-05-22 18:18:53 -07:00
committed by Shentubot
parent f65dfec096
commit 79738d3958
+2 -8
View File
@@ -26,7 +26,6 @@ import (
"gvisor.googlesource.com/gvisor/pkg/sentry/memmap"
"gvisor.googlesource.com/gvisor/pkg/sentry/platform"
"gvisor.googlesource.com/gvisor/pkg/sentry/usermem"
"gvisor.googlesource.com/gvisor/pkg/syserror"
)
// A taskRunState is a reified state in the task state machine. See README.md
@@ -267,13 +266,8 @@ func (*runApp) execute(t *Task) taskRunState {
}
}
// The JVM will trigger these errors constantly, so don't
// spam logs with this error.
if err == syserror.EFAULT || err == syserror.EPERM {
t.Debugf("Unhandled user fault: addr=%x ip=%x access=%v err=%v", addr, t.Arch().IP(), at, err)
} else {
t.Warningf("Unhandled user fault: addr=%x ip=%x access=%v err=%v", addr, t.Arch().IP(), at, err)
}
// Faults are common, log only at debug level.
t.Debugf("Unhandled user fault: addr=%x ip=%x access=%v err=%v", addr, t.Arch().IP(), at, err)
t.DebugDumpState()
// Continue to signal handling.