Description of problem: On turning debugging on/off, openshift-tuned panics due to double-closing a channel on a return from a method. Version-Release number of selected component (if applicable): Recent 4.7 nightlies. How reproducible: Always Steps to Reproduce: 1. Turn on/off debugging for the Tuned daemon, e.g.: apiVersion: tuned.openshift.io/v1 kind: Tuned metadata: name: openshift-scheduler namespace: openshift-cluster-node-tuning-operator spec: profile: - data: | [main] summary=Test the [scheduler] plugin CPU usage include=openshift-node [scheduler] # runtime=0 group.ksoftirqd=0:f:11:*:ksoftirqd.* group.rcuc=0:f:11:*:rcuc.* name: openshift-scheduler recommend: - match: - label: kubernetes.io/os value: linux priority: 20 profile: openshift-scheduler operand: debug: true Actual results: I0126 09:11:21.603602 106702 tuned.go:947] Tuned process exitted... I0126 09:11:21.603670 106702 tuned.go:385] starting tuned... panic: runtime error: invalid memory address or nil pointer dereference panic: close of closed channel [signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0xd166a6] goroutine 115 [running]: github.com/openshift/cluster-node-tuning-operator/pkg/tuned.(*Controller).tunedRun.func1(0xc0001b0460) /go/src/github.com/openshift/cluster-node-tuning-operator/pkg/tuned/tuned.go:388 +0x2f panic(0x1622ba0, 0x2423d90) /usr/lib/golang/src/runtime/panic.go:969 +0x1b9 os/exec.(*Cmd).StderrPipe(0x0, 0x0, 0x0, 0x0, 0x180988a) /usr/lib/golang/src/os/exec/exec.go:645 +0x26 github.com/openshift/cluster-node-tuning-operator/pkg/tuned.(*Controller).tunedRun(0xc0001b0460) /go/src/github.com/openshift/cluster-node-tuning-operator/pkg/tuned/tuned.go:391 +0xc7 created by github.com/openshift/cluster-node-tuning-operator/pkg/tuned.(*Controller).tunedReload /go/src/github.com/openshift/cluster-node-tuning-operator/pkg/tuned/tuned.go:462 +0xdc Expected results: No panic from openshift-tuned. Additional info: This bug was introduced by: https://github.com/openshift/cluster-node-tuning-operator/pull/192
Verified on 4.7.0-0.nightly-2021-01-28-081708 no panics during turn on/off debugging
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:5633