mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Remove uncaught signal message
This message was supposed to help troubleshoot application that are killed inside a container. But it can be noisy and doesn't really help in most cases, e.g. it's expected in many cases that processes are killed, message refers to PIDs/TIDs which are not actionable outside the container execution. PiperOrigin-RevId: 513627281
This commit is contained in:
committed by
gVisor bot
parent
e825c7d5e0
commit
edf84e1656
@@ -186,7 +186,6 @@ func (t *Task) deliverSignal(info *linux.SignalInfo, act linux.SigAction) taskRu
|
||||
switch sigact {
|
||||
case SignalActionTerm, SignalActionCore:
|
||||
// "Default action is to terminate the process." - signal(7)
|
||||
t.Debugf("Signal %d: terminating thread group", info.Signo)
|
||||
|
||||
// Emit an event channel messages related to this uncaught signal.
|
||||
ucs := &ucspb.UncaughtSignal{
|
||||
@@ -202,6 +201,7 @@ func (t *Task) deliverSignal(info *linux.SignalInfo, act linux.SigAction) taskRu
|
||||
ucs.FaultAddr = info.Addr()
|
||||
}
|
||||
|
||||
t.Debugf("Signal %d, PID: %d, TID: %d, fault addr: %#x: terminating thread group", ucs.Pid, ucs.Tid, ucs.FaultAddr, info.Signo)
|
||||
eventchannel.Emit(ucs)
|
||||
|
||||
t.PrepareGroupExit(linux.WaitStatusTerminationSignal(sig))
|
||||
|
||||
@@ -67,7 +67,6 @@ go_library(
|
||||
"//pkg/sentry/fsimpl/user",
|
||||
"//pkg/sentry/inet",
|
||||
"//pkg/sentry/kernel",
|
||||
"//pkg/sentry/kernel:uncaught_signal_go_proto",
|
||||
"//pkg/sentry/kernel/auth",
|
||||
"//pkg/sentry/limits",
|
||||
"//pkg/sentry/loader",
|
||||
|
||||
@@ -23,7 +23,6 @@ import (
|
||||
"gvisor.dev/gvisor/pkg/eventchannel"
|
||||
"gvisor.dev/gvisor/pkg/log"
|
||||
rpb "gvisor.dev/gvisor/pkg/sentry/arch/registers_go_proto"
|
||||
ucspb "gvisor.dev/gvisor/pkg/sentry/kernel/uncaught_signal_go_proto"
|
||||
"gvisor.dev/gvisor/pkg/sentry/strace"
|
||||
spb "gvisor.dev/gvisor/pkg/sentry/unimpl/unimplemented_syscall_go_proto"
|
||||
"gvisor.dev/gvisor/pkg/sync"
|
||||
@@ -76,8 +75,6 @@ func (c *compatEmitter) Emit(msg proto.Message) (bool, error) {
|
||||
switch m := msg.(type) {
|
||||
case *spb.UnimplementedSyscall:
|
||||
c.emitUnimplementedSyscall(m)
|
||||
case *ucspb.UncaughtSignal:
|
||||
c.emitUncaughtSignal(m)
|
||||
}
|
||||
|
||||
return false, nil
|
||||
@@ -130,13 +127,6 @@ func (c *compatEmitter) emitUnimplementedSyscall(us *spb.UnimplementedSyscall) {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *compatEmitter) emitUncaughtSignal(msg *ucspb.UncaughtSignal) {
|
||||
sig := unix.Signal(msg.SignalNumber)
|
||||
c.sink.Infof(
|
||||
"Uncaught signal: %q (%d), PID: %d, TID: %d, fault addr: %#x",
|
||||
sig, msg.SignalNumber, msg.Pid, msg.Tid, msg.FaultAddr)
|
||||
}
|
||||
|
||||
// Close implements eventchannel.Emitter.
|
||||
func (c *compatEmitter) Close() error {
|
||||
c.sink = nil
|
||||
|
||||
Reference in New Issue
Block a user