Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make e2e failed #2819

Closed
phantooom opened this issue Mar 7, 2024 · 4 comments
Closed

make e2e failed #2819

phantooom opened this issue Mar 7, 2024 · 4 comments
Labels

Comments

@phantooom
Copy link
Contributor

phantooom commented Mar 7, 2024

Description:
make e2e controller-gen crash

Repro steps:
make e2e

Environment:
Arch Linux kernel 6.1.21.2
go 1.22

Logs:

make[1]: Entering directory '/home/phantooom/gateway'
===========> Running generate-gwapi-manifests ...
curl -sLo /home/phantooom/gateway/bin/gatewayapi-crds.yaml https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.0.0/experimental-install.yaml
mv /home/phantooom/gateway/bin/gatewayapi-crds.yaml charts/gateway-helm/crds/gatewayapi-crds.yaml
===========> Running manifests ...
tools/bin/controller-gen crd:allowDangerousTypes=true paths="./..." output:crd:artifacts:config=charts/gateway-helm/crds/generated
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=0xa0e4de]

goroutine 62 [running]:
go/types.(*Checker).handleBailout(0xc000eb0600, 0xc002e7dd40)
        /usr/lib/go/src/go/types/check.go:367 +0x88
panic({0xbc8860?, 0x12b5880?})
        /usr/lib/go/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xdc4c18, 0x12be0e0})
        /usr/lib/go/src/go/types/sizes.go:228 +0x31e
go/types.(*Config).sizeof(...)
        /usr/lib/go/src/go/types/sizes.go:333
go/types.representableConst.func1({0xdc4c18?, 0x12be0e0?})
        /usr/lib/go/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xdcaff0, 0x1289158}, 0xc000eb0600, 0x12be0e0, 0xc002e79b40)
        /usr/lib/go/src/go/types/const.go:106 +0x2c7
go/types.(*Checker).representation(0xc000eb0600, 0xc002e75ac0, 0x12be0e0)
        /usr/lib/go/src/go/types/const.go:256 +0x65
go/types.(*Checker).representable(0xc000eb0600, 0xc002e75ac0, 0x12be0e0)
        /usr/lib/go/src/go/types/const.go:239 +0x26
go/types.(*Checker).shift(0xc000eb0600, 0xc002e75a40, 0xc002e75ac0, {0xdc8d90, 0xc002ca2060}, 0x14)
        /usr/lib/go/src/go/types/expr.go:650 +0x1eb
go/types.(*Checker).binary(0xc000eb0600, 0xc002e75a40, {0xdc8d90, 0xc002ca2060}, {0xdc92a0, 0xc002ca05c0}, {0xdc92a0, 0xc002ca05e0}, 0x14, 0x41ed56)
        /usr/lib/go/src/go/types/expr.go:796 +0x150
go/types.(*Checker).exprInternal(0xc000eb0600, 0x0, 0xc002e75a40, {0xdc8d90, 0xc002ca2060}, {0x0, 0x0})
        /usr/lib/go/src/go/types/expr.go:1416 +0x206
go/types.(*Checker).rawExpr(0xc000eb0600, 0x0, 0xc002e75a40, {0xdc8d90?, 0xc002ca2060?}, {0x0?, 0x0?}, 0x0)
        /usr/lib/go/src/go/types/expr.go:979 +0x19e
go/types.(*Checker).exprInternal(0xc000eb0600, 0x0, 0xc002e75a40, {0xdc8c40, 0xc002ca0600}, {0x0, 0x0})
        /usr/lib/go/src/go/types/expr.go:1320 +0x178
go/types.(*Checker).rawExpr(0xc000eb0600, 0x0, 0xc002e75a40, {0xdc8c40?, 0xc002ca0600?}, {0x0?, 0x0?}, 0x0)
        /usr/lib/go/src/go/types/expr.go:979 +0x19e
go/types.(*Checker).expr(0xc000eb0600, 0x0?, 0xc002e75a40, {0xdc8c40?, 0xc002ca0600?})
        /usr/lib/go/src/go/types/expr.go:1513 +0x30
go/types.(*Checker).binary(0xc000eb0600, 0xc002e75a40, {0xdc8d90, 0xc002ca2090}, {0xdc8c40, 0xc002ca0600}, {0xdc92a0, 0xc002ca0620}, 0xd, 0x41ed5b)
        /usr/lib/go/src/go/types/expr.go:783 +0xa5
