Go version

go version go1.26-devel_eb7f515c4d Thu Jul 31 17:12:39 2025 -0700 linux/amd64

Output of go env in your module/workspace:

AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/dsrinivas/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/dsrinivas/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build999408350=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/home/dsrinivas/golang-go/src/go.mod'
GOMODCACHE='/home/dsrinivas/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/dsrinivas/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/dsrinivas/golang-go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/dsrinivas/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/dsrinivas/golang-go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.26-devel_eb7f515c4d Thu Jul 31 17:12:39 2025 -0700'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

Compiled Kubernetes from source and ran into a regression.

What did you see happen?

Failures are happening in CI that runs against golang tip: https://testgrid.k8s.io/sig-arch-code-organization#kind-master-golang-tip&width=20

I can recreate the failures locally as well.

dsrinivas@instance-20250726-165248:~/kubernetes$ PATH=/home/dsrinivas/golang-go/bin:$PATH go build ./cmd/kube-apiserver/
# k8s.io/kubernetes/plugin/pkg/admission/limitranger
<autogenerated>:1: k8s.io/kubernetes/plugin/pkg/admission/limitranger.maxRequestConstraint: invalid instruction: 00294 (/home/dsrinivas/kubernetes/plugin/pkg/admission/limitranger/admission.go:330)MOVQ    k8s.io/kubernetes/plugin/pkg/admission/limitranger.enforced+448(DX), R10
<autogenerated>:1: k8s.io/kubernetes/plugin/pkg/admission/limitranger.maxRequestConstraint: invalid instruction: 00298 (/home/dsrinivas/kubernetes/plugin/pkg/admission/limitranger/admission.go:330)MOVUPS  k8s.io/kubernetes/plugin/pkg/admission/limitranger.enforced+456(DX), X0
<autogenerated>:1: k8s.io/kubernetes/plugin/pkg/admission/limitranger.maxRequestConstraint: invalid instruction: 00302 (/home/dsrinivas/kubernetes/plugin/pkg/admission/limitranger/admission.go:330)MOVUPS  k8s.io/kubernetes/plugin/pkg/admission/limitranger.enforced+472(DX), X0
<autogenerated>:1: k8s.io/kubernetes/plugin/pkg/admission/limitranger.maxRequestConstraint: invalid instruction: 00306 (/home/dsrinivas/kubernetes/plugin/pkg/admission/limitranger/admission.go:330)MOVUPS  k8s.io/kubernetes/plugin/pkg/admission/limitranger.enforced+488(DX), X0

What did you expect to see?

Kubernetes binaries to compile correctly.

Comment From: dims

suspecting https://github.com/golang/go/commit/eb7f515c4d920c884ba7c37939f016a153c466e9

cc @randall77

longer context: https://github.com/kubernetes/kubernetes/issues/133351

Comment From: dims

/home/dsrinivas/kubernetes/plugin/pkg/admission/limitranger/admission.go:330 points to github source: https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/admission/limitranger/admission.go#L330

Comment From: dims

lscpu for the record:

dsrinivas@instance-20250726-165248:~/kubernetes$ lscpu
Architecture:             x86_64
  CPU op-mode(s):         32-bit, 64-bit
  Address sizes:          52 bits physical, 57 bits virtual
  Byte Order:             Little Endian
CPU(s):                   8
  On-line CPU(s) list:    0-7
Vendor ID:                AuthenticAMD
  Model name:             AMD EPYC 9B45
    CPU family:           26
    Model:                2
    Thread(s) per core:   2
    Core(s) per socket:   4
    Socket(s):            1
    Stepping:             1
    BogoMIPS:             5399.99
    Flags:                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nop
                          l xtopology nonstop_tsc cpuid extd_apicid aperfmperf tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand h
                          ypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext mwaitx ssbd ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase tsc_adjust bmi1 avx2 sm
                          ep bmi2 invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 clzero xs
                          aveerptr wbnoinvd arat avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid movdiri movdir64b avx512_vp2intersect f
                          lush_l1d
Virtualization features:
  Hypervisor vendor:      KVM
  Virtualization type:    full
