Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failing trying to build envoy with bazel #21983

Closed
shavros opened this issue Jul 1, 2022 · 10 comments
Closed

failing trying to build envoy with bazel #21983

shavros opened this issue Jul 1, 2022 · 10 comments
Labels
area/build stale stalebot believes this issue/PR has not been touched recently

Comments

@shavros
Copy link

shavros commented Jul 1, 2022

If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via emailing
[email protected] where the issue will be triaged appropriately.

Title: One line description

Description:
A few months ago I built envoy with bazel successfully.
Now I tried several times, but every build ends with same error:
Снимок экрана 2022-07-01 в 13 40 40

[optional Relevant Links:]

root@vm-env:~# uname -a
Linux vm-env 5.4.0-99-generic #112-Ubuntu SMP Thu Feb 3 13:50:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

root@vm-env:~ # gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.

@shavros shavros added the triage Issue requires triage label Jul 1, 2022
@shavros
Copy link
Author

shavros commented Jul 1, 2022

additional:
I'm cloning main branch of envoy repository and do all steps from bazel/README.md

@shavros
Copy link
Author

shavros commented Jul 1, 2022

root@vm-env:~/envoy# cat VERSION.txt
1.23.0-dev

@phlax
Copy link
Member

phlax commented Jul 1, 2022

