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

ci: Revert tsan task changes #26775

Merged
merged 3 commits into from
Jan 1, 2023
Merged

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Dec 30, 2022

Looks like there are still bugs in clang-15, so we need to roll back all the way to the previously used version (clang-13).

@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 30, 2022

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK hebasto

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot added the Tests label Dec 30, 2022
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fabb6af, I have reviewed the code and it looks OK, I agree it can be merged.

@fanquake
Copy link
Member

Can we revert just #26759? Is there an issue with using Clang-15 with the suppression back in place?

Going forward, we should probably have better rationale for removing (already marked intermittent) suppresions, than "it works on my machine" and/or assuming it was magically fixed by some toolchain backport (which couldn't have been the case here anyway).

We should also figure out what is different about the Cirrus env; as the suppressed issue re-appeared immediately after the merge of #26759.

@maflcko
Copy link
Member Author

maflcko commented Dec 30, 2022

There are two unrelated issues:

  • The issue with clang-14/15 is an internal crash in tsan.
  • The tsan false positive.

It doesn't help that both are intermittent and the false positive is not reproducible so far. (I tried with a 4.15.0-173-generic kernel and another on 6.0.15)

@maflcko
Copy link
Member Author

maflcko commented Dec 30, 2022

We should also figure out what is different about the Cirrus env

As the issues are intermittent, my best guess would be they are easier to reproduce on cloud providers with 3rd-party load on neighbouring CPUs or neighbouring threads on the same CPU.

@maflcko
Copy link
Member Author

maflcko commented Jan 1, 2023

There is also a third (unrelated?) issue:

Remaining jobs: [interface_bitcoin_cli.py --legacy-wallet]
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Timed out!

@maflcko maflcko merged commit d8bdee0 into bitcoin:master Jan 1, 2023
@maflcko maflcko deleted the 2212-tsan-revert-🎨 branch January 1, 2023 10:29
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jan 1, 2023
fabb6af ci: Remove duplicate CC and CXX from tsan task (MarcoFalke)
fa5d9a0 Revert "ci: Use clang-15 in tsan task" (MarcoFalke)
faa835e Revert "test: Drop no longer needed `race:epoll_ctl` TSan suppression" (MarcoFalke)

Pull request description:

  Looks like there are still bugs in clang-15, so we need to roll back all the way to the previously used version (clang-13).

ACKs for top commit:
  hebasto:
    ACK fabb6af, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: d62203049847ab9095ee3fc89e18bdd721d1d9d5a7ef7a9f524c80e6be58d1d9f6aa2f14533df1ea77eb59597fba6fa9b987b17eb03b2c3f7cb577ab59cd59c0
@maflcko
Copy link
Member Author

maflcko commented Jan 12, 2023

I made some progress reproducing on a fresh install of Ubuntu Jammy:

  • Install packages and clone repos
apt update && apt install -y git vim htop ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 libevent-dev libboost-dev clang llvm libsqlite3-dev cmake ninja-build lld && ( git clone https://github.com/bitcoin/bitcoin  ./bitcoin-core && cd bitcoin-core/ && ./autogen.sh ) && git clone https://github.com/llvm/llvm-project && cd ./llvm-project/
  • Start bisect
git bisect start e0efedd2c33 88e66f
  • Run tests
( rm -rf build/ && ccache --zero-stats && mkdir build && cd build/ && cmake -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DLLVM_USE_LINKER=lld -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++  -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_PARALLEL_LINK_JOBS=1 -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS='clang;compiler-rt' ../llvm/ && ninja && ccache --show-stats && git log -1 && ./bin/clang --version ) && ( cd ../bitcoin-core/ && ./configure --disable-tests --disable-bench --disable-fuzz-binary --without-bdb --with-gui=no  --with-sanitizers=thread CC=/root/llvm-project/build/bin/clang CXX=/root/llvm-project/build/bin/clang++ && rm -f /tmp/runs && make clean && make -j $(nproc)  && ( strings /root/bitcoin-core/src/bitcoind |grep llvm/llvm-proje ) && while ( TSAN_OPTIONS="suppressions=$(pwd)/test/sanitizer_suppressions/tsan:halt_on_error=1" ./test/functional/test_runner.py -j30   $(for i in $(seq 1 481); do echo 'interface_bitcoin_cli.py' ; done)    --failfast --timeout-factor=1 ) ; do echo 1 >> /tmp/runs ; done )

(Then figure out whether to git bisect good or bad, based on the number of successful runs or a timeout/crash of bitcoind)

@maflcko
Copy link
Member Author

maflcko commented Jan 12, 2023

llvm-project# git bisect bad
9fb8058a8079b3a9a8af0aff0f4b6898960d331f is the first bad commit
commit 9fb8058a8079b3a9a8af0aff0f4b6898960d331f
Author: Dmitry Vyukov <dvyukov@google.com>
Date:   Mon Dec 13 12:45:53 2021 +0100

    tsan: enable the new runtime
    
    This enables the new runtime (D112603) by default.
    
    Depends on D112603.
    
    Differential Revision: https://reviews.llvm.org/D115624

 compiler-rt/lib/tsan/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

See llvm/llvm-project@9fb8058 and the previous commit llvm/llvm-project@b332134

@maflcko
Copy link
Member Author

maflcko commented Jan 12, 2023

fanquake added a commit to bitcoin-core/gui that referenced this pull request Mar 28, 2023
faf4aca ci: Use TSan new runtime (llvm-16, take 3) (MarcoFalke)

Pull request description:

  The previous two attempts failed:
  * llvm-14: Failed in bitcoin/bitcoin#24572
  * llvm-15: Failed in bitcoin/bitcoin#26775

  However, now that the bug is known and fixed, it should be good to go. See also bitcoin/bitcoin#26775 (comment)

ACKs for top commit:
  fanquake:
    ACK faf4aca - I still see [this](bitcoin/bitcoin#27298 (comment)) failure on aarch64, but that isn't really a regression, as running this tests was already broken for me. I'll open a separate issue, and we can follow up.

Tree-SHA512: 372b53c4d42ca7f527dae4a2b5bc5ab33c816930daf7a3479d20ea7749159a0b19cfd8d76244b95b03130e4a3d12ddbbb74668b8f7e9fc272cf1084f53b7ff9b
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 28, 2023
faf4aca ci: Use TSan new runtime (llvm-16, take 3) (MarcoFalke)

Pull request description:

  The previous two attempts failed:
  * llvm-14: Failed in bitcoin#24572
  * llvm-15: Failed in bitcoin#26775

  However, now that the bug is known and fixed, it should be good to go. See also bitcoin#26775 (comment)

ACKs for top commit:
  fanquake:
    ACK faf4aca - I still see [this](bitcoin#27298 (comment)) failure on aarch64, but that isn't really a regression, as running this tests was already broken for me. I'll open a separate issue, and we can follow up.

Tree-SHA512: 372b53c4d42ca7f527dae4a2b5bc5ab33c816930daf7a3479d20ea7749159a0b19cfd8d76244b95b03130e4a3d12ddbbb74668b8f7e9fc272cf1084f53b7ff9b
@bitcoin bitcoin locked and limited conversation to collaborators Jan 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants