cloudfoundry / bpm-release

isolated bosh jobs
Apache License 2.0
34 stars 28 forks source link

bpm release version 1.2.3 - bpm-runc compilation problem with stemcell 1.148 (currently latest) #161

Closed julweber closed 1 year ago

julweber commented 1 year ago

Dear bpm team,

we are trying to deploy the rabbitmq and cloud foundy bosh releases to our platforms and are experiencing a compilation error with the bpm release 1.2.3 and the stemcell (openstack) v1.148. I can verify that the compilation and deployments are working with stemcell version 1.125. So there seems to be a breaking change somewhere in between. We also tested the v1.147 stemcell and saw the same issues. The bosh compilation error is attached below.

Could you please have a look and try to tackle this issue? We are relying on the release for cf, redis and rabbitmq in our clusters and this is blocking the stemcell updates there currently.

Kind regards and thanks in advance Julian Weber

Compilation error:

Task 348894 | 11:10:23 | Compiling packages: bpm-runc/ea42f20821a04f3761055d5125e824afd7a236e5 (00:01:44)
                       L Error: Action Failed get_task: Task 52ee6da5-97e2-4e9b-5ffd-c9128b999e38 result: Compiling package bpm-runc: Running packaging script: Running packaging script: Command exited with 127; Truncated stdout: checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking for gcc... 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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /bin/nm -B