hi @shavros please post actual log not screenshots - use ``` to mark code-blocks

@phlax
Copy link
Member

phlax commented Jul 1, 2022

could you also post the exact command that fails

@shavros
Copy link
Author

shavros commented Jul 1, 2022

command that fails:
bazel build envoy

log:

ERROR: /root/envoy/source/common/quic/BUILD:165:17: Compiling source/common/quic/client_connection_factory_impl.cc failed: (Exit 1): gcc failed: error executing command (from target //source/common/quic:client_connection_factory_lib) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 188 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox
gcc: fatal error: Killed signal terminated program cc1plus
compilation terminated.
Target //source/exe:envoy-static failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 355.748s, Critical Path: 56.13s
INFO: 54 processes: 4 internal, 50 linux-sandbox.
FAILED: Build did NOT complete successfully

@daixiang0
Copy link
Member

Could you add --sandbox_debug to share more details?

@bryanwux
Copy link
Contributor

bryanwux commented Jul 4, 2022

Have you tried to build envoy with docker container using ENVOY_DOCKER_BUILD_DIR=~/build ./ci/run_envoy_docker.sh './ci/do_ci.sh bazel.debug.server_only'

@wbpcode wbpcode added area/build and removed triage Issue requires triage labels Jul 5, 2022
@shavros
Copy link
Author

shavros commented Jul 5, 2022

@daixiang0 logs with --sandbox-debug flag:

ERROR: /root/envoy/source/common/upstream/BUILD:77:17: Compiling source/common/upstream/cluster_manager_impl.cc failed: (Exit 1): linux-sandbox failed: error executing command 
  (cd /root/.cache/bazel/_bazel_root/4e47b77d977b209382cf04b3ae32963e/sandbox/linux-sandbox/6800/execroot/envoy && \
  exec env - \
    BAZEL_LINKLIBS=-l%:libstdc++.a \
    BAZEL_LINKOPTS=-lm \
    PATH=/root/.cache/bazelisk/downloads/bazelbuild/bazel-6.0.0-pre.20220421.3-linux-x86_64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin \
    PWD=/proc/self/cwd \
    TMPDIR=/tmp \
  /root/.cache/bazel/_bazel_root/install/105cdae8e95eaae9b55d5e684bad8944/linux-sandbox -t 15 -w /root/.cache/bazel/_bazel_root/4e47b77d977b209382cf04b3ae32963e/sandbox/linux-sandbox/6800/execroot/envoy -w /tmp -w /dev/shm -D -- /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF bazel-out/k8-fastbuild/bin/source/common/upstream/_objs/cluster_manager_lib/cluster_manager_impl.pic.d '-frandom-seed=bazel-out/k8-fastbuild/bin/source/common/upstream/_objs/cluster_manager_lib/cluster_manager_impl.pic.o' -fPIC -DFMT_HEADER_ONLY -DSPDLOG_FMT_EXTERNAL -DNGHTTP2_STATICLIB -DCARES_STATICLIB '-DGRPC_XDS_USER_AGENT_SUFFIX=C++' -iquote . -iquote bazel-out/k8-fastbuild/bin -iquote external/com_google_absl -iquote bazel-out/k8-fastbuild/bin/external/com_google_absl -iquote external/com_github_fmtlib_fmt -iquote bazel-out/k8-fastbuild/bin/external/com_github_fmtlib_fmt -iquote external/envoy_api -iquote bazel-out/k8-fastbuild/bin/external/envoy_api -iquote external/com_google_googleapis -iquote bazel-out/k8-fastbuild/bin/external/com_google_googleapis -iquote external/com_google_protobuf -iquote bazel-out/k8-fastbuild/bin/external/com_google_protobuf -iquote external/com_envoyproxy_protoc_gen_validate -iquote bazel-out/k8-fastbuild/bin/external/com_envoyproxy_protoc_gen_validate -iquote external/com_googlesource_code_re2 -iquote bazel-out/k8-fastbuild/bin/external/com_googlesource_code_re2 -iquote external/com_github_cncf_udpa -iquote bazel-out/k8-fastbuild/bin/external/com_github_cncf_udpa -iquote external/opencensus_proto -iquote bazel-out/k8-fastbuild/bin/external/opencensus_proto -iquote external/com_github_gabime_spdlog -iquote bazel-out/k8-fastbuild/bin/external/com_github_gabime_spdlog -iquote external/com_github_cyan4973_xxhash -iquote bazel-out/k8-fastbuild/bin/external/com_github_cyan4973_xxhash -iquote external/com_github_jbeder_yaml_cpp -iquote bazel-out/k8-fastbuild/bin/external/com_github_jbeder_yaml_cpp -iquote external/boringssl -iquote bazel-out/k8-fastbuild/bin/external/boringssl -iquote external/envoy -iquote bazel-out/k8-fastbuild/bin/external/envoy -iquote external/com_googlesource_googleurl -iquote bazel-out/k8-fastbuild/bin/external/com_googlesource_googleurl -iquote external/com_github_circonus_labs_libcircllhist -iquote bazel-out/k8-fastbuild/bin/external/com_github_circonus_labs_libcircllhist -iquote external/com_github_nlohmann_json -iquote bazel-out/k8-fastbuild/bin/external/com_github_nlohmann_json -iquote external/com_github_google_tcmalloc -iquote bazel-out/k8-fastbuild/bin/external/com_github_google_tcmalloc -iquote external/com_github_google_quiche -iquote bazel-out/k8-fastbuild/bin/external/com_github_google_quiche -iquote external/com_github_grpc_grpc -iquote bazel-out/k8-fastbuild/bin/external/com_github_grpc_grpc -iquote external/upb -iquote bazel-out/k8-fastbuild/bin/external/upb -Ibazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_includes/any_proto -Ibazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_includes/descriptor_proto -Ibazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_includes/duration_proto -Ibazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_includes/empty_proto -Ibazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_includes/struct_proto -Ibazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_includes/timestamp_proto -Ibazel-out/k8-fastbuild/bin/external/com_google_protobuf/_virtual_includes/wrappers_proto -Ibazel-out/k8-fastbuild/bin/source/common/common/_virtual_includes/logger_impl_lib_standard -Ibazel-out/k8-fastbuild/bin/source/common/common/_virtual_includes/thread_impl_lib_posix -Ibazel-out/k8-fastbuild/bin/source/common/api/_virtual_includes/os_sys_calls_lib -Ibazel-out/k8-fastbuild/bin/source/common/event/_virtual_includes/dispatcher_lib -Ibazel-out/k8-fastbuild/bin/source/common/event/_virtual_includes/signal_impl_lib_posix -Ibazel-out/k8-fastbuild/bin/source/common/filesystem/_virtual_includes/watcher_lib -Ibazel-out/k8-fastbuild/bin/source/common/quic/platform/_virtual_includes/quiche_export_impl_lib -Ibazel-out/k8-fastbuild/bin/source/common/quic/platform/_virtual_includes/quiche_logging_impl_lib -Ibazel-out/k8-fastbuild/bin/external/com_github_google_quiche/_virtual_includes/quiche_common_platform_default_quiche_platform_impl_command_line_flags_impl_lib -Ibazel-out/k8-fastbuild/bin/external/com_github_google_quiche/_virtual_includes/quiche_common_platform_default_quiche_platform_impl_flag_utils_impl_lib -Ibazel-out/k8-fastbuild/bin/external/com_github_google_quiche/_virtual_includes/quiche_common_platform_default_quiche_platform_impl_reference_counted_impl_lib -Ibazel-out/k8-fastbuild/bin/external/com_github_google_quiche/_virtual_includes/quiche_common_platform_default_quiche_platform_impl_testvalue_impl_lib -Ibazel-out/k8-fastbuild/bin/external/com_github_google_quiche/_virtual_includes/quiche_common_platform_default_quiche_platform_impl_thread_local_impl_lib -Ibazel-out/k8-fastbuild/bin/external/com_github_google_quiche/_virtual_includes/quiche_common_platform_default_quiche_platform_impl_time_utils_impl_lib -Ibazel-out/k8-fastbuild/bin/external/com_github_google_quiche/_virtual_includes/quiche_common_platform_default_quiche_platform_impl_prefetch_impl_lib -Ibazel-out/k8-fastbuild/bin/source/common/quic/platform/_virtual_includes/quic_base_impl_lib -Ibazel-out/k8-fastbuild/bin/source/common/quic/platform/_virtual_includes/quiche_flags_impl_lib -Ibazel-out/k8-fastbuild/bin/source/common/quic/platform/_virtual_includes/quiche_mem_slice_impl_lib -Ibazel-out/k8-fastbuild/bin/source/common/quic/platform/_virtual_includes/quiche_platform_iovec_impl_lib -Ibazel-out/k8-fastbuild/bin/external/com_github_google_quiche/_virtual_includes/quiche_common_platform_default_quiche_platform_impl_server_stats_impl_lib -Ibazel-out/k8-fastbuild/bin/source/common/quic/platform/_virtual_includes/quiche_stack_trace_impl_lib -Ibazel-out/k8-fastbuild/bin/external/com_github_google_quiche/_virtual_includes/quiche_common_platform_default_quiche_platform_impl_client_stats_impl_lib -Ibazel-out/k8-fastbuild/bin/external/com_github_google_quiche/_virtual_includes/quiche_common_platform_default_quiche_platform_impl_mutex_impl_lib -Ibazel-out/k8-fastbuild/bin/external/com_github_google_quiche/_virtual_includes/quiche_common_platform_default_quiche_platform_impl_containers_impl_lib -Ibazel-out/k8-fastbuild/bin/source/common/filesystem/_virtual_includes/directory_iterator_impl_lib_posix -isystem external/com_github_fmtlib_fmt/include -isystem bazel-out/k8-fastbuild/bin/external/com_github_fmtlib_fmt/include -isystem external/com_google_protobuf/src -isystem bazel-out/k8-fastbuild/bin/external/com_google_protobuf/src -isystem bazel-out/k8-fastbuild/bin/external/envoy/bazel/foreign_cc/zlib/include -isystem external/com_github_gabime_spdlog/include -isystem bazel-out/k8-fastbuild/bin/external/com_github_gabime_spdlog/include -isystem external/com_github_jbeder_yaml_cpp/include -isystem bazel-out/k8-fastbuild/bin/external/com_github_jbeder_yaml_cpp/include -isystem external/boringssl/src/include -isystem bazel-out/k8-fastbuild/bin/external/boringssl/src/include -isystem bazel-out/k8-fastbuild/bin/external/envoy/bazel/foreign_cc/event/include -isystem external/envoy/bazel/external/http_parser -isystem bazel-out/k8-fastbuild/bin/external/envoy/bazel/external/http_parser -isystem bazel-out/k8-fastbuild/bin/external/envoy/bazel/foreign_cc/nghttp2/include -isystem external/com_github_circonus_labs_libcircllhist/src -isystem bazel-out/k8-fastbuild/bin/external/com_github_circonus_labs_libcircllhist/src -isystem external/com_github_nlohmann_json/include -isystem bazel-out/k8-fastbuild/bin/external/com_github_nlohmann_json/include -isystem external/com_github_nlohmann_json/external/nlohmann_json_lib -isystem bazel-out/k8-fastbuild/bin/external/com_github_nlohmann_json/external/nlohmann_json_lib -isystem external/com_github_grpc_grpc/include -isystem bazel-out/k8-fastbuild/bin/external/com_github_grpc_grpc/include -isystem external/com_github_grpc_grpc/src/core/ext/upb-generated -isystem bazel-out/k8-fastbuild/bin/external/com_github_grpc_grpc/src/core/ext/upb-generated -isystem external/com_github_grpc_grpc/src/core/ext/upbdefs-generated -isystem bazel-out/k8-fastbuild/bin/external/com_github_grpc_grpc/src/core/ext/upbdefs-generated -isystem external/com_github_grpc_grpc/third_party/xxhash -isystem bazel-out/k8-fastbuild/bin/external/com_github_grpc_grpc/third_party/xxhash -isystem bazel-out/k8-fastbuild/bin/external/envoy/bazel/foreign_cc/ares/include -isystem external/com_github_grpc_grpc/third_party/address_sorting/include -isystem bazel-out/k8-fastbuild/bin/external/com_github_grpc_grpc/third_party/address_sorting/include '-DABSL_MIN_LOG_LEVEL=4' -fPIC -Wno-deprecated-declarations '-std=c++17' -Wall -Wextra -Werror -Wnon-virtual-dtor -Woverloaded-virtual -Wold-style-cast -Wformat -Wformat-security -Wvla -Wno-deprecated-declarations -Wreturn-type -Wno-maybe-uninitialized -DTCMALLOC -DENVOY_HANDLE_SIGNALS -DENVOY_OBJECT_TRACE_ON_DUMP -DENVOY_HOT_RESTART -DENVOY_ADMIN_HTML -DENVOY_ENABLE_QUIC -DENVOY_GOOGLE_GRPC -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c source/common/upstream/cluster_manager_impl.cc -o bazel-out/k8-fastbuild/bin/source/common/upstream/_objs/cluster_manager_lib/cluster_manager_impl.pic.o)
1657015124.484269664: src/main/tools/linux-sandbox.cc:152: calling pipe(2)...
1657015124.484296388: src/main/tools/linux-sandbox.cc:171: calling clone(2)...
1657015124.484462901: src/main/tools/linux-sandbox.cc:180: linux-sandbox-pid1 has PID 54329
1657015124.484500804: src/main/tools/linux-sandbox-pid1.cc:641: Pid1Main started
1657015124.484558133: src/main/tools/linux-sandbox.cc:197: done manipulating pipes
1657015124.484663693: src/main/tools/linux-sandbox-pid1.cc:260: working dir: /root/.cache/bazel/_bazel_root/4e47b77d977b209382cf04b3ae32963e/sandbox/linux-sandbox/6800/execroot/envoy
1657015124.484672452: src/main/tools/linux-sandbox-pid1.cc:292: writable: /root/.cache/bazel/_bazel_root/4e47b77d977b209382cf04b3ae32963e/sandbox/linux-sandbox/6800/execroot/envoy
1657015124.484677476: src/main/tools/linux-sandbox-pid1.cc:292: writable: /tmp
1657015124.484681760: src/main/tools/linux-sandbox-pid1.cc:292: writable: /dev/shm
1657015124.484733516: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /
1657015124.484739069: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /dev
1657015124.484742913: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /dev/pts
1657015124.484746676: src/main/tools/linux-sandbox-pid1.cc:362: remount rw: /dev/shm
1657015124.484750127: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /dev/hugepages
1657015124.484753830: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /dev/mqueue
1657015124.484757726: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /run
1657015124.484761113: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /run/lock
1657015124.484764815: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /run/user/0
1657015124.484768810: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys
1657015124.484772088: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/kernel/security
1657015124.484777149: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup
1657015124.484781624: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup/unified
1657015124.484785513: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup/systemd
1657015124.484810987: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup/pids
1657015124.484814680: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup/freezer
1657015124.484818477: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup/net_cls,net_prio
1657015124.484822236: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup/perf_event
1657015124.484825748: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup/memory
1657015124.484829209: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup/cpuset
1657015124.484832607: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup/devices
1657015124.484836055: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup/cpu,cpuacct
1657015124.484839801: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup/rdma
1657015124.484843232: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup/hugetlb
1657015124.484846884: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/cgroup/blkio
1657015124.484850442: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/pstore
1657015124.484854186: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/bpf
1657015124.484869560: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/kernel/debug
1657015124.484873317: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/kernel/tracing
1657015124.484876935: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/fs/fuse/connections
1657015124.484881169: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /sys/kernel/config
1657015124.484885051: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /proc
1657015124.484888868: src/main/tools/linux-sandbox-pid1.cc:362: remount ro: /proc/sys/fs/binfmt_misc
1657015124.484896052: src/main/tools/linux-sandbox-pid1.cc:362: remount rw: /root/.cache/bazel/_bazel_root/4e47b77d977b209382cf04b3ae32963e/sandbox/linux-sandbox/6800/execroot/envoy
1657015124.484904745: src/main/tools/linux-sandbox-pid1.cc:362: remount rw: /root/.cache/bazel/_bazel_root/4e47b77d977b209382cf04b3ae32963e/sandbox/linux-sandbox/6800/execroot/envoy
1657015124.484908379: src/main/tools/linux-sandbox-pid1.cc:362: remount rw: /tmp
1657015124.484911704: src/main/tools/linux-sandbox-pid1.cc:362: remount rw: /dev/shm
1657015124.484924978: src/main/tools/linux-sandbox-pid1.cc:451: calling fork...
1657015124.485020517: src/main/tools/linux-sandbox-pid1.cc:481: child started with PID 2
gcc: fatal error: Killed signal terminated program cc1plus
compilation terminated.
1657015152.653065687: src/main/tools/linux-sandbox-pid1.cc:498: wait returned pid=2, status=0x100
1657015152.653078025: src/main/tools/linux-sandbox-pid1.cc:516: child exited normally with code 1
1657015152.670718058: src/main/tools/linux-sandbox.cc:233: child exited normally with code 1
Target //source/exe:envoy-static failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 7193.908s, Critical Path: 56.06s
INFO: 8948 processes: 2149 internal, 6797 linux-sandbox, 1 local, 1 worker.
FAILED: Build did NOT complete successfully

@github-actions
Copy link

github-actions bot commented Aug 4, 2022

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Aug 4, 2022
@github-actions
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

5 participants