kubernetes: docs/README: make/build fails with when running make on a system with 4GB of RAM
Is this a BUG REPORT or FEATURE REQUEST?:
This needs updating with the memory requirements https://github.com/kubernetes/kubernetes#to-start-developing-kubernetes
What happened: make/build on kubernetes repo failed with fatal error: runtime: out of memory
What you expected to happen: make to pass How to reproduce it (as minimally and precisely as possible): $ go get -d k8s.io/kubernetes $ cd $GOPATH/src/k8s.io/kubernetes $ make Anything else we need to know?: :~/go/src/k8s.io/kubernetes$ make +++ [0626 06:46:31] Building go targets for linux/amd64: ./vendor/k8s.io/code-generator/cmd/deepcopy-gen +++ [0626 06:46:47] Building go targets for linux/amd64: ./vendor/k8s.io/code-generator/cmd/defaulter-gen +++ [0626 06:46:55] Building go targets for linux/amd64: ./vendor/k8s.io/code-generator/cmd/conversion-gen +++ [0626 06:47:04] Building go targets for linux/amd64: ./vendor/k8s.io/code-generator/cmd/openapi-gen +++ [0626 06:47:16] Building go targets for linux/amd64: ./vendor/github.com/jteeuwen/go-bindata/go-bindata +++ [0626 06:47:18] Building go targets for linux/amd64: cmd/kube-proxy cmd/kube-apiserver cmd/kube-controller-manager cmd/cloud-controller-manager cmd/kubelet cmd/kubeadm cmd/hyperkube cmd/kube-scheduler vendor/k8s.io/kube-aggregator vendor/k8s.io/apiextensions-apiserver cluster/gce/gci/mounter cmd/kubectl cmd/gendocs cmd/genkubedocs cmd/genman cmd/genyaml cmd/genswaggertypedocs cmd/linkcheck vendor/github.com/onsi/ginkgo/ginkgo test/e2e/e2e.test cmd/kubemark vendor/github.com/onsi/ginkgo/ginkgo test/e2e_node/e2e_node.test /usr/local/go/pkg/tool/linux_amd64/link: signal: killed
k8s.io/kubernetes/cmd/genman
fatal error: runtime: out of memory
runtime stack: runtime.throw(0x5fda68, 0x16) /usr/local/go/src/runtime/panic.go:616 +0x81 runtime.sysMap(0xc4674d0000, 0x100000, 0x548f00, 0x7178d8) /usr/local/go/src/runtime/mem_linux.go:216 +0x20a runtime.(*mheap).sysAlloc(0x6fef40, 0x100000, 0x7f745d115c98) /usr/local/go/src/runtime/malloc.go:470 +0xd4 runtime.(*mheap).grow(0x6fef40, 0x1f, 0x0) /usr/local/go/src/runtime/mheap.go:907 +0x60 runtime.(*mheap).allocSpanLocked(0x6fef40, 0x1f, 0x7178e8, 0x7ffd7fcc8a40) /usr/local/go/src/runtime/mheap.go:820 +0x301 runtime.(*mheap).alloc_m(0x6fef40, 0x1f, 0x410100, 0xc41dc5a3ff) /usr/local/go/src/runtime/mheap.go:686 +0x118 runtime.(*mheap).alloc.func1() /usr/local/go/src/runtime/mheap.go:753 +0x4d runtime.(*mheap).alloc(0x6fef40, 0x1f, 0x7ffd7f010100, 0x412e8c) /usr/local/go/src/runtime/mheap.go:752 +0x8a runtime.largeAlloc(0x3c8c0, 0x440001, 0x7f745da5a6c8) /usr/local/go/src/runtime/malloc.go:826 +0x94 runtime.mallocgc.func1() /usr/local/go/src/runtime/malloc.go:721 +0x46 runtime.systemstack(0x0) /usr/local/go/src/runtime/asm_amd64.s:409 +0x79 runtime.mstart() /usr/local/go/src/runtime/proc.go:1175
goroutine 1 [running]: runtime.systemstack_switch() /usr/local/go/src/runtime/asm_amd64.s:363 fp=0xc42062e390 sp=0xc42062e388 pc=0x451b50 runtime.mallocgc(0x3c8c0, 0x5f2780, 0x301, 0xc4552f01a0) /usr/local/go/src/runtime/malloc.go:720 +0x8a2 fp=0xc42062e430 sp=0xc42062e390 pc=0x40f5c2 runtime.makeslice(0x5f2780, 0x3e8, 0x3e8, 0xc5, 0x7174a0, 0xc466a34c00) /usr/local/go/src/runtime/slice.go:61 +0x77 fp=0xc42062e460 sp=0xc42062e430 pc=0x43e247 cmd/link/internal/sym.(*Symbols).Newsym(…) /usr/local/go/src/cmd/link/internal/sym/symbols.go:56 cmd/link/internal/sym.(*Symbols).Lookup(0xc42050e000, 0xc4674b0ea0, 0xc5, 0x0, 0xc4674967c8) /usr/local/go/src/cmd/link/internal/sym/symbols.go:79 +0x299 fp=0xc42062e4c8 sp=0xc42062e460 pc=0x4d71a9 cmd/link/internal/objfile.(*objReader).readRef(0xc42062e8a0) /usr/local/go/src/cmd/link/internal/objfile/objfile.go:390 +0x10d fp=0xc42062e5f0 sp=0xc42062e4c8 pc=0x4f7b0d cmd/link/internal/objfile.(*objReader).loadObjFile(0xc42062e8a0) /usr/local/go/src/cmd/link/internal/objfile/objfile.go:109 +0x2ce fp=0xc42062e7e8 sp=0xc42062e5f0 pc=0x4f4f3e cmd/link/internal/objfile.Load(0x6ed3a0, 0xc42050e000, 0xc436847c50, 0xc44341c240, 0x88bb8, 0xc447614150, 0x2b) /usr/local/go/src/cmd/link/internal/objfile/objfile.go:69 +0x1a1 fp=0xc42062e9c8 sp=0xc42062e7e8 pc=0x4f4a61 cmd/link/internal/ld.ldobj(0xc420512000, 0xc436847c50, 0xc44341c240, 0x88c24, 0xc447614150, 0x2b, 0xc4205a8470, 0x23, 0x1, 0x0) /usr/local/go/src/cmd/link/internal/ld/lib.go:1515 +0xcb1 fp=0xc42062ec80 sp=0xc42062e9c8 pc=0x54f611 cmd/link/internal/ld.loadobjfile(0xc420512000, 0xc44341c240) /usr/local/go/src/cmd/link/internal/ld/lib.go:839 +0x50d fp=0xc42062ee68 sp=0xc42062ec80 pc=0x548fbd cmd/link/internal/ld.(*Link).loadlib(0xc420512000) /usr/local/go/src/cmd/link/internal/ld/lib.go:365 +0x183 fp=0xc42062f110 sp=0xc42062ee68 pc=0x545a33 cmd/link/internal/ld.Main(0x6ed3a0, 0x10, 0x20, 0x1, 0x7, 0x10, 0x5ff52e, 0x1b, 0x5fc864, 0x14, …) /usr/local/go/src/cmd/link/internal/ld/main.go:201 +0xa73 fp=0xc42062f2a0 sp=0xc42062f110 pc=0x55d4d3 main.main() /usr/local/go/src/cmd/link/main.go:62 +0x277 fp=0xc42062ff88 sp=0xc42062f2a0 pc=0x594ad7 runtime.main() /usr/local/go/src/runtime/proc.go:198 +0x212 fp=0xc42062ffe0 sp=0xc42062ff88 pc=0x429f62 runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc42062ffe8 sp=0xc42062ffe0 pc=0x454541 !!! [0626 06:57:13] Call tree: !!! [0626 06:57:13] 1: /home/hs/go/src/k8s.io/kubernetes/hack/lib/golang.sh:610 kube::golang::build_binaries_for_platform(…) !!! [0626 06:57:13] 2: hack/make-rules/build.sh:27 kube::golang::build_binaries(…) !!! [0626 06:57:13] Call tree: !!! [0626 06:57:13] 1: hack/make-rules/build.sh:27 kube::golang::build_binaries(…) !!! [0626 06:57:13] Call tree: !!! [0626 06:57:13] 1: hack/make-rules/build.sh:27 kube::golang::build_binaries(…) Makefile:92: recipe for target ‘all’ failed make: *** [all] Error 1
Environment:
-
Kubernetes version (use
kubectl version
): -
Cloud provider or hardware configuration:
-
OS (e.g. from /etc/os-release): cat /etc/os-release NAME=“Ubuntu” VERSION=“18.04 LTS (Bionic Beaver)” ID=ubuntu ID_LIKE=debian PRETTY_NAME=“Ubuntu 18.04 LTS” VERSION_ID=“18.04” HOME_URL=“https://www.ubuntu.com/” SUPPORT_URL=“https://help.ubuntu.com/” BUG_REPORT_URL=“https://bugs.launchpad.net/ubuntu/” PRIVACY_POLICY_URL=“https://www.ubuntu.com/legal/terms-and-policies/privacy-policy” VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic
-
Kernel (e.g.
uname -a
): Linux ubuntu 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux -
Install tools:
-
Others: hs@ubuntu:~/go/src/k8s.io/kubernetes$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 70 model name : Intel® Core™ i7-4770HQ CPU @ 2.20GHz stepping : 1 microcode : 0x19 cpu MHz : 2194.950 cache size : 6144 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm cpuid_fault epb invpcid_single pti tpr_shadow vnmi ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt dtherm ida arat pln pts bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass bogomips : 4389.90 clflush size : 64 cache_alignment : 64 address sizes : 42 bits physical, 48 bits virtual power management:
processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 70 model name : Intel® Core™ i7-4770HQ CPU @ 2.20GHz stepping : 1 microcode : 0x19 cpu MHz : 2194.950 cache size : 6144 KB physical id : 2 siblings : 1 core id : 0 cpu cores : 1 apicid : 2 initial apicid : 2 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm cpuid_fault epb invpcid_single pti tpr_shadow vnmi ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid xsaveopt dtherm ida arat pln pts bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass bogomips : 4389.90 clflush size : 64 cache_alignment : 64 address sizes : 42 bits physical, 48 bits virtual power management:
hs@ubuntu:~/go/src/k8s.io/kubernetes$ cat /proc/meminfo MemTotal: 4015684 kB MemFree: 2083896 kB MemAvailable: 2771800 kB Buffers: 23820 kB Cached: 850996 kB SwapCached: 38172 kB Active: 770756 kB Inactive: 507332 kB Active(anon): 268400 kB Inactive(anon): 141848 kB Active(file): 502356 kB Inactive(file): 365484 kB Unevictable: 32 kB Mlocked: 32 kB SwapTotal: 2097148 kB SwapFree: 1002904 kB Dirty: 276 kB Writeback: 0 kB AnonPages: 365608 kB Mapped: 276932 kB Shmem: 6976 kB Slab: 123420 kB SReclaimable: 50020 kB SUnreclaim: 73400 kB KernelStack: 14096 kB PageTables: 58320 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 4104988 kB Committed_AS: 6971756 kB VmallocTotal: 34359738367 kB VmallocUsed: 0 kB VmallocChunk: 0 kB HardwareCorrupted: 0 kB AnonHugePages: 0 kB ShmemHugePages: 0 kB ShmemPmdMapped: 0 kB CmaTotal: 0 kB CmaFree: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 489280 kB DirectMap2M: 3704832 kB DirectMap1G: 2097152 kB
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (5 by maintainers)
definitely not vmware related
/remove-sig vmware
This is probably a bug in go, not handling compilation and linking gracefully in memory-constrained situations. If you have access to a machine with more than 4G of memory, you may want to try using that instead.