checking the name lister (/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -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 dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether make supports nested variables... (cached) yes
checking for linux/seccomp.h... yes
checking for cython3... no
checking for cython... no
checking for gperf... gperf
checking for cov-build... no
checking whether to build with code coverage support... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating libseccomp.pc
config.status: creating include/seccomp.h
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating src/Makefile
config.status: creating src/python/Makefile
config.status: creating tools/Makefile
config.status: creating tests/Makefile
config.status: creating doc/Makefile
config.status: creating configure.h
config.status: executing depfiles commands
config.status: executing libtool commands
make --quiet --no-print-directory all-recursive
Making all in include
Making all in src
Making all in .
  CC       libseccomp_la-api.lo
  CC       libseccomp_la-system.lo
  CC       libseccomp_la-helper.lo
  CC       libseccomp_la-gen_pfc.lo
  CC       libseccomp_la-gen_bpf.lo
  CC       libseccomp_la-hash.lo
  CC       libseccomp_la-db.lo
  CC       libseccomp_la-arch.lo
  CC       libseccomp_la-arch-x86.lo
  CC       libseccomp_la-arch-x86_64.lo
  CC       libseccomp_la-arch-x32.lo
  CC       libseccomp_la-arch-arm.lo
  CC       libseccomp_la-arch-aarch64.lo
  CC       libseccomp_la-arch-mips.lo
  CC       libseccomp_la-arch-mips64.lo
  CC       libseccomp_la-arch-mips64n32.lo
  CC       libseccomp_la-arch-parisc.lo
  CC       libseccomp_la-arch-parisc64.lo
  CC       libseccomp_la-arch-ppc.lo
  CC       libseccomp_la-arch-ppc64.lo
  CC       libseccomp_la-arch-riscv64.lo
  CC       libseccomp_la-arch-s390.lo
  CC       libseccomp_la-arch-s390x.lo
  CC       libseccomp_la-syscalls.lo
  CC       libseccomp_la-syscalls.perf.lo
  CCLD     libseccomp.la
Making all in tools
  CC       scmp_sys_resolver.o
  CCLD     scmp_sys_resolver
  CC       scmp_arch_detect.o
  CCLD     scmp_arch_detect
  CC       scmp_bpf_disasm.o
  CC       util.lo
  CCLD     util.la
  CCLD     scmp_bpf_disasm
  CC       scmp_bpf_sim.o
  CCLD     scmp_bpf_sim
  CC       scmp_api_level.o
  CCLD     scmp_api_level
Making all in tests
Making all in doc
Making install in include
 /bin/mkdir -p '/var/vcap/packages/bpm-runc/lib/libseccomp/include'
 /bin/install -c -m 644 seccomp.h seccomp-syscalls.h '/var/vcap/packages/bpm-runc/lib/libseccomp/include'
Making install in src
Making install in .
 /bin/mkdir -p '/var/vcap/packages/bpm-runc/lib/libseccomp/lib'
 /bin/bash ../libtool   --mode=install /bin/install -c   libseccomp.la '/var/vcap/packages/bpm-runc/lib/libseccomp/lib'
libtool: install: /bin/install -c .libs/libseccomp.so.2.5.1 /var/vcap/packages/bpm-runc/lib/libseccomp/lib/libseccomp.so.2.5.1
libtool: install: (cd /var/vcap/packages/bpm-runc/lib/libseccomp/lib && { ln -s -f libseccomp.so.2.5.1 libseccomp.so.2 || { rm -f libseccomp.so.2 && ln -s libseccomp.so.2.5.1 libseccomp.so.2; }; })
libtool: install: (cd /var/vcap/packages/bpm-runc/lib/libseccomp/lib && { ln -s -f libseccomp.so.2.5.1 libseccomp.so || { rm -f libseccomp.so && ln -s libseccomp.so.2.5.1 libseccomp.so; }; })
libtool: install: /bin/install -c .libs/libseccomp.lai /var/vcap/packages/bpm-runc/lib/libseccomp/lib/libseccomp.la
libtool: install: /bin/install -c .libs/libseccomp.a /var/vcap/packages/bpm-runc/lib/libseccomp/lib/libseccomp.a
libtool: install: chmod 644 /var/vcap/packages/bpm-runc/lib/libseccomp/lib/libseccomp.a
libtool: install: ranlib /var/vcap/packages/bpm-runc/lib/libseccomp/lib/libseccomp.a
libtool: finish: PATH="/var/vcap/packages/bpm-runc/gperf/bin:/var/vcap/packages/golang-1.20-linux/bin:/var/vcap/data/compile/bpm-runc/bin:/var/vcap/bosh/bin:/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin:/sbin" ldconfig -n /var/vcap/packages/bpm-runc/lib/libseccomp/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /var/vcap/packages/bpm-runc/lib/libseccomp/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Making install in tools
 /bin/mkdir -p '/var/vcap/packages/bpm-runc/lib/libseccomp/bin'
  /bin/bash ../libtool   --mode=install /bin/install -c scmp_sys_resolver '/var/vcap/packages/bpm-runc/lib/libseccomp/bin'
libtool: install: /bin/install -c .libs/scmp_sys_resolver /var/vcap/packages/bpm-runc/lib/libseccomp/bin/scmp_sys_resolver
Making install in tests
Making install in doc
 /bin/mkdir -p '/var/vcap/packages/bpm-runc/lib/libseccomp/share/man/man1'
 /bin/install -c -m 644 man/man1/scmp_sys_resolver.1 '/var/vcap/packages/bpm-runc/lib/libseccomp/share/man/man1'
 /bin/mkdir -p '/var/vcap/packages/bpm-runc/lib/libseccomp/share/man/man3'
 /bin/install -c -m 644 man/man3/seccomp_arch_add.3 man/man3/seccomp_arch_exist.3 man/man3/seccomp_arch_native.3 man/man3/seccomp_arch_remove.3 man/man3/seccomp_arch_resolve_name.3 man/man3/seccomp_attr_get.3 man/man3/seccomp_attr_set.3 man/man3/seccomp_export_bpf.3 man/man3/seccomp_export_pfc.3 man/man3/seccomp_init.3 man/man3/seccomp_load.3 man/man3/seccomp_merge.3 man/man3/seccomp_release.3 man/man3/seccomp_reset.3 man/man3/seccomp_rule_add.3 man/man3/seccomp_rule_add_array.3 man/man3/seccomp_rule_add_exact.3 man/man3/seccomp_rule_add_exact_array.3 man/man3/seccomp_notify_alloc.3 man/man3/seccomp_notify_fd.3 man/man3/seccomp_notify_free.3 man/man3/seccomp_notify_id_valid.3 man/man3/seccomp_notify_receive.3 man/man3/seccomp_notify_respond.3 man/man3/seccomp_syscall_priority.3 man/man3/seccomp_syscall_resolve_name.3 man/man3/seccomp_syscall_resolve_name_arch.3 man/man3/seccomp_syscall_resolve_name_rewrite.3 man/man3/seccomp_syscall_resolve_num_arch.3 man/man3/seccomp_version.3 man/man3/seccomp_api_get.3 man/man3/seccomp_api_set.3 '/var/vcap/packages/bpm-runc/lib/libseccomp/share/man/man3'
 /bin/mkdir -p '/var/vcap/packages/bpm-runc/lib/libseccomp/lib/pkgconfig'
 /bin/install -c -m 644 libseccomp.pc '/var/vcap/packages/bpm-runc/lib/libseccomp/lib/pkgconfig'
/var/vcap/data/compile/bpm-runc/runc-1.1.7 /var/vcap/data/compile/bpm-runc
, Stderr: + source /var/vcap/packages/golang-1-linux/bosh/compile.env
++ '[' -z '' ']'
+++ readlink -nf /var/vcap/packages/golang-1.20-linux
++ export GOROOT=/var/vcap/packages/golang-1.20-linux
++ GOROOT=/var/vcap/packages/golang-1.20-linux
++ export GOPATH=/var/vcap/data/compile/bpm-runc
++ GOPATH=/var/vcap/data/compile/bpm-runc
++ export GOCACHE=/var/vcap/data/golang-1.20-linux/cache
++ GOCACHE=/var/vcap/data/golang-1.20-linux/cache
++ export PATH=/var/vcap/packages/golang-1.20-linux/bin:/var/vcap/data/compile/bpm-runc/bin:/var/vcap/bosh/bin:/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
++ PATH=/var/vcap/packages/golang-1.20-linux/bin:/var/vcap/data/compile/bpm-runc/bin:/var/vcap/bosh/bin:/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
++ ls runc/runc-1.1.7.tar.xz
++ sed 's/runc\/runc-//'
++ sed s/.tar.xz//
+ RUNC_VERSION=1.1.7
+ PKG_CONFIG_VERSION=0.29.2
++ mktemp -d
+ PKG_CONFIG_PREFIX=/var/vcap/data/tmp/tmp.zwaUFqEMDB
+ GPERF_VERSION=3.1
+ GPERF_PREFIX=/var/vcap/packages/bpm-runc/gperf
+ LIBSECCOMP_PREFIX=/var/vcap/packages/bpm-runc/lib/libseccomp
+ LIBSECCOMP_RUNTIME_PATH=/var/vcap/packages/bpm/lib/libseccomp/lib
+ LIBSECCOMP_VERSION=2.5.1
+ RUNC_PACKAGE_PATH=github.com/opencontainers/runc
+ set -eu
+ tar xf pkg-config/pkg-config-0.29.2.tar.gz
+ cd pkg-config-0.29.2
+ ./configure --prefix=/var/vcap/data/tmp/tmp.zwaUFqEMDB --with-internal-glib
+ make
ar: `u' modifier ignored since `D' is the default (see `U')
gbacktrace.c: In function 'g_on_error_query':
gbacktrace.c:177:5: warning: ignoring return value of 'fgets' declared with attribute 'warn_unused_result' [-Wunused-result]
  177 |     fgets (buf, 8, stdin);
      |     ^~~~~~~~~~~~~~~~~~~~~
