Hello,

I try to rebuild CoreOS from source in a docker container but continuously 
run in a problem compiling rkt, running out of threads.
Strangely enough, the problem does not occur when emerge-amd64-usr rkt is 
given, only in the build_package script.
ulimit -a shows: max user processes              (-u) 1048576      and
 cat /proc/sys/kernel/threads-max                         127276

Any ideas how to solve this?

Greetings Gerrit



Below the output:
>>> Emerging (96 of 179) app-misc/jq-1.5-r2::portage-stable for 
/build/amd64-usr/
>>> Failed to emerge app-emulation/rkt-1.7.0 for /build/amd64-usr/, Log 
file:
>>>  
'/build/amd64-usr/var/log/portage/app-emulation:rkt-1.7.0:20161006-204852.log'
>>> Installing (91 of 179) net-nds/rpcbind-0.2.0-r1::portage-stable to 
/build/amd64-usr/
>>> Installing (92 of 179) net-libs/libpcap-1.7.4::portage-stable to 
/build/amd64-usr/
>>> Installing (86 of 179) sys-kernel/coreos-sources-4.6.3::coreos to 
/build/amd64-usr/
>>> Installing (89 of 179) dev-cpp/gtest-1.7.0::portage-stable to 
/build/amd64-usr/
>>> Installing (96 of 179) app-misc/jq-1.5-r2::portage-stable to 
/build/amd64-usr/
>>> Installing (84 of 179) sys-libs/tevent-0.9.28::portage-stable to 
/build/amd64-usr/
>>> Installing (88 of 179) dev-db/sqlite-3.8.10.2::portage-stable to 
/build/amd64-usr/
>>> Installing (87 of 179) virtual/editor-0::portage-stable to 
/build/amd64-usr/
>>> Jobs: 95 of 179 complete, 1 failed              Load avg: 2.3, 7.8, 11.0
 * Package:    app-emulation/rkt-1.7.0
 * Repository: coreos
 * USE:        abi_x86_64 actool amd64 elibc_glibc kernel_linux 
rkt_stage1_coreos rkt_stage1_fly userland_GNU
 * FEATURES:   ccache compressdebug preserve-libs sandbox splitdebug 
userpriv usersandbox
 * Running stacked hooks for pre_pkg_setup
 *    sysroot_build_bin_dir ...
 [ ok ]
 * Running stacked hooks for pre_src_unpack
 *    python_multilib_setup ...
 [ ok ]
>>> Unpacking source...
 * Cloning /mnt/host/source/src/third_party/rkt
 * Checking out 9549a059c85915f1136a4ce1e7fdd7b8cf25fd08
Cloning into 
'/build/amd64-usr/var/tmp/portage/app-emulation/rkt-1.7.0/work/rkt-1.7.0'...
done.
>>> Source unpacked in 
/build/amd64-usr/var/tmp/portage/app-emulation/rkt-1.7.0/work
>>> Preparing source in 
/build/amd64-usr/var/tmp/portage/app-emulation/rkt-1.7.0/work/rkt-1.7.0 ...
 * Running eautoreconf in 
'/build/amd64-usr/var/tmp/portage/app-emulation/rkt-1.7.0/work/rkt-1.7.0' 
...
 * Running aclocal -I /build/amd64-usr/usr/share/aclocal ...
 [ ok ]
 * Running autoconf --force -I /build/amd64-usr/usr/share/aclocal ...
 [ ok ]
 * Running elibtoolize in: rkt-1.7.0/
>>> Source prepared.
>>> Configuring source in 
/build/amd64-usr/var/tmp/portage/app-emulation/rkt-1.7.0/work/rkt-1.7.0 ...
>>> Working in BUILD_DIR: 
"/build/amd64-usr/var/tmp/portage/app-emulation/rkt-1.7.0/work/rkt-1.7.0"
 * econf: updating rkt-1.7.0/config.guess with 
/usr/share/gnuconfig/config.guess
 * econf: updating rkt-1.7.0/config.sub with /usr/share/gnuconfig/config.sub
/build/amd64-usr/var/tmp/portage/app-emulation/rkt-1.7.0/work/rkt-1.7.0/configure
 
--prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-cros-linux-gnu 
--mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share 
--sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 
--docdir=/usr/share/doc/rkt-1.7.0 
--with-coreos-local-pxe-image-path=/build/amd64-usr/var/tmp/portage/app-emulation/rkt-1.7.0/distdir/rkt-pxe-1032.0.0.img
 
