Bug 1666247 - openshift master api crashes due to SIGABRT
Summary: openshift master api crashes due to SIGABRT
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: openshift-apiserver
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.9.z
Assignee: Stefan Schimanski
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-15 10:34 UTC by ggore
Modified: 2022-03-13 16:45 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-20 18:58:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3874751 0 None None None 2019-01-30 17:50:56 UTC

Description ggore 2019-01-15 10:34:03 UTC
Description of problem:
openshift master api crashes due to SIGABRT


Version-Release number of selected component (if applicable):
atomic-openshift-master-3.9.30-1.git.0.dec1ba7.el7

Comment 5 Robert Bost 2019-01-25 20:33:23 UTC
I think the fix is here: https://github.com/openshift/origin/commit/90cd6c37622a97aaa00f9244a834cdd8646b55f8, included in v3.10 and later.

@mfojtik, Can this be backported? Looks fairly simple. 
@ggore, Can the customer go and check their git repository history (`git log` in the feature/DDJ-2654-connect-bitbucket-webhook-to-openshift branch).

Analysis
========

Here's the failing line:

  https://github.com/openshift/origin/blob/71543b2d15e53f4ae56272988a6604bf2f790dfd/pkg/build/webhook/bitbucket/bitbucket.go#L158
  lastCommit := event.Push.Changes[0].Commits[0]

In the coredump, I can see that Commits is empty so trying to access [0] is going to cause the `index out of range' seen in logging:

(dlv) frame 8
(dlv) locals
data.len = 773
data.cap = 1536
author.Name.len = 85442752
revision = (*github.com/openshift/origin/pkg/build/apis/build.SourceRevision)(0xc42c162a20)
data.ptr = (*uint8)(0xc42aa7c600)
author.Name.ptr = (*uint8)(0xb)
event = github.com/openshift/origin/pkg/build/webhook/bitbucket.pushEvent {Push: (*github.com/openshift/origin/pkg/build/webhook/bitbucket.push)(0xc437162700)}
lastCommit = github.com/openshift/origin/pkg/build/webhook/bitbucket.commit {Hash: (unreadable could not read string at 0x9 due to EOF), Message: "H�D$\x18H�L$ H�D$@H�L$HH�l$(H��0���XF��������������dH�\f%����H�D$�H;...+842553239970 more", Author: (*github.com/openshift/origin/pkg/build/webhook/bitbucket.user)(0xc43a3bf8c8)}
(dlv) print event.Push.Changes[0]
github.com/openshift/origin/pkg/build/webhook/bitbucket.change {
	Commits: []github.com/openshift/origin/pkg/build/webhook/bitbucket.commit len: 0, cap: 0, nil,    <------- LEN IS ZERO
	Old: github.com/openshift/origin/pkg/build/webhook/bitbucket.info {
		Type: "branch",
		Name: "feature/DDJ-2654-connect-bitbucket-webhook-to-openshift",},}
(dlv) print event.Push.Changes[0].Commits[0]
Command failed: can not index "event.Push.Changes[0].Commits"

Comment 8 Stephen Cuppett 2019-11-20 18:58:47 UTC
OCP 3.6-3.10 is no longer on full support [1]. Marking CLOSED DEFERRED. If you have a customer case with a support exception or have reproduced on 3.11+, please reopen and include those details. When reopening, please set the Target Release to the appropriate version where needed.

[1]: https://access.redhat.com/support/policy/updates/openshift


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