Skip to content

Commit

Permalink
#3116: Enable CXX11 ABI
Browse files Browse the repository at this point in the history
Summary:
We use a `-D_GLIBCXX_USE_CXX11_ABI=0` build option which we actually don't need and this causes single-line `std::string::_Rep::_S_create` stack traces in heap profiles which are responsible for a high amount of memory consumption in some of the scenarios we've seen investigating OOM issues.

This change removes this option from both YB and third-party builds, so we will be using correct `std::string` implementation instead of the old one for GCC builds.

Test Plan:
- Jenkins
- Populated cluster with data using `java -jar ~/code/yb-sample-apps.jar --workload CassandraBatchTimeseries --nodes $NODES --num_writes 100000 --num_threads_read 1 --num_threads_write 4 --min_metrics_count 10000 --max_metrics_count 20000 --num_unique_keys 1000000000 --nouuid --value_size 100`. Performed rolling upgrade. Checked that data is kept and there are no backward compatibility errors.
- Checked local RF=3 cluster on AWS m3.xlarge with Xeon E5-2665. Tried load and query ysql sample data.

Reviewers: sergei, mikhail

Reviewed By: mikhail

Subscribers: ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D7673
  • Loading branch information
ttyusupov committed Dec 12, 2019
1 parent 4843cf2 commit aa35010
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 15 deletions.
1 change: 0 additions & 1 deletion .ycm_extra_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
'c++',
'-DYB_HEADERS_NO_STUBS=1',
'-Dintegration_tests_EXPORTS',
'-D_GLIBCXX_USE_CXX11_ABI=0',
'-D__STDC_FORMAT_MACROS',
'-fno-strict-aliasing',
'-msse4.2',
Expand Down
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -709,16 +709,6 @@ else()
message("Not specifying linker flags to not allow any undefined symbols: this is ASAN/TSAN")
endif()

# Explicitly disable the new gcc5 ABI. Until clang supports abi tags [1], any
# generated code (which always uses clang) must be built against the old ABI.
# (Note: we are not using any LLVM codegen in YugaByte as of 08/2016).
# There's no recourse for using both ABIs in the same process; gcc's advice [2]
# is to build everything against the old ABI.
#
# 1. https://llvm.org/bugs/show_bug.cgi?id=23529
# 2. https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
ADD_CXX_FLAGS(-D_GLIBCXX_USE_CXX11_ABI=0)

# We don't want to use any stubs; that's exclusively for builds using our
# exported client headers).
ADD_CXX_FLAGS(-DYB_HEADERS_NO_STUBS=1)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2019-12-05T15_39_49
2019-12-07T23_26_21
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2019-12-05T07_41_50
2019-12-07T15_28_30
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/v20191209154536-779cc9fd56/yugabyte-db-thirdparty-v20191209154536-779cc9fd56-centos.tar.gz
https://github.com/yugabyte/yugabyte-db-thirdparty/releases/download/v20191209181439-7fc63d1583/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos.tar.gz
1 change: 0 additions & 1 deletion thirdparty/yb_build_thirdparty_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,6 @@ def init_flags(self):
"/tmp/making_sure_we_have_enough_room_to_set_rpath_later_{}_end_of_rpath"
.format('_' * 256))

self.cxx_flags.append('-D_GLIBCXX_USE_CXX11_ABI=0')
self.dylib_suffix = "so"
elif is_mac():
self.dylib_suffix = "dylib"
Expand Down

0 comments on commit aa35010

Please sign in to comment.