gbacktrace.c: In function 'stack_trace':
gbacktrace.c:301:18: warning: ignoring return value of 'dup' declared with attribute 'warn_unused_result' [-Wunused-result]
  301 |       close (0); dup (in_fd[0]);   /* set the stdin to the in pipe */
      |                  ^~~~~~~~~~~~~~
gbacktrace.c:302:18: warning: ignoring return value of 'dup' declared with attribute 'warn_unused_result' [-Wunused-result]
  302 |       close (1); dup (out_fd[1]);  /* set the stdout to the out pipe */
      |                  ^~~~~~~~~~~~~~~
gbacktrace.c:303:18: warning: ignoring return value of 'dup' declared with attribute 'warn_unused_result' [-Wunused-result]
  303 |       close (2); dup (out_fd[1]);  /* set the stderr to the out pipe */
      |                  ^~~~~~~~~~~~~~~
gbacktrace.c:318:3: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  318 |   write (in_fd[1], "backtrace\n", 10);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gbacktrace.c:319:3: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  319 |   write (in_fd[1], "p x = 0\n", 8);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gbacktrace.c:320:3: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
  320 |   write (in_fd[1], "quit\n", 5);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ggettext.c:30:
ggettext.c: In function 'ensure_gettext_initialized':
glibintl.h:37:42: warning: statement with no effect [-Wunused-value]
   37 | #define bindtextdomain(Domain,Directory) (Domain)
      |                                          ^
