Found with: go test ./tests/integration/security/... -v --istio.test.env native -race
==================
WARNING: DATA RACE
Read at 0x00c0005aead8 by goroutine 164:
istio.io/istio/pilot/pkg/networking/plugin/authz.buildFilter()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/networking/plugin/authz/rbac.go:348 +0x22f
istio.io/istio/pilot/pkg/networking/plugin/authz.Plugin.OnInboundListener()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/networking/plugin/authz/rbac.go:337 +0xc2
istio.io/istio/pilot/pkg/networking/plugin/authz.(*Plugin).OnInboundListener()
<autogenerated>:1 +0x57
istio.io/istio/pilot/pkg/networking/core/v1alpha3.(*ConfigGeneratorImpl).buildSidecarInboundListenerForPortOrUDS()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/listener.go:562 +0xe27
istio.io/istio/pilot/pkg/networking/core/v1alpha3.(*ConfigGeneratorImpl).buildSidecarInboundListeners()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/listener.go:373 +0x904
istio.io/istio/pilot/pkg/networking/core/v1alpha3.(*ConfigGeneratorImpl).buildSidecarListeners()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/listener.go:197 +0xd36
istio.io/istio/pilot/pkg/networking/core/v1alpha3.(*ConfigGeneratorImpl).BuildListeners()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/listener.go:177 +0x1d7
istio.io/istio/pilot/pkg/proxy/envoy/v2.(*DiscoveryServer).generateRawListeners()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/proxy/envoy/v2/lds.go:52 +0xf3
istio.io/istio/pilot/pkg/proxy/envoy/v2.(*DiscoveryServer).pushLds()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/proxy/envoy/v2/lds.go:30 +0x6d
istio.io/istio/pilot/pkg/proxy/envoy/v2.(*DiscoveryServer).StreamAggregatedResources()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/proxy/envoy/v2/ads.go:462 +0xe6d
istio.io/istio/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2._AggregatedDiscoveryService_StreamAggregatedResources_Handler()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2/ads.pb.go:197 +0xcd
istio.io/istio/vendor/google.golang.org/grpc.(*Server).processStreamingRPC()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/vendor/google.golang.org/grpc/server.go:1124 +0x11e0
istio.io/istio/vendor/google.golang.org/grpc.(*Server).handleStream()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/vendor/google.golang.org/grpc/server.go:1212 +0x1321
istio.io/istio/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/vendor/google.golang.org/grpc/server.go:686 +0xac
Previous write at 0x00c0005aead8 by goroutine 77:
istio.io/istio/pilot/pkg/model.NewPushContext()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/model/push_context.go:306 +0xcf
istio.io/istio/pilot/pkg/proxy/envoy/v2.(*DiscoveryServer).Push()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/proxy/envoy/v2/discovery.go:291 +0x1ee
istio.io/istio/pilot/pkg/proxy/envoy/v2.(*DiscoveryServer).doPush()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/proxy/envoy/v2/discovery.go:360 +0xd7
Goroutine 164 (running) created at:
istio.io/istio/vendor/google.golang.org/grpc.(*Server).serveStreams.func1()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/vendor/google.golang.org/grpc/server.go:684 +0xb8
istio.io/istio/vendor/google.golang.org/grpc/internal/transport.(*http2Server).operateHeaders()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/vendor/google.golang.org/grpc/internal/transport/http2_server.go:419 +0x1481
istio.io/istio/vendor/google.golang.org/grpc/internal/transport.(*http2Server).HandleStreams()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/vendor/google.golang.org/grpc/internal/transport/http2_server.go:459 +0x37a
istio.io/istio/vendor/google.golang.org/grpc.(*Server).serveStreams()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/vendor/google.golang.org/grpc/server.go:682 +0x170
istio.io/istio/vendor/google.golang.org/grpc.(*Server).handleRawConn.func1()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/vendor/google.golang.org/grpc/server.go:644 +0x50
Goroutine 77 (finished) created at:
istio.io/istio/pilot/pkg/proxy/envoy/v2.(*DiscoveryServer).handleUpdates()
/usr/local/google/home/howardjohn/go/src/istio.io/istio/pilot/pkg/proxy/envoy/v2/discovery.go:418 +0x49b
==================
Found with:
go test ./tests/integration/security/... -v --istio.test.env native -race