mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
partial Merge #19041: ci: tsan with -stdlib=libc++-10
BACKPORT NOTICE: this PR doesn't actually swithc to libc++ due to multiple CI failures such as linking errors or other ------------------ faf62e6ed0ca45db44c370844c3515eb5a8cda12 ci: Remove unused workaround (MarcoFalke) fa7c8509153bfd2d5b4dcff86ad27dfd73e8788b ci: Install llvm to get llvm symbolizer (MarcoFalke) fa563cef61e8a217c5e8ec059e174afae61087a5 test: Add more tsan suppressions (MarcoFalke) fa0cc02c0a029133f080680ae9186002a144738f ci: Mute depends logs completely (MarcoFalke) fa906bf2988c799765a04c484269f890964ec3ee test: Extend tsan suppressions for clang stdlib (MarcoFalke) fa10d850790bbe52d948659bb1ebbb88fe718065 ci: Use libc++ instead of libstdc++ for tsan (MarcoFalke) fa0d5ee1126a8cff9f30f863eb8f5c78bf57e168 ci: Set halt_on_error=1 for tsan (MarcoFalke) fa2ffe87f794caa74f80c1c2d6e6067ee4849632 ci: Deduplicate DOCKER_EXEC (MarcoFalke) fac2eeeb9d718bdb892eef9adf333ea61ba8f3d0 cirrus: Remove no longer needed install step (MarcoFalke) Pull request description: According to the [ThreadSanitizer docs](https://clang.llvm.org/docs/ThreadSanitizer.html#current-status): > C++11 threading is supported with **llvm libc++**. For example, the thread sanitizer build is currently not checking for double lock of mutexes. Fixes (partially) https://github.com/bitcoin/bitcoin/issues/19038#issuecomment-632138003 ACKs for top commit: practicalswift: ACK faf62e6ed0ca45db44c370844c3515eb5a8cda12 fanquake: ACK faf62e6ed0ca45db44c370844c3515eb5a8cda12 hebasto: ACK faf62e6ed0ca45db44c370844c3515eb5a8cda12, maybe re-organize commits to modify suppressions in a single one? Tree-SHA512: 98ce5154b4736dfb811ffdb6e6f63a7bc25fe50d3b73134404a8f3715ad53626c31f9c8132dbacf85de47b9409f1e17a4399e35f78b1da30b1577167ea2982ad
This commit is contained in:
parent
924b8e4eb8
commit
09fe21bb0e
@ -14,9 +14,5 @@ task:
|
|||||||
folder: "/tmp/ccache_dir"
|
folder: "/tmp/ccache_dir"
|
||||||
depends_built_cache:
|
depends_built_cache:
|
||||||
folder: "/tmp/cirrus-ci-build/depends/built"
|
folder: "/tmp/cirrus-ci-build/depends/built"
|
||||||
install_script:
|
|
||||||
- apt-get update
|
|
||||||
- apt-get -y install git bash ccache
|
|
||||||
- ccache --max-size=${CCACHE_SIZE}
|
|
||||||
ci_script:
|
ci_script:
|
||||||
- ./ci/test_run_all.sh
|
- ./ci/test_run_all.sh
|
||||||
|
@ -210,7 +210,7 @@ after_success:
|
|||||||
FILE_ENV="./ci/test/00_setup_env_native_qt5.sh"
|
FILE_ENV="./ci/test/00_setup_env_native_qt5.sh"
|
||||||
# x86_64 Linux (xenial, no depends, only system libs, sanitizers: thread (TSan))
|
# x86_64 Linux (xenial, no depends, only system libs, sanitizers: thread (TSan))
|
||||||
- stage: test
|
- stage: test
|
||||||
name: 'x86_64 Linux [GOAL: install] [bionic] [no depends, only system libs, sanitizers: thread (TSan), no wallet]'
|
name: 'x86_64 Linux [GOAL: install] [focal] [depends, sanitizers: thread (TSan), no wallet, no gui]'
|
||||||
# Not enough memory on travis machines, so feature_block is excluded for now
|
# Not enough memory on travis machines, so feature_block is excluded for now
|
||||||
env: >-
|
env: >-
|
||||||
TEST_RUNNER_EXTRA="--exclude feature_block"
|
TEST_RUNNER_EXTRA="--exclude feature_block"
|
||||||
|
@ -45,11 +45,11 @@ rm -rf build-ci
|
|||||||
mkdir build-ci
|
mkdir build-ci
|
||||||
cd build-ci
|
cd build-ci
|
||||||
|
|
||||||
../configure $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
|
bash -c "../configure $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( cat config.log && false)
|
||||||
make distdir VERSION=$BUILD_TARGET
|
make distdir VERSION=$BUILD_TARGET
|
||||||
|
|
||||||
cd dashcore-$BUILD_TARGET
|
cd dashcore-$BUILD_TARGET
|
||||||
./configure $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
|
bash -c "./configure $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( cat config.log && false)
|
||||||
|
|
||||||
make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
|
make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ source ./ci/test/00_setup_env.sh
|
|||||||
# Configure sanitizers options
|
# Configure sanitizers options
|
||||||
export ASAN_OPTIONS=""
|
export ASAN_OPTIONS=""
|
||||||
export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan"
|
export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan"
|
||||||
export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan"
|
export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1"
|
||||||
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan"
|
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan"
|
||||||
|
|
||||||
if [ "$BUILD_TARGET" = "arm-linux" ]; then
|
if [ "$BUILD_TARGET" = "arm-linux" ]; then
|
||||||
|
@ -7,13 +7,12 @@
|
|||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
|
|
||||||
export CONTAINER_NAME=ci_native_tsan
|
export CONTAINER_NAME=ci_native_tsan
|
||||||
export PACKAGES="clang-15 llvm-15 python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-filesystem-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libqrencode-dev"
|
export PACKAGES="clang llvm libc++abi-dev libc++-dev python3-zmq"
|
||||||
export DEP_OPTS="NO_UPNP=1 DEBUG=1"
|
export DEP_OPTS="CC=clang-15 CXX='clang++-15 -stdlib=libc++"
|
||||||
export TEST_RUNNER_EXTRA="--extended --exclude feature_pruning,feature_dbcrash,wallet_multiwallet.py" # Temporarily suppress ASan heap-use-after-free (see issue #14163)
|
export TEST_RUNNER_EXTRA="--extended --exclude feature_pruning,feature_dbcrash,wallet_multiwallet.py" # Temporarily suppress ASan heap-use-after-free (see issue #14163)
|
||||||
export TEST_RUNNER_EXTRA="${TEST_RUNNER_EXTRA} --timeout-factor=4" # Increase timeout because sanitizers slow down
|
export TEST_RUNNER_EXTRA="${TEST_RUNNER_EXTRA} --timeout-factor=4" # Increase timeout because sanitizers slow down
|
||||||
export GOAL="install"
|
export GOAL="install"
|
||||||
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks --with-sanitizers=thread"
|
export BITCOIN_CONFIG="--enable-zmq --disable-wallet --with-gui=no --with-sanitizers=thread CC=clang-15 CXX=clang++-15"
|
||||||
export BITCOIN_CONFIG="${BITCOIN_CONFIG} CC=clang-15 CXX=clang++-15 CXXFLAGS=-Werror=thread-safety"
|
|
||||||
export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG"
|
export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG"
|
||||||
export PYZMQ=true
|
export PYZMQ=true
|
||||||
export RUN_SYMBOL_TESTS=false
|
export RUN_SYMBOL_TESTS=false
|
||||||
|
@ -6,10 +6,6 @@
|
|||||||
|
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
|
|
||||||
# Add llvm-symbolizer directory to PATH. Needed to get symbolized stack traces from the sanitizers.
|
|
||||||
PATH=$PATH:/usr/lib/llvm-6.0/bin/
|
|
||||||
export PATH
|
|
||||||
|
|
||||||
BEGIN_FOLD () {
|
BEGIN_FOLD () {
|
||||||
echo ""
|
echo ""
|
||||||
CURRENT_FOLD_NAME=$1
|
CURRENT_FOLD_NAME=$1
|
||||||
|
@ -23,7 +23,7 @@ mkdir -p "${PREVIOUS_RELEASES_DIR}"
|
|||||||
|
|
||||||
export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1"
|
export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1"
|
||||||
export LSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/lsan"
|
export LSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/lsan"
|
||||||
export TSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/tsan"
|
export TSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1"
|
||||||
export UBSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
|
export UBSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
|
||||||
env | grep -E '^(BASE_|QEMU_|CCACHE_|LC_ALL|BOOST_TEST_RANDOM|DEBIAN_FRONTEND|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS|PREVIOUS_RELEASES_DIR))' | tee /tmp/env
|
env | grep -E '^(BASE_|QEMU_|CCACHE_|LC_ALL|BOOST_TEST_RANDOM|DEBIAN_FRONTEND|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS|PREVIOUS_RELEASES_DIR))' | tee /tmp/env
|
||||||
if [[ $HOST = *-mingw32 ]]; then
|
if [[ $HOST = *-mingw32 ]]; then
|
||||||
@ -47,16 +47,14 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
|
|||||||
--env-file /tmp/env \
|
--env-file /tmp/env \
|
||||||
--name $CONTAINER_NAME \
|
--name $CONTAINER_NAME \
|
||||||
$DOCKER_NAME_TAG)
|
$DOCKER_NAME_TAG)
|
||||||
|
export DOCKER_CI_CMD_PREFIX="docker exec $DOCKER_ID"
|
||||||
DOCKER_EXEC () {
|
|
||||||
docker exec $DOCKER_ID bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*"
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
echo "Running on host system without docker wrapper"
|
echo "Running on host system without docker wrapper"
|
||||||
DOCKER_EXEC () {
|
|
||||||
bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*"
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
DOCKER_EXEC () {
|
||||||
|
$DOCKER_CI_CMD_PREFIX bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*"
|
||||||
|
}
|
||||||
export -f DOCKER_EXEC
|
export -f DOCKER_EXEC
|
||||||
|
|
||||||
if [ -n "$DPKG_ADD_ARCH" ]; then
|
if [ -n "$DPKG_ADD_ARCH" ]; then
|
||||||
|
@ -33,7 +33,9 @@ if [ -z "$NO_DEPENDS" ]; then
|
|||||||
else
|
else
|
||||||
SHELL_OPTS="CONFIG_SHELL="
|
SHELL_OPTS="CONFIG_SHELL="
|
||||||
fi
|
fi
|
||||||
DOCKER_EXEC $SHELL_OPTS make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
|
# Temporary workaround for https://github.com/bitcoin/bitcoin/issues/16368
|
||||||
|
python3 -c 'import time; [print(".") or time.sleep(500) for _ in range(4)]' &
|
||||||
|
( DOCKER_EXEC $SHELL_OPTS make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS ) &> /dev/null
|
||||||
fi
|
fi
|
||||||
if [ -n "$PREVIOUS_RELEASES_TO_DOWNLOAD" ]; then
|
if [ -n "$PREVIOUS_RELEASES_TO_DOWNLOAD" ]; then
|
||||||
BEGIN_FOLD previous-versions
|
BEGIN_FOLD previous-versions
|
||||||
|
@ -25,9 +25,11 @@ RUN apt-get update && apt-get install $APT_ARGS \
|
|||||||
ccache \
|
ccache \
|
||||||
clang \
|
clang \
|
||||||
cmake \
|
cmake \
|
||||||
git \
|
|
||||||
g++ \
|
g++ \
|
||||||
gettext \
|
gettext \
|
||||||
|
git \
|
||||||
|
libc++-dev \
|
||||||
|
libc++abi-dev \
|
||||||
libtool \
|
libtool \
|
||||||
libxcb-icccm4 \
|
libxcb-icccm4 \
|
||||||
libxcb-image0 \
|
libxcb-image0 \
|
||||||
|
@ -9,6 +9,29 @@ race:zmq::*
|
|||||||
# race (TODO fix)
|
# race (TODO fix)
|
||||||
race:validation_chainstatemanager_tests
|
race:validation_chainstatemanager_tests
|
||||||
|
|
||||||
|
# double locks (TODO fix)
|
||||||
|
mutex:g_genesis_wait_mutex
|
||||||
|
mutex:Interrupt
|
||||||
|
mutex:CThreadInterrupt
|
||||||
|
mutex:CConnman::Interrupt
|
||||||
|
mutex:CConnman::WakeMessageHandler
|
||||||
|
mutex:CConnman::ThreadOpenConnections
|
||||||
|
mutex:CConnman::ThreadOpenAddedConnections
|
||||||
|
mutex:CConnman::SocketHandler
|
||||||
|
mutex:UpdateTip
|
||||||
|
mutex:PeerLogicValidation::UpdatedBlockTip
|
||||||
|
# race (TODO fix)
|
||||||
|
race:CConnman::WakeMessageHandler
|
||||||
|
race:CConnman::ThreadMessageHandler
|
||||||
|
race:fHaveGenesis
|
||||||
|
race:ProcessNewBlock
|
||||||
|
race:ThreadImport
|
||||||
|
race:zmq::*
|
||||||
|
race:bitcoin-qt
|
||||||
|
# deadlock (TODO fix)
|
||||||
|
deadlock:CConnman::ForNode
|
||||||
|
deadlock:UpdateTip
|
||||||
|
|
||||||
# WalletBatch (unidentified deadlock)
|
# WalletBatch (unidentified deadlock)
|
||||||
deadlock:WalletBatch
|
deadlock:WalletBatch
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user