{"action":"opened","issue":{"url":"https://api.github.com/repos/mfanjie/tips/issues/6","repository_url":"https://api.github.com/repos/mfanjie/tips","labels_url":"https://api.github.com/repos/mfanjie/tips/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/mfanjie/tips/issues/6/comments","events_url":"https://api.github.com/repos/mfanjie/tips/issues/6/events","html_url":"https://github.com/mfanjie/tips/issues/6","id":133856942,"number":6,"title":"kubernetes build with error of cannot allocate memory","user":{"login":"mfanjie","id":16643108,"avatar_url":"https://avatars.githubusercontent.com/u/16643108?v=3","gravatar_id":"","url":"https://api.github.com/users/mfanjie","html_url":"https://github.com/mfanjie","followers_url":"https://api.github.com/users/mfanjie/followers","following_url":"https://api.github.com/users/mfanjie/following{/other_user}","gists_url":"https://api.github.com/users/mfanjie/gists{/gist_id}","starred_url":"https://api.github.com/users/mfanjie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfanjie/subscriptions","organizations_url":"https://api.github.com/users/mfanjie/orgs","repos_url":"https://api.github.com/users/mfanjie/repos","events_url":"https://api.github.com/users/mfanjie/events{/privacy}","received_events_url":"https://api.github.com/users/mfanjie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-16T01:23:04Z","updated_at":"2016-02-16T01:23:04Z","closed_at":null,"body":"make quick-release\r\nKUBE_RELEASE_RUN_TESTS=n build/release.sh\r\n+++ [0215 16:31:11] Verifying Prerequisites....\r\n+++ [0215 16:31:11] No docker host is set. Checking options for setting one...\r\n+++ [0215 16:31:11] docker-machine was found.\r\nHost does not exist: \"kube-dev\"\r\n+++ [0215 16:31:11] Creating a machine to build Kubernetes\r\nMachine \"kube-dev\" is already running.\r\nbuild/../build/common.sh: line 178: DOCKER_MACHINE_NAME: readonly variable\r\n+++ [0215 16:32:04] A Docker host using docker-machine named 'kube-dev' is ready to go!\r\nYou don't have a local copy of the golang:1.5.3 docker image. This image is 450MB.\r\nDownload it now? [y/n] y\r\n\r\n+++ [0215 16:32:08] Pulling docker image: golang:1.5.3\r\n1.5.3: Pulling from library/golang\r\ndbacfa057b30: Pull complete \r\n7a01cc5f27b1: Pull complete \r\n3842411e5c4c: Pull complete \r\nd6fc4b5b4917: Pull complete \r\n610726ff984a: Pull complete \r\n4848229cb7ad: Pull complete \r\ndba29d279e3d: Pull complete \r\n7092bf398df8: Pull complete \r\n4539bbd9c182: Pull complete \r\n6f86fa67be2a: Pull complete \r\n108e13e4582b: Pull complete \r\n0e5813b3a018: Pull complete \r\n75f7c96e22b6: Pull complete \r\n12057194b5fc: Pull complete \r\nDigest: sha256:d7d0d2c60393ae5b3315bfe0b4eb3770b460c276cdfb9dd32d69e03db159e00e\r\nStatus: Downloaded newer image for golang:1.5.3\r\n+++ [0215 16:39:06] Building Docker image kube-build:cross-1.5.3-1.\r\n+++ [0215 16:49:25] Building Docker image kube-build:build-b4a36a2a04.\r\n+++ [0215 16:51:42] Running build command....\r\n+++ [0215 16:51:42] Creating data container\r\n+++ [0215 08:51:43] Multiple platforms requested, but available 0G < threshold 11G, building platforms in serial\r\n+++ [0215 08:51:43] Building go targets for linux/amd64:\r\n    cmd/kube-proxy\r\n    cmd/kube-apiserver\r\n    cmd/kube-controller-manager\r\n    cmd/kubelet\r\n    cmd/kubemark\r\n    cmd/hyperkube\r\n    cmd/linkcheck\r\n    plugin/cmd/kube-scheduler\r\n# k8s.io/kubernetes/cmd/kubelet\r\n/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: fork/exec /usr/bin/gcc: cannot allocate memory\r\n\r\n# k8s.io/kubernetes/cmd/hyperkube\r\n/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: fork/exec /usr/bin/gcc: cannot allocate memory\r\n\r\n!!! Error in /go/src/k8s.io/kubernetes/hack/lib/golang.sh:395\r\n  'go install \"${goflags[@]:+${goflags[@]}}\" -ldflags \"${goldflags}\" \"${nonstatics[@]:+${nonstatics[@]}}\"' exited with status 2\r\nCall stack:\r\n  1: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:395 kube::golang::build_binaries_for_platform(...)\r\n  2: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:536 kube::golang::build_binaries(...)\r\n  3: hack/build-cross.sh:28 main(...)\r\nExiting with status 1\r\n!!! Error in /go/src/k8s.io/kubernetes/hack/lib/golang.sh:457\r\n  '( kube::golang::setup_env; local host_platform; host_platform=$(kube::golang::host_platform); local goflags goldflags; eval \"goflags=(${KUBE_GOFLAGS:-})\"; goldflags=\"${KUBE_GOLDFLAGS:-} $(kube::version::ldflags)\"; local use_go_build; local -a targets=(); local arg; for arg in \"$@\";\r\ndo\r\n    if [[ \"${arg}\" == \"--use_go_build\" ]]; then\r\n        use_go_build=true;\r\n    else\r\n        if [[ \"${arg}\" == -* ]]; then\r\n            goflags+=(\"${arg}\");\r\n        else\r\n            targets+=(\"${arg}\");\r\n        fi;\r\n    fi;\r\ndone; if [[ ${#targets[@]} -eq 0 ]]; then\r\n    targets=(\"${KUBE_ALL_TARGETS[@]}\");\r\nfi; local -a platforms=(\"${KUBE_BUILD_PLATFORMS[@]:+${KUBE_BUILD_PLATFORMS[@]}}\"); if [[ ${#platforms[@]} -eq 0 ]]; then\r\n    platforms=(\"${host_platform}\");\r\nfi; local binaries; binaries=($(kube::golang::binaries_from_targets \"${targets[@]}\")); local parallel=false; if [[ ${#platforms[@]} -gt 1 ]]; then\r\n    local gigs; gigs=$(kube::golang::get_physmem); if [[ ${gigs} -ge ${KUBE_PARALLEL_BUILD_MEMORY} ]]; then\r\n        kube::log::status \"Multiple platforms requested and available ${gigs}G >= threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in parallel\"; parallel=true;\r\n    else\r\n        kube::log::status \"Multiple platforms requested, but available ${gigs}G < threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in serial\"; parallel=false;\r\n    fi;\r\nfi; if [[ \"${parallel}\" == \"true\" ]]; then\r\n    kube::log::status \"Building go targets for ${platforms[@]} in parallel (output will appear in a burst when complete):\" \"${targets[@]}\"; local platform; for platform in \"${platforms[@]}\";\r\n    do\r\n        ( kube::golang::set_platform_envs \"${platform}\"; kube::log::status \"${platform}: go build started\"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-}; kube::log::status \"${platform}: go build finished\" ) &> \"/tmp//${platform//\\//_}.build\" &\r\n    done; local fails=0; for job in $(jobs -p);\r\n    do\r\n        wait ${job} || let \"fails+=1\";\r\n    done; for platform in \"${platforms[@]}\";\r\n    do\r\n        cat \"/tmp//${platform//\\//_}.build\";\r\n    done; exit ${fails};\r\nelse\r\n    for platform in \"${platforms[@]}\";\r\n    do\r\n        kube::log::status \"Building go targets for ${platform}:\" \"${targets[@]}\"; kube::golang::set_platform_envs \"${platform}\"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-};\r\n    done;\r\nfi )' exited with status 1\r\nCall stack:\r\n  1: /go/src/k8s.io/kubernetes/hack/lib/golang.sh:457 kube::golang::build_binaries(...)\r\n  2: hack/build-cross.sh:28 main(...)\r\nExiting with status 1\r\n!!! Error in build/../build/common.sh:567\r\n  '\"${docker_cmd[@]}\" \"$@\"' exited with status 1\r\nCall stack:\r\n  1: build/../build/common.sh:567 kube::build::run_build_command(...)\r\n  2: build/release.sh:32 main(...)\r\nExiting with status 1\r\nmake: *** [quick-release] Error 1\r\n"}}