Bug 1421632 - Observed a panic: "invalid memory address or nil pointer dereference" when creating ingress with malformed file
Summary: Observed a panic: "invalid memory address or nil pointer dereference" when cr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Maru Newby
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-13 10:12 UTC by Hongan Li
Modified: 2022-08-04 22:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-04-12 19:12:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Origin (Github) 12941 0 None None None 2017-02-13 18:25:34 UTC
Red Hat Product Errata RHBA-2017:0884 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 22:50:07 UTC

Description Hongan Li 2017-02-13 10:12:27 UTC
Description of problem:
Observed a panic: "invalid memory address or nil pointer dereference" when creating ingress with malformed file  

Version-Release number of selected component (if applicable):
openshift v3.5.0.19+199197c
kubernetes v1.5.2+43a9be4
etcd 3.1.0

router image: ose-haproxy-router  v3.5.0.19    525568cc07b5

How reproducible:
always

Steps to Reproduce:
1. enable ingress
# oc env dc/router ROUTER_ENABLE_INGRESS=true
2. create ingress from malformed file (host without http section) :
# oc create -f error-ingress.yaml -n u2p2
ingress "test" created
# cat error-ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test
spec:
  rules:
  - host: foo.bar.com


Actual results:
The ingress is created but error logs in haproxy router pod:
E0213 09:48:24.357266       1 runtime.go:64] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/builddir/build/BUILD/atomic-openshift-git-0.199197c/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/util/runtime/runtime.go:70
/builddir/build/BUILD/atomic-openshift-git-0.199197c/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/util/runtime/runtime.go:63
/builddir/build/BUILD/atomic-openshift-git-0.199197c/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/util/runtime/runtime.go:49
/usr/lib/golang/src/runtime/asm_amd64.s:479
/usr/lib/golang/src/runtime/panic.go:458
/usr/lib/golang/src/runtime/panic.go:62
/usr/lib/golang/src/runtime/sigpanic_unix.go:24
/builddir/build/BUILD/atomic-openshift-git-0.199197c/_output/local/go/src/github.com/openshift/origin/pkg/router/controller/ingress.go:443
/builddir/build/BUILD/atomic-openshift-git-0.199197c/_output/local/go/src/github.com/openshift/origin/pkg/router/controller/ingress.go:244
/builddir/build/BUILD/atomic-openshift-git-0.199197c/_output/local/go/src/github.com/openshift/origin/pkg/router/controller/ingress.go:209
/builddir/build/BUILD/atomic-openshift-git-0.199197c/_output/local/go/src/github.com/openshift/origin/pkg/router/controller/ingress.go:129
/builddir/build/BUILD/atomic-openshift-git-0.199197c/_output/local/go/src/github.com/openshift/origin/pkg/router/controller/controller.go:239
/builddir/build/BUILD/atomic-openshift-git-0.199197c/_output/local/go/src/github.com/openshift/origin/pkg/router/controller/controller.go:81
/builddir/build/BUILD/atomic-openshift-git-0.199197c/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go:96
/builddir/build/BUILD/atomic-openshift-git-0.199197c/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go:97
/builddir/build/BUILD/atomic-openshift-git-0.199197c/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go:52
/builddir/build/BUILD/atomic-openshift-git-0.199197c/_output/local/go/src/github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/util/wait/wait.go:43
/usr/lib/golang/src/runtime/asm_amd64.s:2086

Expected results:
should not show panic error

Additional info:
the ingress is created and you can get ingress:
[root@host-8-175-173 ~]# oc get ingress -n u2p2 -o yaml
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    creationTimestamp: 2017-02-13T09:48:24Z
    generation: 1
    name: test
    namespace: u2p2
    resourceVersion: "8502"
    selfLink: /apis/extensions/v1beta1/namespaces/u2p2/ingresses/test
    uid: 8fbfb046-f1d1-11e6-926a-fa163e172ae0
  spec:
    rules:
    - host: foo.bar.com
  status:
    loadBalancer: {}
kind: List
metadata: {}
resourceVersion: ""
selfLink: ""
[root@host-8-175-173 ~]#

Comment 1 Maru Newby 2017-02-13 18:25:35 UTC
Fixed in linked github PR.

Comment 2 Troy Dawson 2017-02-16 20:31:46 UTC
This has been merged into ocp and is in OCP v3.5.0.21 or newer.

Comment 4 Hongan Li 2017-02-17 09:08:06 UTC
verified in OCP openshift v3.5.0.26-1+da1be19 and issue has been fixed.
there is no panic error log in router pod.

Comment 6 errata-xmlrpc 2017-04-12 19:12:31 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-2017:0884


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