Skip to content

Commit b702ba9

Browse files
committed
libcontainerd: Add debug before restarting containerd
Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com>
1 parent 2d9f20f commit b702ba9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

libcontainerd/remote_unix.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ func (r *remote) handleConnectionChange() {
165165
if transientFailureCount >= maxConnectionRetryCount {
166166
transientFailureCount = 0
167167
if utils.IsProcessAlive(r.daemonPid) {
168+
logrus.Infof("killing and restarting containerd")
169+
// Try to get a stack trace
170+
syscall.Kill(r.daemonPid, syscall.SIGUSR1)
171+
<-time.After(100 * time.Millisecond)
168172
utils.KillProcess(r.daemonPid)
169173
}
170174
<-r.daemonWaitCh

0 commit comments

Comments
 (0)