Bug 1920438 - openshift-tuned panics on turning debugging on/off.
Summary: openshift-tuned panics on turning debugging on/off.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node Tuning Operator
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.7.0
Assignee: Jiří Mencák
QA Contact: Simon
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-26 10:39 UTC by Jiří Mencák
Modified: 2021-02-24 15:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:56:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-node-tuning-operator pull 195 0 None open Bug 1920438: Fix openshift-tuned panic on turning debugging on/off. 2021-01-26 10:41:02 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:56:27 UTC

Description Jiří Mencák 2021-01-26 10:39:53 UTC
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

Comment 3 Simon 2021-01-28 20:49:00 UTC
Verified on 4.7.0-0.nightly-2021-01-28-081708
no panics during turn on/off debugging

Comment 6 errata-xmlrpc 2021-02-24 15:56:03 UTC
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


Note You need to log in before you can comment on or make changes to this bug.