Change:
Which jobs are flaking: periodics-kubernetes-bazel-test Which test(s) are flaking: //pkg/kubelet/cri/remote TestVersion Testgrid link: Reason for failure: Error: Received unexpected error: rpc error: code = Unavailable desc = transport is closing panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference Anything else we need to know: To reproduce with stress: go test -race -c ./pkg/kubelet/cri/remote stress - TestVersion Detailed logs
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig testing
I 'll give it a see and fix it :)
/assign
/remove-sig testing SIG node owns their unit tests. SIG testing owns the framework, infrastructure, etc.
/sig node

Discussion:
embed = [":go_default_library"], deps = [ "//pkg/kubelet/cri/remote/fake:go_default_library", <ins> "//pkg/kubelet/cri/remote/util:go_default_library", </ins> "//staging/src/k8s.io/cri-api/pkg/apis:go_default_library", "//staging/src/k8s.io/cri-api/pkg/apis/testing:go_default_library", "//vendor/github.com/stretchr/testify/assert:go_default_library",

"//staging/src/k8s.io/cri-api/pkg/apis/testing:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", "//vendor/k8s.io/utils/exec:go_default_library", <del> ], </del> <ins> ] + select({ "@io_bazel_rules_go//go/platform:aix": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "@io_bazel_rules_go//go/platform:android": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "@io_bazel_rules_go//go/platform:darwin": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "@io_bazel_rules_go//go/platform:dragonfly": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "@io_bazel_rules_go//go/platform:freebsd": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "@io_bazel_rules_go//go/platform:illumos": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "@io_bazel_rules_go//go/platform:ios": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "@io_bazel_rules_go//go/platform:js": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "@io_bazel_rules_go//go/platform:linux": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "@io_bazel_rules_go//go/platform:nacl": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "@io_bazel_rules_go//go/platform:netbsd": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "@io_bazel_rules_go//go/platform:openbsd": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "@io_bazel_rules_go//go/platform:plan9": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "@io_bazel_rules_go//go/platform:solaris": [ "//staging/src/k8s.io/apimachinery/pkg/util/rand:go_default_library", ], "//conditions:default": [], }), </ins> ) filegroup(

package fake <ins> import ( "fmt" "k8s.io/apimachinery/pkg/util/rand" ) </ins> const ( <del> defaultUnixEndpoint = "unix:///tmp/kubelet_remote.sock" </del> <ins> defaultUnixEndpoint = "unix:///tmp/kubelet_remote_%v.sock" </ins> ) // GenerateEndpoint generates a new unix socket server of grpc server. func GenerateEndpoint() (string, error) { <del> return defaultUnixEndpoint, nil </del> <ins> // use random int be a part fo file name return fmt.Sprintf(defaultUnixEndpoint, rand.Int()), nil </ins> }

package remote import ( <ins> "os" </ins> "testing" "time"

internalapi "k8s.io/cri-api/pkg/apis" apitest "k8s.io/cri-api/pkg/apis/testing" fakeremote "k8s.io/kubernetes/pkg/kubelet/cri/remote/fake" <ins> "k8s.io/kubernetes/pkg/kubelet/cri/remote/util" </ins> ) const (

func TestVersion(t *testing.T) { fakeRuntime, endpoint := createAndStartFakeRemoteRuntime(t) <del> defer fakeRuntime.Stop() </del> <ins> defer func() { fakeRuntime.Stop() // clear endpoint file if addr, _, err := util.GetAddressAndDialer(endpoint); err == nil { if _, err := os.Stat(addr); err == nil { os.Remove(addr) } } }() </ins> r := createRemoteRuntimeService(endpoint, t) version, err := r.Version(apitest.FakeVersion)