go/types.(*Checker).exprInternal(0xc000eb0600, 0x0, 0xc002e75a40, {0xdc8d90, 0xc002ca2090}, {0x0, 0x0})
        /usr/lib/go/src/go/types/expr.go:1416 +0x206
go/types.(*Checker).rawExpr(0xc000eb0600, 0x0, 0xc002e75a40, {0xdc8d90?, 0xc002ca2090?}, {0x0?, 0x0?}, 0x1)
        /usr/lib/go/src/go/types/expr.go:979 +0x19e
go/types.(*Checker).use1(0xc000eb0600, {0xdc8d90, 0xc002ca2090}, 0x0)
        /usr/lib/go/src/go/types/call.go:1043 +0x1a5
go/types.(*Checker).useN(...)
        /usr/lib/go/src/go/types/call.go:1004
go/types.(*Checker).use(...)
        /usr/lib/go/src/go/types/call.go:994
go/types.(*Checker).callExpr(0xc000eb0600, 0xc002e75980, 0xc002ca62c0)
        /usr/lib/go/src/go/types/call.go:196 +0x1770
go/types.(*Checker).exprInternal(0xc000eb0600, 0x0, 0xc002e75980, {0xdc9360, 0xc002ca62c0}, {0x0, 0x0})
        /usr/lib/go/src/go/types/expr.go:1374 +0xf8
go/types.(*Checker).rawExpr(0xc000eb0600, 0x0, 0xc002e75980, {0xdc9360?, 0xc002ca62c0?}, {0x0?, 0x0?}, 0x0)
        /usr/lib/go/src/go/types/expr.go:979 +0x19e
go/types.(*Checker).expr(0xc000eb0600, 0xc000154230?, 0xc002e75980, {0xdc9360?, 0xc002ca62c0?})
        /usr/lib/go/src/go/types/expr.go:1513 +0x30
go/types.(*Checker).exprInternal(0xc000eb0600, 0x0, 0xc002e75980, {0xdc8d00, 0xc002ca6300}, {0x0, 0x0})
        /usr/lib/go/src/go/types/expr.go:1190 +0x1f1f
go/types.(*Checker).rawExpr(0xc000eb0600, 0x0, 0xc002e75980, {0xdc8d00?, 0xc002ca6300?}, {0x0?, 0x0?}, 0x0)
        /usr/lib/go/src/go/types/expr.go:979 +0x19e
go/types.(*Checker).expr(0xc000eb0600, 0x0?, 0xc002e75980, {0xdc8d00?, 0xc002ca6300?})
        /usr/lib/go/src/go/types/expr.go:1513 +0x30
go/types.(*Checker).varDecl(0xc000eb0600, 0xc002a7fe60, {0xc001504d70, 0x1, 0x1}, {0x0, 0x0}, {0xdc8d00, 0xc002ca6300})
        /usr/lib/go/src/go/types/decl.go:521 +0x17b
go/types.(*Checker).objDecl(0xc000eb0600, {0xdd07d8, 0xc002a7fe60}, 0x0)
        /usr/lib/go/src/go/types/decl.go:194 +0x9e5
go/types.(*Checker).packageObjects(0xc000eb0600)
        /usr/lib/go/src/go/types/resolver.go:693 +0x4dd
go/types.(*Checker).checkFiles(0xc000eb0600, {0xc002141b00, 0x7, 0x7})
        /usr/lib/go/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
        /usr/lib/go/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc0002e1380, 0xc0016003a0)
        /home/phantooom/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:286 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc0016003a0)
        /home/phantooom/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:99 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc001324c60, 0xc0016003a0)
        /home/phantooom/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:268 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x32?)
        /home/phantooom/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:262 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 159
        /home/phantooom/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:260 +0x1c5
make[1]: *** [tools/make/kube.mk:35: manifests] Error 2
make[1]: Leaving directory '/home/phantooom/gateway'
make: *** [Makefile:18: _run] Error 2
@phantooom
Copy link
Contributor Author

phantooom commented Mar 7, 2024

i found a bug report: kubernetes-sigs/controller-tools#888
when i update controller-gen 0.14.0 this crash disappeared.

@zirain
Copy link
Contributor

zirain commented Mar 7, 2024

only occur on same linux?

@phantooom
Copy link
Contributor Author

only occur on same linux?

on go 1.22 panic
on go 1.21 it's ok

@phantooom
Copy link
Contributor Author

it may fixed by #2793

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants