Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1725287

Summary: oc cmd segfaults when running oc adm release new
Product: OpenShift Container Platform Reporter: Chris Callegari <ccallega>
Component: Cluster Version OperatorAssignee: Abhinav Dahiya <adahiya>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Johnny Liu <jialiu>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.0CC: aos-bugs, bleanhar, jialiu, jokerman, mfojtik, mmccomas, stbenjam, yprokule
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 18:45:56 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:
Attachments:
Description Flags
oc loglevel 10 output none

Description Chris Callegari 2019-06-29 02:49:18 UTC
Description of problem:
oc cmd segfaults when running oc adm release new

Version-Release number of selected component (if applicable):
4.1.3

How reproducible:
Most of the time

Steps to Reproduce:
1. Create Docker Registry
2. Run the following command...
# oc adm release new --from-release=quay.io/openshift-release-dev/ocp-release:4.1.3 --mirror=registry.ghi789.aws.sysdeseng.com/user/openshift4 --to-image=registry.ghi789.aws.sysdeseng.com/user/openshift4:4.1.3
3.

Actual results:
# oc adm release new --from-release=quay.io/openshift-release-dev/ocp-release:4.1.3 --mirror=registry.ghi789.aws.sysdeseng.com/user/openshift4 --to-image=registry.ghi789.aws.sysdeseng.com/user/openshift4:4.1.3
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x4f9f70]

goroutine 61 [running]:
bufio.(*Reader).fill(0xc000287440)
	/opt/rh/go-toolset-1.11/root/usr/lib/go-toolset-1.11-golang/src/bufio/bufio.go:100 +0xe0
bufio.(*Reader).WriteTo(0xc000287440, 0x2fcfa80, 0xc0000c8a18, 0x7fd843487c18, 0xc000287440, 0x3007001)
	/opt/rh/go-toolset-1.11/root/usr/lib/go-toolset-1.11-golang/src/bufio/bufio.go:496 +0x10c
io.copyBuffer(0x2fcfa80, 0xc0000c8a18, 0x2fca740, 0xc000287440, 0x0, 0x0, 0x0, 0x2fc51f0, 0xc000b48740, 0xc000b48768)
	/opt/rh/go-toolset-1.11/root/usr/lib/go-toolset-1.11-golang/src/io/io.go:384 +0x352
io.Copy(0x2fcfa80, 0xc0000c8a18, 0x2fca740, 0xc000287440, 0xc000b264a0, 0xc000b487b0, 0x80a372)
	/opt/rh/go-toolset-1.11/root/usr/lib/go-toolset-1.11-golang/src/io/io.go:364 +0x5a
os/exec.(*Cmd).stdin.func1(0x2b6e558, 0x0)
	/opt/rh/go-toolset-1.11/root/usr/lib/go-toolset-1.11-golang/src/os/exec/exec.go:234 +0x55
os/exec.(*Cmd).Start.func1(0xc00053bb80, 0xc00027d040)
	/opt/rh/go-toolset-1.11/root/usr/lib/go-toolset-1.11-golang/src/os/exec/exec.go:400 +0x27
created by os/exec.(*Cmd).Start
	/opt/rh/go-toolset-1.11/root/usr/lib/go-toolset-1.11-golang/src/os/exec/exec.go:399 +0x5af


Expected results:
I expect the command to complete successfully.  I expect the command to mirror upstream to my downstream repo successfully.

Additional info:

Comment 1 Chris Callegari 2019-06-29 02:54:45 UTC
output from oc cmd with --loglevel=10 attached as oc.log

Comment 2 Chris Callegari 2019-06-29 02:55:22 UTC
Created attachment 1585758 [details]
oc loglevel 10 output

Comment 5 Scott Dodson 2019-08-19 17:50:14 UTC
Chris, what OS is this happening on?

Comment 6 Scott Dodson 2019-08-19 17:55:08 UTC
*** Bug 1725288 has been marked as a duplicate of this bug. ***

Comment 7 Chris Callegari 2019-08-19 18:44:34 UTC
RHEL 7.7

Comment 8 Stephen Benjamin 2019-09-02 13:47:02 UTC
Can you check if you have the `pigz` package installed on your EL7.7 box? 

From what I can tell, docker's image decompression code is not thread safe when `pigz` package is installed. More info here, https://github.com/openshift/oc/issues/58#issuecomment-527149146

Comment 9 Johnny Liu 2019-09-06 07:24:31 UTC
QE can not reproduce this bug, even pigz is installed.


# ./oc version
Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.3-201906191409+458fcdd-dirty", GitCommit:"458fcdd", GitTreeState:"dirty", BuildDate:"2019-06-19T18:47:30Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.7 (Maipo)

# rpm -q pigz
pigz-2.2.3-1.el7.x86_64


# ./oc adm release new --from-release=quay.io/openshift-release-dev/ocp-release:4.1.3 --mirror=internal-registry.qe.devcluster.openshift.com:5000/jialiu-bug1 --to-image=internal-registry.qe.devcluster.openshift.com:5000/jialiu-bug1:4.1.3
<--snip-->
Success
Update image:  internal-registry.qe.devcluster.openshift.com:5000/jialiu-bug1:release
Mirror prefix: internal-registry.qe.devcluster.openshift.com:5000/jialiu-bug1
info: Pushed to internal-registry.qe.devcluster.openshift.com:5000/jialiu-bug1:4.1.3
sha256:55be362e1fc75895ae13a9684001b0c51d89834758446fae4d319596c8aa2ec2 4.1.3 2019-06-21T19:58:54Z
error: the release could not be reproduced from its inputs

Comment 10 Abhinav Dahiya 2019-10-20 00:01:23 UTC
This seems to be related to https://bugzilla.redhat.com/show_bug.cgi?id=1716550, Chris can you try to see if the fix for that bug fixes this issue too?

Comment 12 Scott Dodson 2019-11-05 18:45:56 UTC
no feedback from reporter

Comment 13 Red Hat Bugzilla 2023-09-14 05:31:08 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days