Skip to content

Commit

Permalink
[Backport 2.5.3] [yugabyte#8496] Downgrade gperftools to 2.7
Browse files Browse the repository at this point in the history
Summary:
Original revision: https://phabricator.dev.yugabyte.com/D11633
Original commit: e5d4a27

Downgrade gperftools to 2.7 to avoid hitting tcmalloc bugs (gperftools/gperftools#1204, gperftools/gperftools#1227) and because we have already extensively tested tcmalloc from gperftools 2.7.

We will still use the old Linuxbrew-based third-party archive for ASAN/TSAN builds because the new Linuxbrew-based GCC 5 third-party archive does not have a Clang 7 toolchain anymore (Linuxbrew is being removed from an increasing number of build types). But ASAN/TSAN builds are non-production and do not use tcmalloc anyway so it is OK to use an archive that has gperftools 2.8.

Also fix find_or_download_thirdparty.sh to take BUILD_ROOT into account.

Note that we are using the updated third-party URL built for the 2.4 branch here, because the previous yugabyte-db-thirdparty commit we used in the 2.5.3 branch was yugabyte/yugabyte-db-thirdparty@45c97f4, which was also used in the 2.4 branch, and had the problematic gperftools version 2.8.0. The new commit we are using is https://github.com/yugabyte/yugabyte-db-thirdparty/commits/07aad696773b3db7976568a3c827e96d8c3d24c9, with gperftools downgraded to 2.7.0.

Test Plan: Jenkins: urgent, rebase: 2.5.3

Reviewers: bogdan, tvesely, steve.varnau

Reviewed By: steve.varnau

Subscribers: ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D11665
  • Loading branch information
mbautin committed May 20, 2021
1 parent 5f512d0 commit 818df92
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
6 changes: 5 additions & 1 deletion build-support/common-build-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2249,14 +2249,18 @@ update_submodules() {
}

set_prebuilt_thirdparty_url() {
expect_vars_to_be_set YB_COMPILER_TYPE
expect_vars_to_be_set YB_COMPILER_TYPE build_type
if [[ ${YB_DOWNLOAD_THIRDPARTY:-} == "1" ]]; then
local auto_thirdparty_url=""
local thirdparty_url_file=$YB_BUILD_SUPPORT_DIR/thirdparty_url_${short_os_name}
if [[ ${YB_COMPILER_TYPE} =~ ^.*[0-9]+$ ]]; then
# For compiler types like gcc9 or clang11, append the compiler type to the file path.
thirdparty_url_file+="_${YB_COMPILER_TYPE}"
fi
if [[ $YB_COMPILER_TYPE == "clang" && ( $build_type == "asan" || $build_type == "tsan" ) ]]
then
thirdparty_url_file+="_sanitizers"
fi
thirdparty_url_file+=.txt
if [[ -f $thirdparty_url_file ]]; then
auto_thirdparty_url=$( read_file_and_trim "$thirdparty_url_file" )
Expand Down
6 changes: 6 additions & 0 deletions build-support/find_or_download_thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ set -euo pipefail

. "${BASH_SOURCE%/*}/common-build-env.sh"

if [[ -n ${BUILD_ROOT:-} ]]; then
handle_predefined_build_root_quietly=true
predefined_build_root=$BUILD_ROOT
handle_predefined_build_root
fi

find_or_download_thirdparty
1 change: 1 addition & 0 deletions build-support/run_tests_on_spark.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ def parallel_list_test_descriptors(rel_test_path):
from yb import yb_dist_tests, command_util
global_conf = initialize_remote_task()

os.environ['BUILD_ROOT'] = global_conf.build_root
find_or_download_thirdparty_script_path = os.path.join(
global_conf.yb_src_root, 'build-support', 'find_or_download_thirdparty.sh')
subprocess.check_call(find_or_download_thirdparty_script_path)
Expand Down
2 changes: 1 addition & 1 deletion build-support/thirdparty_url_centos.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/yugabyte/yugabyte-db-thirdparty/releases/download/v20210210192532-45c97f45f1-centos7-linuxbrew/yugabyte-db-thirdparty-v20210210192532-45c97f45f1-centos7-linuxbrew.tar.gz
https://github.com/yugabyte/yugabyte-db-thirdparty/releases/download/v2.4-20210519151206-07aad69677-centos7-linuxbrew/yugabyte-db-thirdparty-v2.4-20210519151206-07aad69677-centos7-linuxbrew.tar.gz
1 change: 1 addition & 0 deletions build-support/thirdparty_url_centos_sanitizers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/yugabyte/yugabyte-db-thirdparty/releases/download/v20210210192532-45c97f45f1-centos7-linuxbrew/yugabyte-db-thirdparty-v20210210192532-45c97f45f1-centos7-linuxbrew.tar.gz

0 comments on commit 818df92

Please sign in to comment.