-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add support for writing stacks with SIGUSR1 #1835
Conversation
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mrunalp The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all |
/test kata-containers |
/test e2e_rhel |
/test kata-containers |
Kata still complaining :( @sboeuf |
cmd/crio/main.go
Outdated
go func() { | ||
for s := range sig { | ||
switch s { | ||
case syscall.SIGUSR1: | ||
logrus.Debugf("Caught SIGUSR1") | ||
if err := utils.WriteGoroutineStacks(os.Stderr); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, hold on, let's do what docker does, I remember logging to stderr was a pain because of journald stripping stuff, and that got changed to log to a file eventually.
It's actually super easy and we can use:
https://github.com/moby/moby/blob/8e610b2b55bfd1bfa9436ab110d311f5e8a74dcb/pkg/signal/trap.go#L61
https://github.com/moby/moby/blob/8e610b2b55bfd1bfa9436ab110d311f5e8a74dcb/daemon/debugtrap_unix.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's log to file instead of stderr
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
@runcom Updated. |
/test all |
/test kata-containers |
@sboeuf okay, thanks for the info! |
/test kata-containers |
1 similar comment
/test kata-containers |
/lgtm |
@runcom @umohnani8 @rhatdan PTAL