ggettext.c:109:7: note: in expansion of macro 'bindtextdomain'
  109 |       bindtextdomain (GETTEXT_PACKAGE, GLIB_LOCALE_DIR);
      |       ^~~~~~~~~~~~~~
ar: `u' modifier ignored since `D' is the default (see `U')
+ make install prefix=/var/vcap/data/tmp/tmp.zwaUFqEMDB
+ set -eu
+ tar xf gperf/gperf-3.1.tar.gz
+ cd gperf-3.1
+ ./configure --prefix=/var/vcap/packages/bpm-runc/gperf
+ make
./getline.cc: In function 'int getstr(char**, size_t*, FILE*, char, size_t)':
./getline.cc:58:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   58 |       register int c = getc (stream);
      |                    ^
+ make install
+ set -eu
+ export PATH=/var/vcap/packages/bpm-runc/gperf/bin:/var/vcap/packages/golang-1.20-linux/bin:/var/vcap/data/compile/bpm-runc/bin:/var/vcap/bosh/bin:/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
+ PATH=/var/vcap/packages/bpm-runc/gperf/bin:/var/vcap/packages/golang-1.20-linux/bin:/var/vcap/data/compile/bpm-runc/bin:/var/vcap/bosh/bin:/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
+ tar xf libseccomp/libseccomp-2.5.1.tar.gz
+ cd libseccomp-2.5.1
+ ./configure --prefix=/var/vcap/packages/bpm-runc/lib/libseccomp
+ make
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')
+ make install
+ set -eu
+ export PATH=/var/vcap/data/tmp/tmp.zwaUFqEMDB/bin:/var/vcap/packages/golang-1.20-linux/bin:/var/vcap/data/compile/bpm-runc/bin:/var/vcap/bosh/bin:/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
+ PATH=/var/vcap/data/tmp/tmp.zwaUFqEMDB/bin:/var/vcap/packages/golang-1.20-linux/bin:/var/vcap/data/compile/bpm-runc/bin:/var/vcap/bosh/bin:/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
+ tar xf runc/runc-1.1.7.tar.xz
+ set -eu
+ pushd runc-1.1.7
+ env PKG_CONFIG_PATH=/var/vcap/packages/bpm-runc/lib/libseccomp/lib/pkgconfig GOPROXY=off go build -buildmode=pie -ldflags '-X main.gitCommit=unknown -X main.version=1.1.7-bpm -r /var/vcap/packages/bpm/lib/libseccomp/lib' -tags 'seccomp apparmor' -mod=vendor -o /var/vcap/packages/bpm-runc/bin/runc .
env: 'go': No such file or directory
jpalermo commented 1 year ago

Tested on Jammy 1.148 and BPM 1.2.3 in the following configurations

I wasn't able to reproduce the compilation issue in any of these configurations. Any other variables you think might be causing the problem?

julweber commented 1 year ago

Hey @jpalermo ,

thanks for investigating. It seems that the release tgz that was uploaded to our blobstore was corrupted somehow.

Also we upgraded to version 1.2.4, which is working fine for us.

Sorry for the inconvenience and thanks for checking that fast again.

Kind regards, Julian