Bug 1309805 - get panic: runtime error: invalid memory address or nil pointer dereference when running oc new-app --search eap
Summary: get panic: runtime error: invalid memory address or nil pointer dereference w...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ben Parees
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-18 18:18 UTC by Peter Ruan
Modified: 2016-05-12 17:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 17:10:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
with --loglevel=5 (17.01 KB, text/plain)
2016-02-18 19:43 UTC, Peter Ruan
no flags Details
new oc dump (7.89 KB, text/plain)
2016-02-19 18:47 UTC, Peter Ruan
no flags Details

Description Peter Ruan 2016-02-18 18:18:01 UTC
Description of problem:

get panic: runtime error: invalid memory address or nil pointer dereference when running oc new-app --search eap

Version-Release number of selected component (if applicable):
latest official release
oc v1.1.3
kubernetes v1.2.0-origin


How reproducible:
Always.

Steps to Reproduce:
1. oc new-project <project_name>
2. oc new-app --search eap
3.

Actual results:
oc new-app --search eap --config=/Users/pruan/workdir/dhcp-16-138-pruan/ose_pruan1.kubeconfig
      panic: runtime error: invalid memory address or nil pointer dereference
      [signal 0xb code=0x1 addr=0x0 pc=0x740e74]

      goroutine 1 [running]:
      github.com/fsouza/go-dockerclient.(*Client).do(0x0, 0x1664c70, 0x3, 0x169e990, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
      	/go/src/github.com/openshift/origin/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/client.go:388 +0x634
      github.com/fsouza/go-dockerclient.(*Client).ListImages(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
      	/go/src/github.com/openshift/origin/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/image.go:101 +0x15e
      github.com/openshift/origin/pkg/generate/app.DockerClientSearcher.Search(0x26436e0, 0x0, 0x2643710, 0xc208554870, 0x0, 0xc20893dd00, 0xc208556470, 0x1, 0x1, 0x0, ...)
      	/go/src/github.com/openshift/origin/pkg/generate/app/dockerimagelookup.go:90 +0xf11
      github.com/openshift/origin/pkg/generate/app.(*DockerClientSearcher).Search(0xc2085548a0, 0xc20860a500, 0xc208556470, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
      	<autogenerated>:54 +0x128
      github.com/openshift/origin/pkg/generate/app.MultiWeightedSearcher.Search(0xc20854c420, 0x3, 0x4, 0x0, 0xc208556470, 0x1, 0x1, 0x0, 0x0, 0x0, ...)
      	/go/src/github.com/openshift/origin/pkg/generate/app/componentresolvers.go:231 +0x1b8
      github.com/openshift/origin/pkg/generate/app.(*MultiWeightedSearcher).Search(0xc2085645e0, 0x7fff5fbfed00, 0xc208556470, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
      	<autogenerated>:51 +0x11d
      github.com/openshift/origin/pkg/generate/app.(*ComponentInput).Search(0xc2084a8000, 0x0, 0x0)
      	/go/src/github.com/openshift/origin/pkg/generate/app/componentref.go:317 +0x1b2
      github.com/openshift/origin/pkg/generate/app/cmd.Search(0xc208556460, 0x1, 0x1, 0x0, 0x0)
      	/go/src/github.com/openshift/origin/pkg/generate/app/cmd/newapp.go:488 +0x100
      github.com/openshift/origin/pkg/generate/app/cmd.(*AppConfig).RunQuery(0xc208236f00, 0x262e250, 0x0, 0x0)
      	/go/src/github.com/openshift/origin/pkg/generate/app/cmd/newapp.go:883 +0x993
      github.com/openshift/origin/pkg/cmd/cli/cmd.RunNewApplication(0x7fff5fbfed10, 0x2, 0xc208233f20, 0x262e250, 0xc208036008, 0xc208241c00, 0xc208464e40, 0x1, 0x3, 0xc208236f00, ...)
      	/go/src/github.com/openshift/origin/pkg/cmd/cli/cmd/newapp.go:189 +0x19b
      github.com/openshift/origin/pkg/cmd/cli/cmd.func·013(0xc208241c00, 0xc208464e40, 0x1, 0x3)
      	/go/src/github.com/openshift/origin/pkg/cmd/cli/cmd/newapp.go:138 +0x1de
      github.com/spf13/cobra.(*Command).execute(0xc208241c00, 0xc208464db0, 0x3, 0x3, 0x0, 0x0)
      	/go/src/github.com/openshift/origin/Godeps/_workspace/src/github.com/spf13/cobra/command.go:572 +0x82f
      github.com/spf13/cobra.(*Command).ExecuteC(0xc208241200, 0xc208241c00, 0x0, 0x0)
      	/go/src/github.com/openshift/origin/Godeps/_workspace/src/github.com/spf13/cobra/command.go:662 +0x4db
      github.com/spf13/cobra.(*Command).Execute(0xc208241200, 0x0, 0x0)
      	/go/src/github.com/openshift/origin/Godeps/_workspace/src/github.com/spf13/cobra/command.go:618 +0x3a
      main.main()
      	/go/src/github.com/openshift/origin/cmd/oc/oc.go:27 +0x175

      goroutine 5 [chan receive]:
      github.com/golang/glog.(*loggingT).flushDaemon(0x22b3f80)
      	/go/src/github.com/openshift/origin/Godeps/_workspace/src/github.com/golang/glog/glog.go:879 +0x78
      created by github.com/golang/glog.init·1
      	/go/src/github.com/openshift/origin/Godeps/_workspace/src/github.com/golang/glog/glog.go:410 +0x2a7

      goroutine 15 [syscall]:
      os/signal.loop()
      	/usr/lib/golang/src/os/signal/signal_unix.go:21 +0x1f
      created by os/signal.init·1
      	/usr/lib/golang/src/os/signal/signal_unix.go:27 +0x35

      goroutine 33 [IO wait]:
      net.(*pollDesc).Wait(0xc2084b47d0, 0x72, 0x0, 0x0)
      	/usr/lib/golang/src/net/fd_poll_runtime.go:84 +0x47
      net.(*pollDesc).WaitRead(0xc2084b47d0, 0x0, 0x0)
      	/usr/lib/golang/src/net/fd_poll_runtime.go:89 +0x43
      net.(*netFD).Read(0xc2084b4770, 0xc20837e000, 0x8000, 0x8000, 0x0, 0x262e360, 0xc2084af2e8)
      	/usr/lib/golang/src/net/fd_unix.go:242 +0x40f
      net.(*conn).Read(0xc208037058, 0xc20837e000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
      	/usr/lib/golang/src/net/net.go:121 +0xdc
      crypto/tls.(*block).readFromUntil(0xc2084b0a20, 0x2640c50, 0xc208037058, 0x5, 0x0, 0x0)
      	/usr/lib/golang/src/crypto/tls/conn.go:454 +0xe6
      crypto/tls.(*Conn).readRecord(0xc20849e2c0, 0x17, 0x0, 0x0)
      	/usr/lib/golang/src/crypto/tls/conn.go:539 +0x2da
      crypto/tls.(*Conn).Read(0xc20849e2c0, 0xc2084cc000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
      	/usr/lib/golang/src/crypto/tls/conn.go:904 +0x166
      net/http.noteEOFReader.Read(0x2641008, 0xc20849e2c0, 0xc2082fd028, 0xc2084cc000, 0x1000, 0x1000, 0x11fe600, 0x0, 0x0)
      	/usr/lib/golang/src/net/http/transport.go:1270 +0x6e
      net/http.(*noteEOFReader).Read(0xc2084b79c0, 0xc2084cc000, 0x1000, 0x1000, 0xc208012000, 0x0, 0x0)
      	<autogenerated>:125 +0xd4
      bufio.(*Reader).fill(0xc2084a1800)
      	/usr/lib/golang/src/bufio/bufio.go:97 +0x1ce
      bufio.(*Reader).Peek(0xc2084a1800, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
      	/usr/lib/golang/src/bufio/bufio.go:132 +0xf0
      net/http.(*persistConn).readLoop(0xc2082fcfd0)
      	/usr/lib/golang/src/net/http/transport.go:842 +0xa4
      created by net/http.(*Transport).dialConn
      	/usr/lib/golang/src/net/http/transport.go:660 +0xc9f

      goroutine 34 [select]:
      net/http.(*persistConn).writeLoop(0xc2082fcfd0)
      	/usr/lib/golang/src/net/http/transport.go:945 +0x41d
      created by net/http.(*Transport).dialConn
      	/usr/lib/golang/src/net/http/transport.go:661 +0xcbc

      goroutine 68 [sleep]:
      net.func·019()
      	/usr/lib/golang/src/net/dnsclient_unix.go:240 +0x5a
      created by net.loadConfig
      	/usr/lib/golang/src/net/dnsclient_unix.go:269 +0x20c

      goroutine 77 [runnable]:
      net/http.(*persistConn).writeLoop(0xc20822f6b0)
      	/usr/lib/golang/src/net/http/transport.go:945 +0x41d
      created by net/http.(*Transport).dialConn
      	/usr/lib/golang/src/net/http/transport.go:661 +0xcbc

      goroutine 99 [IO wait]:
      net.(*pollDesc).Wait(0xc2083ad170, 0x72, 0x0, 0x0)
      	/usr/lib/golang/src/net/fd_poll_runtime.go:84 +0x47
      net.(*pollDesc).WaitRead(0xc2083ad170, 0x0, 0x0)
      	/usr/lib/golang/src/net/fd_poll_runtime.go:89 +0x43
      net.(*netFD).Read(0xc2083ad110, 0xc208b03800, 0x800, 0x800, 0x0, 0x262e360, 0xc208af00c8)
      	/usr/lib/golang/src/net/fd_unix.go:242 +0x40f
      net.(*conn).Read(0xc2085041a8, 0xc208b03800, 0x800, 0x800, 0x0, 0x0, 0x0)
      	/usr/lib/golang/src/net/net.go:121 +0xdc
      crypto/tls.(*block).readFromUntil(0xc208b12b40, 0x2640c50, 0xc2085041a8, 0x5, 0x0, 0x0)
      	/usr/lib/golang/src/crypto/tls/conn.go:454 +0xe6
      crypto/tls.(*Conn).readRecord(0xc20849edc0, 0x17, 0x0, 0x0)
      	/usr/lib/golang/src/crypto/tls/conn.go:539 +0x2da
      crypto/tls.(*Conn).Read(0xc20849edc0, 0xc208b1c000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
      	/usr/lib/golang/src/crypto/tls/conn.go:904 +0x166
      net/http.noteEOFReader.Read(0x2641008, 0xc20849edc0, 0xc20822fa78, 0xc208b1c000, 0x1000, 0x1000, 0x11fe600, 0x0, 0x0)
      	/usr/lib/golang/src/net/http/transport.go:1270 +0x6e
      net/http.(*noteEOFReader).Read(0xc20842cc00, 0xc208b1c000, 0x1000, 0x1000, 0xc2081e8900, 0x0, 0x0)
      	<autogenerated>:125 +0xd4
      bufio.(*Reader).fill(0xc2081f81e0)
      	/usr/lib/golang/src/bufio/bufio.go:97 +0x1ce
      bufio.(*Reader).Peek(0xc2081f81e0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
      	/usr/lib/golang/src/bufio/bufio.go:132 +0xf0
      net/http.(*persistConn).readLoop(0xc20822fa20)
      	/usr/lib/golang/src/net/http/transport.go:842 +0xa4
      created by net/http.(*Transport).dialConn
      	/usr/lib/golang/src/net/http/transport.go:660 +0xc9f

      goroutine 100 [select]:
      net/http.(*persistConn).writeLoop(0xc20822fa20)
      	/usr/lib/golang/src/net/http/transport.go:945 +0x41d
      created by net/http.(*Transport).dialConn
      	/usr/lib/golang/src/net/http/transport.go:661 +0xcbc


Expected results:


Additional info:

Comment 1 Ben Parees 2016-02-18 19:11:45 UTC
if/when you recreate this, please include --loglevel=5

Comment 2 Peter Ruan 2016-02-18 19:43:43 UTC
Created attachment 1128299 [details]
with --loglevel=5

Comment 3 Ben Parees 2016-02-18 22:24:39 UTC
https://github.com/openshift/origin/pull/7433

Comment 4 Peter Ruan 2016-02-19 18:47:14 UTC
Created attachment 1128638 [details]
new oc dump

Comment 5 Peter Ruan 2016-02-19 18:48:40 UTC
still failed with oc from devenv-rhel7_3477

md5sum /usr/local/bin/oc                                       
1ccb39b019ceceb307d4afb99ab0c9b6  /usr/local/bin/oc

(See latestest attachment)

Comment 6 Ben Parees 2016-02-19 19:29:44 UTC
please provide your oc version, it's more helpful than the md5sum.

Comment 7 Peter Ruan 2016-02-19 19:31:49 UTC
openshift-origin-client-tools-v1.1.3-cffae05-mac

Comment 8 Ben Parees 2016-02-19 19:40:10 UTC
your build, from this commit(cffae05):
commit cffae0523cfa80ddf917aba69f08508b91f603d5
Merge: f12d468 1cad791
Author: OpenShift Bot <dmcphers+openshiftbot>
Date:   Wed Feb 17 12:48:10 2016 -0500

pre-dates when the fix went in:

commit 025e613c106553b1cf22ae5cf8a697a9a752b11d
Author: Ben Parees <bparees>
Date:   Thu Feb 18 15:38:14 2016 -0500

    properly check for nil docker client value


you need a newer oc client build.

Comment 9 Peter Ruan 2016-02-19 19:54:08 UTC
Interesting.... from github...it looks like your PR was injected into devenv-rhel7_3466

(https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/1348/) (Image: devenv-rhel7_3466)

Since I got this zip file from devenv-rhel7_3477, shouldn't it already have that version of the oc?

Comment 10 Peter Ruan 2016-02-19 19:56:55 UTC
oc v1.1.3-91-gc040447
kubernetes v1.2.0-alpha.7-703-gbc4550d


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