From ae7254aa79b2ba5941b9bd95287958b4703748bc Mon Sep 17 00:00:00 2001 From: Bill Feng Date: Fri, 25 Jan 2019 10:04:16 -0800 Subject: [PATCH 1/3] adding ptrace to asan --- third_party/toolchains/BUILD | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/third_party/toolchains/BUILD b/third_party/toolchains/BUILD index 04fd795b566..943690a2efd 100644 --- a/third_party/toolchains/BUILD +++ b/third_party/toolchains/BUILD @@ -56,6 +56,14 @@ platform( name: "dockerNetwork" value: "off" } + properties: { + name: "dockerAddCapabilities" + value: "SYS_PTRACE" + } + properties: { + name: "dockerPrivileged" + value: "true" + } """, ) @@ -87,6 +95,14 @@ platform( name: "dockerNetwork" value: "off" } + properties: { + name: "dockerAddCapabilities" + value: "SYS_PTRACE" + } + properties: { + name: "dockerPrivileged" + value: "true" + } """, ) From 59004219ff3781fc8b231cfa845e09c8df1c2521 Mon Sep 17 00:00:00 2001 From: Bill Feng Date: Fri, 25 Jan 2019 10:07:49 -0800 Subject: [PATCH 2/3] removed override argument for asan --- tools/remote_build/rbe_common.bazelrc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tools/remote_build/rbe_common.bazelrc b/tools/remote_build/rbe_common.bazelrc index 9a86713f505..3438b1873d5 100644 --- a/tools/remote_build/rbe_common.bazelrc +++ b/tools/remote_build/rbe_common.bazelrc @@ -54,12 +54,6 @@ build:asan --copt=-gmlt # TODO(jtattermusch): use more reasonable test timeout build:asan --test_timeout=3600 build:asan --test_tag_filters=-qps_json_driver -build:asan --host_platform_remote_properties_override=''' - properties: { - name: "dockerDropCapabilities" - value: "" - } -''' # memory sanitizer: most settings are already in %workspace%/.bazelrc # we only need a few additional ones that are Foundry specific From 16dcc172fe25ba4b8aedfc501e8763d92a1a7290 Mon Sep 17 00:00:00 2001 From: Bill Feng Date: Fri, 25 Jan 2019 10:21:24 -0800 Subject: [PATCH 3/3] putting a retry on apt-get jq --- .../helper_scripts/prepare_build_linux_perf_rc | 8 +++++++- tools/internal_ci/linux/grpc_run_tests_matrix.sh | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc b/tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc index ff5593e031a..b66ac38942f 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc @@ -21,7 +21,13 @@ ulimit -c unlimited # Performance PR testing needs GH API key and PR metadata to comment results if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ]; then - sudo apt-get install -y jq + retry=0 + until [ $retry -ge 3 ] + do + sudo apt-get install -y jq && break + retry=$[$retry+1] + sleep 5 + done export ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref) fi diff --git a/tools/internal_ci/linux/grpc_run_tests_matrix.sh b/tools/internal_ci/linux/grpc_run_tests_matrix.sh index f9acd814ae8..f8fd963ccf3 100755 --- a/tools/internal_ci/linux/grpc_run_tests_matrix.sh +++ b/tools/internal_ci/linux/grpc_run_tests_matrix.sh @@ -23,7 +23,13 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc # If this is a PR using RUN_TESTS_FLAGS var, then add flags to filter tests if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ] && [ -n "$RUN_TESTS_FLAGS" ]; then sudo apt-get update - sudo apt-get install -y jq + retry=0 + until [ $retry -ge 3 ] + do + sudo apt-get install -y jq && break + retry=$[$retry+1] + sleep 5 + done ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref) export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch" fi