--with-coreos-local-pxe-image-systemd-version=vv229 --disable-tpm 
--with-stage1-flavors=coreos,fly 
--with-stage1-default-location=/usr/lib64/rkt/stage1-images/stage1-coreos.aci
configure: loading site script /usr/share/config.site
configure: loading site script /usr/share/crossdev/include/site/linux
configure: loading site script /usr/share/crossdev/include/site/linux-gnu
configure: loading site script 
/usr/share/crossdev/include/site/x86_64-linux-gnu
checking for bash... /bin/bash
checking for git... git
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-cros-linux-gnu
checking for x86_64-cros-linux-gnu-gcc... x86_64-cros-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-cros-linux-gnu-gcc accepts -g... yes
checking for x86_64-cros-linux-gnu-gcc option to accept ISO C89... none 
needed
checking how to run the C preprocessor... x86_64-cros-linux-gnu-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for cat... cat
checking for comm... comm
checking for cpio... cpio
checking for gzip... gzip
checking for md5sum... md5sum
checking for mktemp... mktemp
checking for sort... sort
checking for touch... touch
checking for unsquashfs... unsquashfs
checking for wget... wget
configure: WARNING: * fly is an experimental stage1 implementation with 
almost no isolation and less features
checking for acl/libacl.h... yes
checking for dlfcn.h... yes
checking for printf in -lc... yes
checking whether C library provides setns function... yes
checking for gpg... gpg
checking build golang arch... amd64
checking for fork in -lc... yes
checking for trousers/tss.h... no
checking for systemd/sd-journal.h... yes
checking for a BSD-compatible install... 
/usr/lib/portage/python2.7/ebuild-helpers/xattr/install -c
checking for file... file
checking for go... go
checking for gofmt... gofmt
checking for go... /usr/bin/go
checking whether we have go 1.5 or newer... yes
checking whether we have a go version without CVE-2015-8618... yes
configure: creating ./config.status
config.status: creating Makefile

        rkt 1.7.0

        stage1 setup

        type:                                   'flavor'
        default stage1 location:                
'/usr/lib64/rkt/stage1-images/stage1-coreos.aci'
        default stage1 images directory:        
'/usr/lib64/rkt/stage1-images'

        built stage1 flavors:                   'coreos,fly'
        default stage1 flavor:                  'coreos'
        implied default stage1 name:            
'coreos.com/rkt/stage1-coreos'
        implied default stage1 version:         '1.7.0'

        coreos/kvm flavor specific build parameters

        local CoreOS PXE image path:            
'/build/amd64-usr/var/tmp/portage/app-emulation/rkt-1.7.0/distdir/rkt-pxe-1032.0.0.img'
        local CoreOS PXE image systemd version: 'vv229'

        other build parameters

        functional tests enabled:               'no'
       features:                               '-TPM'
        go version:                             '1.5.4'
>>> Source configured.
>>> Compiling source in 
/build/amd64-usr/var/tmp/portage/app-emulation/rkt-1.7.0/work/rkt-1.7.0 ...
>>> Working in BUILD_DIR: 
"/build/amd64-usr/var/tmp/portage/app-emulation/rkt-1.7.0/work/rkt-1.7.0"
make --jobs=8 --load-average=16
  EXTRACT      
/build/amd64-usr/var/tmp/portage/app-emulation/rkt-1.7.0/distdir/rkt-pxe-1032.0.0.img
 
=> build-rkt-1.7.0/tmp/coreos-common/usr.squashfs
  CC           build-rkt-1.7.0/tools/enter
  CC           build-rkt-1.7.0/tools/enterexec
  MANIFEST     coreos
  CC           build-rkt-1.7.0/tools/prepare-app
  MANIFEST     fly
  GO           github.com/coreos/rkt/tools/depsgen
  GO           <Godeps>/github.com/appc/spec/actool
  GO           github.com/coreos/rkt/rkt
  GO           github.com/coreos/rkt/tools/filelistgen
  GO           github.com/coreos/rkt/tools/cleangen
  GO           github.com/coreos/rkt/stage1/gc
  GO           <Godeps>/github.com/containernetworking/cni/plugins/main/ptp
  GO           github.com/coreos/rkt/stage1/init
  GO           
<Godeps>/github.com/containernetworking/cni/plugins/main/bridge
# github.com/containernetworking/cni/pkg/invoke
runtime: failed to create new OS thread (have 2 already; errno=11)
fatal error: newosproc
runtime stack:
runtime.throw(0x81f8f0, 0x9)
        /usr/lib/go/src/runtime/panic.go:527 +0x90
runtime.newosproc(0xc820056000, 0xc820065fc0)
        /usr/lib/go/src/runtime/os1_linux.go:150 +0x1ab
runtime.newm(0x89b8f8, 0x0)
        /usr/lib/go/src/runtime/proc1.go:1113 +0x130
runtime.main.func1()
        /usr/lib/go/src/runtime/proc.go:48 +0x2c
runtime.systemstack(0xc80c40)
        /usr/lib/go/src/runtime/asm_amd64.s:262 +0x79
runtime.mstart()
        /usr/lib/go/src/runtime/proc1.go:668

goroutine 1 [running]:
runtime.systemstack_switch()
        /usr/lib/go/src/runtime/asm_amd64.s:216 fp=0xc820050770 
sp=0xc820050768
runtime.main()
        /usr/lib/go/src/runtime/proc.go:49 +0x62 fp=0xc8200507c0 
sp=0xc820050770
runtime.goexit()
        /usr/lib/go/src/runtime/asm_amd64.s:1721 +0x1 fp=0xc8200507c8 
sp=0xc8200507c0
# github.com/spf13/pflag
runtime: failed to create new OS thread (have 10 already; errno=11)
fatal error: newosproc



Reply via email to