Bug 1577334

Summary: oc run panic: .../vendor/k8s.io/kubernetes/pkg/kubectl/cmd.RunRun
Product: OpenShift Container Platform Reporter: Chris Evich <cevich>
Component: NodeAssignee: Seth Jennings <sjenning>
Status: CLOSED ERRATA QA Contact: Xingxing Xia <xxia>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.10.0CC: aos-bugs, jokerman, mmccomas, wmeng
Target Milestone: ---   
Target Release: 3.10.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:15:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Evich 2018-05-11 18:19:12 UTC
Description of problem:
While testing OpenShift + CRI-O, I ran an oc command and it segfaulted.

Version-Release number of selected component (if applicable):
atomic-openshift-3.10.0-0.39.0.git.0.c9a44ae.el7.x86_64
atomic-openshift-clients-3.10.0-0.39.0.git.0.c9a44ae.el7.x86_64
cri-o-1.10.1-2.git728df92.el7.x86_64

How reproducible:
Often/Every time

Steps to Reproduce:
1. Install OpenShift 3.10
2. ssh into master
3. Execute: oc run true --stdin --rm --restart=Never --image=tianon/true

Actual results:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x1850a66]

goroutine 1 [running]:
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/cmd.RunRun(0x44abc20, 0xc420889560, 0xc4203eb240, 0x44683a0, 0xc42000e010, 0x44683e0, 0xc42000e018, 0x44683e0, 0xc42000e020, 0xc420b25180, ...)
	/builddir/build/BUILD/atomic-openshift-git-0.c9a44ae/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/run.go:345 +0x10f6
github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/cmd.NewCmdRunWithOptions.func1(0xc420b25180, 0xc420fd3040, 0x1, 0x5)
	/builddir/build/BUILD/atomic-openshift-git-0.c9a44ae/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/run.go:114 +0x163
github.com/openshift/origin/vendor/github.com/spf13/cobra.(*Command).execute(0xc420b25180, 0xc420fd2ff0, 0x5, 0x5, 0xc420b25180, 0xc420fd2ff0)
	/builddir/build/BUILD/atomic-openshift-git-0.c9a44ae/_output/local/go/src/github.com/openshift/origin/vendor/github.com/spf13/cobra/command.go:757 +0x2c1
github.com/openshift/origin/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc420506780, 0xc42000e020, 0xc420506780, 0xc42024b110)
	/builddir/build/BUILD/atomic-openshift-git-0.c9a44ae/_output/local/go/src/github.com/openshift/origin/vendor/github.com/spf13/cobra/command.go:843 +0x334
github.com/openshift/origin/vendor/github.com/spf13/cobra.(*Command).Execute(0xc420506780, 0x2, 0xc420506780)
	/builddir/build/BUILD/atomic-openshift-git-0.c9a44ae/_output/local/go/src/github.com/openshift/origin/vendor/github.com/spf13/cobra/command.go:791 +0x2b
main.main()
	/builddir/build/BUILD/atomic-openshift-git-0.c9a44ae/_output/local/go/src/github.com/openshift/origin/cmd/oc/oc.go:41 +0x293


Expected results:
exit(0)


Additional info:

Comment 5 Seth Jennings 2018-05-11 18:35:13 UTC
Fixed here upstream:
https://github.com/kubernetes/kubernetes/pull/61713

Bug introduced by PR in 1.10:
https://github.com/kubernetes/kubernetes/commit/6dfe3cb04f4230b38cd51742435cf9203253a34d

Thus GAed versions of OCP are not effected.

Origin PR:
https://github.com/openshift/origin/pull/19693

Comment 7 Xingxing Xia 2018-05-17 03:30:28 UTC
Reproduced with oc v3.10.0-0.27.0 with steps:
$ oc run --image=alpine hello -- sleep 1d
deploymentconfig "hello" created
$ oc run --image=alpine --stdin --tty --attach hello -- /bin/sh
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x17ebd26]
...

Verified with v3.10.0-0.46.0:
$ oc run --image=alpine hello -- sleep 1d
deploymentconfig "hello" created
$ oc run --image=alpine --stdin --tty --attach hello -- /bin/sh
Error from server (AlreadyExists): deploymentconfigs.apps.openshift.io "hello" already exists

Comment 9 errata-xmlrpc 2018-07-30 19:15:23 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, 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/RHBA-2018:1816