Closed 4molybdenum2 closed 2 months ago
I ran a bisect and it seems that #88 breaks the generate-deepcopy step of the Makefile.
Actually looks like the issue is in https://github.com/NVIDIA/k8s-test-infra/blob/main/images/devel/Dockerfile#L19. The 1.22.1 image has the old controller-gen version.
aponeill@foobox:/tmp/k8s-dra-driver$ docker run -it ghcr.io/nvidia/k8s-test-infra:devel-go1.22.1 controller-gen --version
Version: v0.9.2
added a PR nvidia/k8s-test-infra#35
Thanks 👍. Until then I will try with an older version.
@ArangoGutierrez could you confirm whether #86 fixes this?
Yes, #86 aims to fix this, @4molybdenum2 could you test it out before we merge it?
@ArangoGutierrez still getting receiving the same error. Can it be due to some preached image that I already pulled during my last build?...because I just fetched your PR and reran the script Attaching the entire build log for your reference
./demo/clusters/kind/build-dra-driver.sh
+ set -o pipefail
+ source /home/node4/k8s-dra-driver/demo/clusters/kind/scripts/common.sh
++++ dirname -- /home/node4/k8s-dra-driver/demo/clusters/kind/scripts/common.sh
+++ cd -- /home/node4/k8s-dra-driver/demo/clusters/kind/scripts
+++ pwd
++ SCRIPTS_DIR=/home/node4/k8s-dra-driver/demo/clusters/kind/scripts
++++ dirname -- /home/node4/k8s-dra-driver/demo/clusters/kind/scripts/../../../../..
+++ cd -- /home/node4/k8s-dra-driver/demo/clusters/kind/scripts/../../../..
+++ pwd
++ PROJECT_DIR=/home/node4/k8s-dra-driver
+++ from_versions_mk DRIVER_NAME
+++ local makevar=DRIVER_NAME
++++ grep -E '^\s*DRIVER_NAME\s+[\?:]= ' /home/node4/k8s-dra-driver/versions.mk
+++ local 'value=DRIVER_NAME := k8s-dra-driver'
+++ echo k8s-dra-driver
++ DRIVER_NAME=k8s-dra-driver
+++ from_versions_mk REGISTRY
+++ local makevar=REGISTRY
++++ grep -E '^\s*REGISTRY\s+[\?:]= ' /home/node4/k8s-dra-driver/versions.mk
+++ local 'value=REGISTRY ?= nvcr.io/nvidia/cloud-native'
+++ echo nvcr.io/nvidia/cloud-native
++ DRIVER_IMAGE_REGISTRY=nvcr.io/nvidia/cloud-native
+++ from_versions_mk VERSION
+++ local makevar=VERSION
++++ grep -E '^\s*VERSION\s+[\?:]= ' /home/node4/k8s-dra-driver/versions.mk
+++ local 'value=VERSION ?= v0.1.0'
+++ echo v0.1.0
++ DRIVER_IMAGE_VERSION=v0.1.0
++ : k8s-dra-driver
++ : ubuntu20.04
++ : v0.1.0
++ : nvcr.io/nvidia/cloud-native/k8s-dra-driver:v0.1.0
++ : v1.29.1
++ : k8s-dra-driver-cluster
++ : /home/node4/k8s-dra-driver/demo/clusters/kind/scripts/kind-cluster-config.yaml
++ : kindest/node:v1.29.1
+ /home/node4/k8s-dra-driver/demo/clusters/kind/scripts/build-driver-image.sh
+ set -o pipefail
+ source /home/node4/k8s-dra-driver/demo/clusters/kind/scripts/common.sh
++++ dirname -- /home/node4/k8s-dra-driver/demo/clusters/kind/scripts/common.sh
+++ cd -- /home/node4/k8s-dra-driver/demo/clusters/kind/scripts
+++ pwd
++ SCRIPTS_DIR=/home/node4/k8s-dra-driver/demo/clusters/kind/scripts
++++ dirname -- /home/node4/k8s-dra-driver/demo/clusters/kind/scripts/../../../../..
+++ cd -- /home/node4/k8s-dra-driver/demo/clusters/kind/scripts/../../../..
+++ pwd
++ PROJECT_DIR=/home/node4/k8s-dra-driver
+++ from_versions_mk DRIVER_NAME
+++ local makevar=DRIVER_NAME
++++ grep -E '^\s*DRIVER_NAME\s+[\?:]= ' /home/node4/k8s-dra-driver/versions.mk
+++ local 'value=DRIVER_NAME := k8s-dra-driver'
+++ echo k8s-dra-driver
++ DRIVER_NAME=k8s-dra-driver
+++ from_versions_mk REGISTRY
+++ local makevar=REGISTRY
++++ grep -E '^\s*REGISTRY\s+[\?:]= ' /home/node4/k8s-dra-driver/versions.mk
+++ local 'value=REGISTRY ?= nvcr.io/nvidia/cloud-native'
+++ echo nvcr.io/nvidia/cloud-native
++ DRIVER_IMAGE_REGISTRY=nvcr.io/nvidia/cloud-native
+++ from_versions_mk VERSION
+++ local makevar=VERSION
++++ grep -E '^\s*VERSION\s+[\?:]= ' /home/node4/k8s-dra-driver/versions.mk
+++ local 'value=VERSION ?= v0.1.0'
+++ echo v0.1.0
++ DRIVER_IMAGE_VERSION=v0.1.0
++ : k8s-dra-driver
++ : ubuntu20.04
++ : v0.1.0
++ : nvcr.io/nvidia/cloud-native/k8s-dra-driver:v0.1.0
++ : v1.29.1
++ : k8s-dra-driver-cluster
++ : /home/node4/k8s-dra-driver/demo/clusters/kind/scripts/kind-cluster-config.yaml
++ : kindest/node:v1.29.1
++ mktemp -d
+ TMP_DIR=/tmp/tmp.RWhBVRMsJt
+ trap cleanup EXIT
+ cd /home/node4/k8s-dra-driver
+ make docker-generate
Running 'make generate' in container image ghcr.io/nvidia/k8s-test-infra:devel-go1.22.1
docker run \
--rm \
-e GOCACHE=/tmp/.cache/go \
-e GOMODCACHE=/tmp/.cache/gomod \
-v /home/node4/k8s-dra-driver:/work \
-w /work \
--user $(id -u):$(id -g) \
ghcr.io/nvidia/k8s-test-infra:devel-go1.22.1 \
make generate
rm -rf /work/pkg/nvidia.com/resource/clientset
for dir in api/utils/selector api/utils/sharing api/nvidia.com/resource/gpu/nas/v1alpha1 api/nvidia.com/resource/gpu/v1alpha1; do \
rm -f /work/${dir}/zz_generated.deepcopy.go; \
done
rm -rf /work/deployments/helm/k8s-dra-driver/crds
client-gen \
--go-header-file=/work/hack/boilerplate.go.txt \
--clientset-name "versioned" \
--build-tag "ignore_autogenerated" \
--output-package "github.com/NVIDIA/k8s-dra-driver/pkg/nvidia.com/resource/clientset" \
--input-base "github.com/NVIDIA/k8s-dra-driver/api/nvidia.com/resource" \
--output-base "/work/pkg/tmp_clientset" \
--input "gpu/nas/v1alpha1,gpu/v1alpha1" \
--plural-exceptions "DeviceClassParameters:DeviceClassParameters,GpuClaimParameters:GpuClaimParameters,MigDeviceClaimParameters:MigDeviceClaimParameters,ComputeInstanceParameters:ComputeInstanceParameters"
mkdir -p /work/pkg/nvidia.com/resource
mv /work/pkg/tmp_clientset/github.com/NVIDIA/k8s-dra-driver/pkg/nvidia.com/resource/clientset \
/work/pkg/nvidia.com/resource/clientset
rm -rf /work/pkg/tmp_clientset
go mod tidy
go: downloading k8s.io/apimachinery v0.29.2
go: downloading github.com/prometheus/client_golang v1.19.0
go: downloading github.com/urfave/cli/v2 v2.27.1
go: downloading k8s.io/client-go v0.29.2
go: downloading k8s.io/api v0.29.2
go: downloading github.com/stretchr/testify v1.9.0
go: downloading k8s.io/component-base v0.29.2
go: downloading k8s.io/dynamic-resource-allocation v0.29.2
go: downloading k8s.io/klog/v2 v2.110.1
go: downloading golang.org/x/mod v0.16.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/NVIDIA/go-nvlib v0.2.0
go: downloading github.com/NVIDIA/go-nvml v0.12.0-3
go: downloading github.com/NVIDIA/nvidia-container-toolkit v1.15.0-rc.4
go: downloading github.com/sirupsen/logrus v1.9.3
go: downloading k8s.io/kubelet v0.29.2
go: downloading k8s.io/mount-utils v0.29.2
go: downloading tags.cncf.io/container-device-interface v0.6.2
go: downloading tags.cncf.io/container-device-interface/specs-go v0.6.0
go: downloading github.com/go-logr/logr v1.3.0
go: downloading github.com/google/go-cmp v0.6.0
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/prometheus/common v0.48.0
go: downloading google.golang.org/protobuf v1.33.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.2.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading golang.org/x/sys v0.18.0
go: downloading sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2
go: downloading github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading github.com/google/gofuzz v1.2.0
go: downloading sigs.k8s.io/yaml v1.3.0
go: downloading sigs.k8s.io/structured-merge-diff/v4 v4.4.1
go: downloading gopkg.in/inf.v0 v0.9.1
go: downloading k8s.io/utils v0.0.0-20230726121419-3b25d923346b
go: downloading google.golang.org/grpc v1.58.3
go: downloading github.com/imdario/mergo v0.3.6
go: downloading golang.org/x/term v0.16.0
go: downloading github.com/golang/protobuf v1.5.3
go: downloading golang.org/x/time v0.3.0
go: downloading golang.org/x/net v0.20.0
go: downloading github.com/google/gnostic-models v0.6.8
go: downloading github.com/evanphx/json-patch v4.12.0+incompatible
go: downloading k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/moby/sys/mountinfo v0.6.2
go: downloading github.com/blang/semver/v4 v4.0.0
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/go-logr/zapr v1.2.3
go: downloading go.uber.org/zap v1.21.0
go: downloading github.com/spf13/cobra v1.7.0
go: downloading github.com/opencontainers/runtime-spec v1.2.0
go: downloading github.com/fsnotify/fsnotify v1.7.0
go: downloading github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626
go: downloading github.com/russross/blackfriday/v2 v2.1.0
go: downloading golang.org/x/oauth2 v0.16.0
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/json-iterator/go v1.1.12
go: downloading golang.org/x/text v0.14.0
go: downloading github.com/inconshreveable/mousetrap v1.1.0
go: downloading go.uber.org/multierr v1.11.0
go: downloading go.uber.org/atomic v1.10.0
go: downloading github.com/go-openapi/swag v0.22.3
go: downloading github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
go: downloading github.com/go-openapi/jsonreference v0.20.2
go: downloading github.com/emicklei/go-restful/v3 v3.11.0
go: downloading google.golang.org/appengine v1.6.7
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading github.com/modern-go/reflect2 v1.0.2
go: downloading github.com/go-openapi/jsonpointer v0.19.6
go: downloading github.com/mailru/easyjson v0.7.7
go: downloading github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d
go: downloading github.com/josharian/intern v1.0.0
go: downloading gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
go: downloading github.com/xeipuuv/gojsonschema v1.2.0
go: downloading go.uber.org/goleak v1.1.11
go: downloading github.com/benbjohnson/clock v1.1.0
go: downloading github.com/onsi/ginkgo/v2 v2.13.0
go: downloading github.com/onsi/gomega v1.29.0
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/opencontainers/selinux v1.11.0
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading github.com/kr/pretty v0.3.1
go: downloading github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415
go: downloading github.com/rogpeppe/go-internal v1.10.0
go: downloading github.com/kr/text v0.2.0
go: downloading github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb
go: downloading golang.org/x/tools v0.16.1
go: downloading github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572
go: downloading github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1
go mod vendor
go mod verify
all modules verified
for dir in api/utils/selector api/utils/sharing api/nvidia.com/resource/gpu/nas/v1alpha1 api/nvidia.com/resource/gpu/v1alpha1; do \
controller-gen \
object:headerFile=/work/hack/boilerplate.go.txt,year=2024 \
paths=/work/${dir}/ \
output:object:dir=/work/${dir}; \
done
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa009cf]
goroutine 115 [running]:
go/types.(*Checker).handleBailout(0xc000958200, 0xc0008c7d40)
/usr/local/go/src/go/types/check.go:367 +0x88
panic({0xbb1600?, 0x1287d00?})
/usr/local/go/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xda4078, 0x1290600})
/usr/local/go/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
/usr/local/go/src/go/types/sizes.go:333
go/types.representableConst.func1({0xda4078?, 0x1290600?})
/usr/local/go/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xdaa398, 0x125c5d8}, 0xc000958200, 0x1290600, 0xc0008c5e50)
/usr/local/go/src/go/types/const.go:106 +0x2c7
go/types.(*Checker).representation(0xc000958200, 0xc000da0d00, 0x1290600)
/usr/local/go/src/go/types/const.go:256 +0x65
go/types.(*Checker).representable(0xc000958200, 0xc000da0d00, 0x1290600)
/usr/local/go/src/go/types/const.go:239 +0x26
go/types.(*Checker).shift(0xc000958200, 0xc000da0c80, 0xc000da0d00, {0xda8198, 0xc0004e8e40}, 0x14)
/usr/local/go/src/go/types/expr.go:650 +0x1eb
go/types.(*Checker).binary(0xc000958200, 0xc000da0c80, {0xda8198, 0xc0004e8e40}, {0xda86a8, 0xc0007fc6c0}, {0xda86a8, 0xc0007fc6e0}, 0x14, 0x6cb9d)
/usr/local/go/src/go/types/expr.go:796 +0x150
go/types.(*Checker).exprInternal(0xc000958200, 0x0, 0xc000da0c80, {0xda8198, 0xc0004e8e40}, {0x0, 0x0})
/usr/local/go/src/go/types/expr.go:1416 +0x206
go/types.(*Checker).rawExpr(0xc000958200, 0x0, 0xc000da0c80, {0xda8198?, 0xc0004e8e40?}, {0x0?, 0x0?}, 0x0)
/usr/local/go/src/go/types/expr.go:979 +0x19e
go/types.(*Checker).expr(0xc000958200, 0x0?, 0xc000da0c80, {0xda8198?, 0xc0004e8e40?})
/usr/local/go/src/go/types/expr.go:1513 +0x30
go/types.(*Checker).binary(0xc000958200, 0xc000da0c80, {0xda8198, 0xc0004e8e70}, {0xda8198, 0xc0004e8e40}, {0xda86a8, 0xc0007fc700}, 0xd, 0x6cba1)
/usr/local/go/src/go/types/expr.go:783 +0xa5
go/types.(*Checker).exprInternal(0xc000958200, 0x0, 0xc000da0c80, {0xda8198, 0xc0004e8e70}, {0x0, 0x0})
/usr/local/go/src/go/types/expr.go:1416 +0x206
go/types.(*Checker).rawExpr(0xc000958200, 0x0, 0xc000da0c80, {0xda8198?, 0xc0004e8e70?}, {0x0?, 0x0?}, 0x0)
/usr/local/go/src/go/types/expr.go:979 +0x19e
go/types.(*Checker).expr(0xc000958200, 0xc0005890e0?, 0xc000da0c80, {0xda8198?, 0xc0004e8e70?})
/usr/local/go/src/go/types/expr.go:1513 +0x30
go/types.(*Checker).constDecl(0xc000958200, 0xc0005891a0, {0x0, 0x0}, {0xda8198, 0xc0004e8e70}, 0x0)
/usr/local/go/src/go/types/decl.go:488 +0x2f1
go/types.(*Checker).objDecl(0xc000958200, {0xdafac0, 0xc0005891a0}, 0x0)
/usr/local/go/src/go/types/decl.go:191 +0xa49
go/types.(*Checker).packageObjects(0xc000958200)
/usr/local/go/src/go/types/resolver.go:693 +0x4dd
go/types.(*Checker).checkFiles(0xc000958200, {0xc00030bee0, 0x1, 0x1})
/usr/local/go/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
/usr/local/go/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc000375110, 0xc0001322e0)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:286 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc0001322e0)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:99 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc0003400c0, 0xc0001322e0)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:268 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x1e?)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:262 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 98
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:260 +0x1c5
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa009cf]
goroutine 60 [running]:
go/types.(*Checker).handleBailout(0xc0002b9000, 0xc000043d40)
/usr/local/go/src/go/types/check.go:367 +0x88
panic({0xbb1600?, 0x1287d00?})
/usr/local/go/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xda4078, 0x1290600})
/usr/local/go/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
/usr/local/go/src/go/types/sizes.go:333
go/types.representableConst.func1({0xda4078?, 0x1290600?})
/usr/local/go/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xdaa398, 0x125c5d8}, 0xc0002b9000, 0x1290600, 0xc000041e50)
/usr/local/go/src/go/types/const.go:106 +0x2c7
go/types.(*Checker).representation(0xc0002b9000, 0xc0002f4c00, 0x1290600)
/usr/local/go/src/go/types/const.go:256 +0x65
go/types.(*Checker).representable(0xc0002b9000, 0xc0002f4c00, 0x1290600)
/usr/local/go/src/go/types/const.go:239 +0x26
go/types.(*Checker).shift(0xc0002b9000, 0xc0002f4b80, 0xc0002f4c00, {0xda8198, 0xc00013eba0}, 0x14)
/usr/local/go/src/go/types/expr.go:650 +0x1eb
go/types.(*Checker).binary(0xc0002b9000, 0xc0002f4b80, {0xda8198, 0xc00013eba0}, {0xda86a8, 0xc0001b9660}, {0xda86a8, 0xc0001b9680}, 0x14, 0x6e22a)
/usr/local/go/src/go/types/expr.go:796 +0x150
go/types.(*Checker).exprInternal(0xc0002b9000, 0x0, 0xc0002f4b80, {0xda8198, 0xc00013eba0}, {0x0, 0x0})
/usr/local/go/src/go/types/expr.go:1416 +0x206
go/types.(*Checker).rawExpr(0xc0002b9000, 0x0, 0xc0002f4b80, {0xda8198?, 0xc00013eba0?}, {0x0?, 0x0?}, 0x0)
/usr/local/go/src/go/types/expr.go:979 +0x19e
go/types.(*Checker).expr(0xc0002b9000, 0x0?, 0xc0002f4b80, {0xda8198?, 0xc00013eba0?})
/usr/local/go/src/go/types/expr.go:1513 +0x30
go/types.(*Checker).binary(0xc0002b9000, 0xc0002f4b80, {0xda8198, 0xc00013ebd0}, {0xda8198, 0xc00013eba0}, {0xda86a8, 0xc0001b96a0}, 0xd, 0x6e22e)
/usr/local/go/src/go/types/expr.go:783 +0xa5
go/types.(*Checker).exprInternal(0xc0002b9000, 0x0, 0xc0002f4b80, {0xda8198, 0xc00013ebd0}, {0x0, 0x0})
/usr/local/go/src/go/types/expr.go:1416 +0x206
go/types.(*Checker).rawExpr(0xc0002b9000, 0x0, 0xc0002f4b80, {0xda8198?, 0xc00013ebd0?}, {0x0?, 0x0?}, 0x0)
/usr/local/go/src/go/types/expr.go:979 +0x19e
go/types.(*Checker).expr(0xc0002b9000, 0xc00058acc0?, 0xc0002f4b80, {0xda8198?, 0xc00013ebd0?})
/usr/local/go/src/go/types/expr.go:1513 +0x30
go/types.(*Checker).constDecl(0xc0002b9000, 0xc00058ad80, {0x0, 0x0}, {0xda8198, 0xc00013ebd0}, 0x0)
/usr/local/go/src/go/types/decl.go:488 +0x2f1
go/types.(*Checker).objDecl(0xc0002b9000, {0xdafac0, 0xc00058ad80}, 0x0)
/usr/local/go/src/go/types/decl.go:191 +0xa49
go/types.(*Checker).packageObjects(0xc0002b9000)
/usr/local/go/src/go/types/resolver.go:693 +0x4dd
go/types.(*Checker).checkFiles(0xc0002b9000, {0xc00012efa0, 0x1, 0x1})
/usr/local/go/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
/usr/local/go/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc000377110, 0xc000448c20)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:286 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc000448c20)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:99 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc000138ed0, 0xc000448c20)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:268 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x1e?)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:262 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 114
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:260 +0x1c5
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa009cf]
goroutine 107 [running]:
go/types.(*Checker).handleBailout(0xc000458a00, 0xc000bb9d40)
/usr/local/go/src/go/types/check.go:367 +0x88
panic({0xbb1600?, 0x1287d00?})
/usr/local/go/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xda4078, 0x1290600})
/usr/local/go/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
/usr/local/go/src/go/types/sizes.go:333
go/types.representableConst.func1({0xda4078?, 0x1290600?})
/usr/local/go/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xdaa398, 0x125c5d8}, 0xc000458a00, 0x1290600, 0xc000bb7e50)
/usr/local/go/src/go/types/const.go:106 +0x2c7
go/types.(*Checker).representation(0xc000458a00, 0xc000e29d00, 0x1290600)
/usr/local/go/src/go/types/const.go:256 +0x65
go/types.(*Checker).representable(0xc000458a00, 0xc000e29d00, 0x1290600)
/usr/local/go/src/go/types/const.go:239 +0x26
go/types.(*Checker).shift(0xc000458a00, 0xc000e29c80, 0xc000e29d00, {0xda8198, 0xc000852fc0}, 0x14)
/usr/local/go/src/go/types/expr.go:650 +0x1eb
go/types.(*Checker).binary(0xc000458a00, 0xc000e29c80, {0xda8198, 0xc000852fc0}, {0xda86a8, 0xc0006edf60}, {0xda86a8, 0xc000854000}, 0x14, 0xe5aa0)
/usr/local/go/src/go/types/expr.go:796 +0x150
go/types.(*Checker).exprInternal(0xc000458a00, 0x0, 0xc000e29c80, {0xda8198, 0xc000852fc0}, {0x0, 0x0})
/usr/local/go/src/go/types/expr.go:1416 +0x206
go/types.(*Checker).rawExpr(0xc000458a00, 0x0, 0xc000e29c80, {0xda8198?, 0xc000852fc0?}, {0x0?, 0x0?}, 0x0)
/usr/local/go/src/go/types/expr.go:979 +0x19e
go/types.(*Checker).expr(0xc000458a00, 0x0?, 0xc000e29c80, {0xda8198?, 0xc000852fc0?})
/usr/local/go/src/go/types/expr.go:1513 +0x30
go/types.(*Checker).binary(0xc000458a00, 0xc000e29c80, {0xda8198, 0xc000852ff0}, {0xda8198, 0xc000852fc0}, {0xda86a8, 0xc000854020}, 0xd, 0xe5aa4)
/usr/local/go/src/go/types/expr.go:783 +0xa5
go/types.(*Checker).exprInternal(0xc000458a00, 0x0, 0xc000e29c80, {0xda8198, 0xc000852ff0}, {0x0, 0x0})
/usr/local/go/src/go/types/expr.go:1416 +0x206
go/types.(*Checker).rawExpr(0xc000458a00, 0x0, 0xc000e29c80, {0xda8198?, 0xc000852ff0?}, {0x0?, 0x0?}, 0x0)
/usr/local/go/src/go/types/expr.go:979 +0x19e
go/types.(*Checker).expr(0xc000458a00, 0xc00012baa0?, 0xc000e29c80, {0xda8198?, 0xc000852ff0?})
/usr/local/go/src/go/types/expr.go:1513 +0x30
go/types.(*Checker).constDecl(0xc000458a00, 0xc00012bb60, {0x0, 0x0}, {0xda8198, 0xc000852ff0}, 0x0)
/usr/local/go/src/go/types/decl.go:488 +0x2f1
go/types.(*Checker).objDecl(0xc000458a00, {0xdafac0, 0xc00012bb60}, 0x0)
/usr/local/go/src/go/types/decl.go:191 +0xa49
go/types.(*Checker).packageObjects(0xc000458a00)
/usr/local/go/src/go/types/resolver.go:693 +0x4dd
go/types.(*Checker).checkFiles(0xc000458a00, {0xc000571818, 0x1, 0x1})
/usr/local/go/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
/usr/local/go/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc000375110, 0xc000494700)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:286 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc000494700)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:99 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc000162660, 0xc000494700)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:268 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x0?)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:262 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 99
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:260 +0x1c5
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa009cf]
goroutine 180 [running]:
go/types.(*Checker).handleBailout(0xc0001cfa00, 0xc000d8bd40)
/usr/local/go/src/go/types/check.go:367 +0x88
panic({0xbb1600?, 0x1287d00?})
/usr/local/go/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xda4078, 0x1290600})
/usr/local/go/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
/usr/local/go/src/go/types/sizes.go:333
go/types.representableConst.func1({0xda4078?, 0x1290600?})
/usr/local/go/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xdaa398, 0x125c5d8}, 0xc0001cfa00, 0x1290600, 0xc000d89e50)
/usr/local/go/src/go/types/const.go:106 +0x2c7
go/types.(*Checker).representation(0xc0001cfa00, 0xc0009f4280, 0x1290600)
/usr/local/go/src/go/types/const.go:256 +0x65
go/types.(*Checker).representable(0xc0001cfa00, 0xc0009f4280, 0x1290600)
/usr/local/go/src/go/types/const.go:239 +0x26
go/types.(*Checker).shift(0xc0001cfa00, 0xc0009f4200, 0xc0009f4280, {0xda8198, 0xc000f24cc0}, 0x14)
/usr/local/go/src/go/types/expr.go:650 +0x1eb
go/types.(*Checker).binary(0xc0001cfa00, 0xc0009f4200, {0xda8198, 0xc000f24cc0}, {0xda86a8, 0xc000f0c700}, {0xda86a8, 0xc000f0c720}, 0x14, 0xe8cec)
/usr/local/go/src/go/types/expr.go:796 +0x150
go/types.(*Checker).exprInternal(0xc0001cfa00, 0x0, 0xc0009f4200, {0xda8198, 0xc000f24cc0}, {0x0, 0x0})
/usr/local/go/src/go/types/expr.go:1416 +0x206
go/types.(*Checker).rawExpr(0xc0001cfa00, 0x0, 0xc0009f4200, {0xda8198?, 0xc000f24cc0?}, {0x0?, 0x0?}, 0x0)
/usr/local/go/src/go/types/expr.go:979 +0x19e
go/types.(*Checker).expr(0xc0001cfa00, 0x0?, 0xc0009f4200, {0xda8198?, 0xc000f24cc0?})
/usr/local/go/src/go/types/expr.go:1513 +0x30
go/types.(*Checker).binary(0xc0001cfa00, 0xc0009f4200, {0xda8198, 0xc000f24cf0}, {0xda8198, 0xc000f24cc0}, {0xda86a8, 0xc000f0c740}, 0xd, 0xe8cf0)
/usr/local/go/src/go/types/expr.go:783 +0xa5
go/types.(*Checker).exprInternal(0xc0001cfa00, 0x0, 0xc0009f4200, {0xda8198, 0xc000f24cf0}, {0x0, 0x0})
/usr/local/go/src/go/types/expr.go:1416 +0x206
go/types.(*Checker).rawExpr(0xc0001cfa00, 0x0, 0xc0009f4200, {0xda8198?, 0xc000f24cf0?}, {0x0?, 0x0?}, 0x0)
/usr/local/go/src/go/types/expr.go:979 +0x19e
go/types.(*Checker).expr(0xc0001cfa00, 0xc0008d5ec0?, 0xc0009f4200, {0xda8198?, 0xc000f24cf0?})
/usr/local/go/src/go/types/expr.go:1513 +0x30
go/types.(*Checker).constDecl(0xc0001cfa00, 0xc0009060c0, {0x0, 0x0}, {0xda8198, 0xc000f24cf0}, 0x0)
/usr/local/go/src/go/types/decl.go:488 +0x2f1
go/types.(*Checker).objDecl(0xc0001cfa00, {0xdafac0, 0xc0009060c0}, 0x0)
/usr/local/go/src/go/types/decl.go:191 +0xa49
go/types.(*Checker).packageObjects(0xc0001cfa00)
/usr/local/go/src/go/types/resolver.go:693 +0x4dd
go/types.(*Checker).checkFiles(0xc0001cfa00, {0xc000528170, 0x1, 0x1})
/usr/local/go/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
/usr/local/go/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc000377110, 0xc000396ee0)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:286 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc000396ee0)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:99 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc0007acf30, 0xc000396ee0)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:268 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x3b?)
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:262 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 75
/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:260 +0x1c5
make: *** [Makefile:111: generate-deepcopy] Error 2
make: *** [Makefile:158: docker-generate] Error 2
+ cleanup
+ rm -rf /tmp/tmp.RWhBVRMsJt
If you run make build-image
before running ./demo/clusters/kind/build-dra-driver.sh
then things should work. This will build a local version of the k8s-test-infra
image with the correct packages included. Sorry for breaking the default flow -- we will provide a proper fix soon.
I have updated #86 , it now works right out ./demo/clusters/kind/build-dra-driver.sh
without having to run make build-image
. Let me know if it works so we can merge the patch
cc @4molybdenum2 @klueska
Hi, I am getting a go mod error while trying to run the script for building the example resource driver image.