-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
I just hit this while running the unit tests:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x12203be]goroutine 7626 [running]:
istio.io/istio/pilot/pkg/networking/core/v1alpha3.(*ConfigGeneratorImpl).buildGatewayListeners(0xc0016a6ec0, 0xc005f9f720, 0xc00113b200, 0xc004c0c000, 0x8, 0x1007f1b9057e300, 0x100000000000000, 0x0, 0x5e)
/home/dgrimm/dev/go/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/gateway.go:76 +0x34e
istio.io/istio/pilot/pkg/networking/core/v1alpha3.(*ConfigGeneratorImpl).BuildListeners(0xc0016a6ec0, 0xc005f9f720, 0xc00113b200, 0xc004c0c000, 0x4e6432, 0xc000947798, 0x7f1b9057e300, 0xc0009477a8, 0xc0009477b0)
/home/dgrimm/dev/go/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/listener.go:170 +0x6b
istio.io/istio/pilot/pkg/proxy/envoy/v2.(*DiscoveryServer).generateRawListeners(0xc0010d4dc0, 0xc00011a700, 0xc004c0c000, 0x40d879, 0xc000b140d0, 0x10, 0x10, 0xc00aeef680)
/home/dgrimm/dev/go/src/istio.io/istio/pilot/pkg/proxy/envoy/v2/lds.go:51 +0x72
istio.io/istio/pilot/pkg/proxy/envoy/v2.(*DiscoveryServer).pushLds(0xc0010d4dc0, 0xc00011a700, 0xc004c0c000, 0xc0012bc240, 0x1c, 0x2, 0xc008784a80)
/home/dgrimm/dev/go/src/istio.io/istio/pilot/pkg/proxy/envoy/v2/lds.go:29 +0x5a
istio.io/istio/pilot/pkg/proxy/envoy/v2.(*DiscoveryServer).StreamAggregatedResources(0xc0010d4dc0, 0x20417e0, 0xc00066e180, 0x0, 0x0)
/home/dgrimm/dev/go/src/istio.io/istio/pilot/pkg/proxy/envoy/v2/ads.go:479 +0xd2d
istio.io/istio/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2._AggregatedDiscoveryService_StreamAggregatedResources_Handler(0x1d0ddc0, 0xc0010d4dc0, 0x2030500, 0xc0009904d0, 0x32621c8, 0xc000ba0000)
/home/dgrimm/dev/go/src/istio.io/istio/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.go:197 +0xad
istio.io/istio/vendor/google.golang.org/grpc.(*Server).processStreamingRPC(0xc004e40f00, 0x2049340, 0xc001e38d80, 0xc000ba0000, 0xc0007dd770, 0x3229f20, 0xc0088dc480, 0x0, 0x0)
/home/dgrimm/dev/go/src/istio.io/istio/vendor/google.golang.org/grpc/server.go:1124 +0x85e
istio.io/istio/vendor/google.golang.org/grpc.(*Server).handleStream(0xc004e40f00, 0x2049340, 0xc001e38d80, 0xc000ba0000, 0xc0088dc480)
/home/dgrimm/dev/go/src/istio.io/istio/vendor/google.golang.org/grpc/server.go:1212 +0x124e
istio.io/istio/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00b5e6a70, 0xc004e40f00, 0x2049340, 0xc001e38d80, 0xc000ba0000)
/home/dgrimm/dev/go/src/istio.io/istio/vendor/google.golang.org/grpc/server.go:686 +0x9f
created by istio.io/istio/vendor/google.golang.org/grpc.(*Server).serveStreams.func1
/home/dgrimm/dev/go/src/istio.io/istio/vendor/google.golang.org/grpc/server.go:684 +0xa1
FAIL istio.io/istio/pilot/pkg/proxy/envoy/v2 65.971s
Reason is that we're accessing fields of the ServiceInstance without checking if it's nil first.