Caches (sum of all):
  L1d:                    192 KiB (4 instances)
  L1i:                    128 KiB (4 instances)
  L2:                     4 MiB (4 instances)
  L3:                     32 MiB (1 instance)
NUMA:
  NUMA node(s):           1
  NUMA node0 CPU(s):      0-7
Vulnerabilities:
  Gather data sampling:   Not affected
  Ghostwrite:             Not affected
  Itlb multihit:          Not affected
  L1tf:                   Not affected
  Mds:                    Not affected
  Meltdown:               Not affected
  Mmio stale data:        Not affected
  Reg file data sampling: Not affected
  Retbleed:               Not affected
  Spec rstack overflow:   Mitigation; IBPB on VMEXIT only
  Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; STIBP always-on; PBRSB-eIBRS Not affected; BHI Not affected
  Srbds:                  Not affected
  Tsx async abort:        Not affected

Comment From: dims

confirmed that dropping eb7f515 enables the compile to succeed!

Comment From: gabyhelp

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Comment From: dims

another way to trigger other than build .. is using go test

$ PATH=/home/dsrinivas/golang-go/bin:$PATH go test ./plugin/pkg/admission/limitranger
# k8s.io/kubernetes/plugin/pkg/admission/limitranger [k8s.io/kubernetes/plugin/pkg/admission/limitranger.test]
<autogenerated>:1: k8s.io/kubernetes/plugin/pkg/admission/limitranger.maxRequestConstraint: invalid instruction: 00294 (/home/dsrinivas/kubernetes/plugin/pkg/admission/limitranger/admission.go:330)MOVQ    k8s.io/kubernetes/plugin/pkg/admission/limitranger.enforced+448(DX), R10
<autogenerated>:1: k8s.io/kubernetes/plugin/pkg/admission/limitranger.maxRequestConstraint: invalid instruction: 00298 (/home/dsrinivas/kubernetes/plugin/pkg/admission/limitranger/admission.go:330)MOVUPS  k8s.io/kubernetes/plugin/pkg/admission/limitranger.enforced+456(DX), X0
<autogenerated>:1: k8s.io/kubernetes/plugin/pkg/admission/limitranger.maxRequestConstraint: invalid instruction: 00302 (/home/dsrinivas/kubernetes/plugin/pkg/admission/limitranger/admission.go:330)MOVUPS  k8s.io/kubernetes/plugin/pkg/admission/limitranger.enforced+472(DX), X0
<autogenerated>:1: k8s.io/kubernetes/plugin/pkg/admission/limitranger.maxRequestConstraint: invalid instruction: 00306 (/home/dsrinivas/kubernetes/plugin/pkg/admission/limitranger/admission.go:330)MOVUPS  k8s.io/kubernetes/plugin/pkg/admission/limitranger.enforced+488(DX), X0
FAIL    k8s.io/kubernetes/plugin/pkg/admission/limitranger [build failed]

Comment From: randall77

Here's a small repro:

package main

type T struct {
    a [20]int
}

func f(x [4]int) {
    g(T{}, x)
}

func g(t T, x [4]int)

go tool compile test.go

test.go:8:3: main.f: invalid instruction: 00080 (/Users/khr/gowork/tmp5.go:8)   MOVUPS  main.x+208(AX), X0
test.go:8:3: main.f: invalid instruction: 00087 (/Users/khr/gowork/tmp5.go:8)   MOVUPS  main.x+224(AX), X0

Comment From: randall77

Those instructions are invalid because they include references to local symbols, and local symbols have to have a base register of SP (not AX).

The reason the base register is wrong is that after my CL, the zeroing operation for the argument slot for t needs SP copied to a non-SP register, in this case AX. So after the zeroing operation, the SP value is now in 2 registers, SP and AX. The subsequent copying of x to its argument slot chooses the wrong copy of SP.

So this really isn't a bug in my CL, it is a latent bug in regalloc that my CL triggers.

Comment From: gopherbot

Change https://go.dev/cl/692395 mentions this issue: cmd/compile: enforce that locals are always accessed with SP base register

Comment From: dims

thanks @randall77 !