Skip to content

Commit

Permalink
Merge pull request #4446 from eslutsky/USHIFT-5295-strace
Browse files Browse the repository at this point in the history
USHIFT-5295: Add trace log when service terminated abruptly
  • Loading branch information
openshift-merge-bot[bot] authored Jan 22, 2025
2 parents 2adae64 + 87d62ce commit 3c91d30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/servicemanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"runtime/debug"
"syscall"
"time"

Expand Down Expand Up @@ -112,7 +113,7 @@ func (m *ServiceManager) asyncRun(ctx context.Context, service Service) (<-chan
go func() {
defer func() {
if r := recover(); r != nil {
klog.Errorf("%s panicked: %s", service.Name(), r)
klog.Errorf("%s panicked: %s trace: %s.", service.Name(), r, debug.Stack())
klog.Error("Stopping MicroShift")
if err := syscall.Kill(syscall.Getpid(), syscall.SIGTERM); err != nil {
klog.Warningf("error killing process: %v", err)
Expand Down

0 comments on commit 3c91d30

Please sign in to comment.