-
Notifications
You must be signed in to change notification settings - Fork 38.6k
test: Add race:SendZmqMessage tsan suppression #20748
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
Conversation
faf9e25 to
fa1d349
Compare
hebasto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK fa1d34993f345b2e799baf53174dd258d91f4db1, I have reviewed the code and it looks OK, I agree it can be merged.
fec7d50 to
fa867da
Compare
hebasto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-ACK fa867daff99bbb2fa2e511f18cac7138e0bd5145
fa867da to
fa957f8
Compare
|
restored the |
hebasto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-ACK fa957f8, as my previous comment is not directly related to this pull changes.
Maybe it was needed when we still used the |
fa957f8 test: Add race:SendZmqMessage tsan suppression (MarcoFalke) Pull request description: Add suppression for `race:SendZmqMessage`, which isn't covered by the existing `zmq::*` suppression Fixes bitcoin#20618 ACKs for top commit: hebasto: re-ACK fa957f8, as my previous comment is not directly related to this pull changes. Tree-SHA512: 8642a8b79bbfa4bee89042b66e528f27fd78c5e84a33023df440662e9114e31445fd7b04940f44b11fa4ab7438d346385a21816289c818cce9958a9b16730452
Summary: See https://build.bitcoinabc.org/viewLog.html?buildId=300891&guest=1 for a tsan race while running `interface_zmq.py` ``` node0 stdout ================== WARNING: ThreadSanitizer: data race (pid=10367) Read of size 8 at 0x7b2400030238 by thread T19: #0 memcpy <null> (bitcoind+0x2645a7) #1 <null> <null> (libzmq.so.5+0x76220) Previous write of size 8 at 0x7b2400030238 by thread T12: #0 malloc <null> (bitcoind+0x258ee4) #1 <null> <null> (libzmq.so.5+0x39578) #2 CZMQAbstractPublishNotifier::SendZmqMessage(char const*, void const*, unsigned long) /work/abc-ci-builds/build-tsan/../../src/zmq/zmqpublishnotifier.cpp:164:14 (bitcoind+0xa1e7a9) ... 0 Location is heap block of size 140 at 0x7b2400030210 allocated by thread T12: #0 malloc <null> (bitcoind+0x258ee4) #1 <null> <null> (libzmq.so.5+0x39578) #2 CZMQAbstractPublishNotifier::SendZmqMessage(char const*, void const*, unsigned long) /work/abc-ci-builds/build-tsan/../../src/zmq/zmqpublishnotifier.cpp:164:14 (bitcoind+0xa1e7a9) ... Thread T19 'ZMQbg/1' (tid=10388, running) created by main thread at: #0 pthread_create <null> (bitcoind+0x25a7ab) #1 <null> <null> (libzmq.so.5+0x6e8b3) #2 CZMQNotificationInterface::Initialize() /work/abc-ci-builds/build-tsan/../../src/zmq/zmqnotificationinterface.cpp:86:23 (bitcoind+0xa199d4) #3 CZMQNotificationInterface::Create() /work/abc-ci-builds/build-tsan/../../src/zmq/zmqnotificationinterface.cpp:61:36 (bitcoind+0xa19328) #4 AppInitMain(Config&, RPCServer&, HTTPRPCRequestProcessor&, NodeContext&, interfaces::BlockAndHeaderTipInfo*) /work/abc-ci-builds/build-tsan/../../src/init.cpp:2482:36 (bitcoind+0x30d673) #5 AppInit(int, char**) /work/abc-ci-builds/build-tsan/../../src/bitcoind.cpp:181:16 (bitcoind+0x2eaa8e) #6 main /work/abc-ci-builds/build-tsan/../../src/bitcoind.cpp:208:13 (bitcoind+0x2eaa8e) Thread T12 'b-scheduler' (tid=10380, running) created by main thread at: #0 pthread_create <null> (bitcoind+0x25a7ab) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.67.0+0x1396a) #2 boost::thread::thread<std::_Bind<void (* (char const*, std::function<void ()>))(char const*, std::function<void ()>)>&>(std::_Bind<void (* (char const*, std::function<void ()>))(char const*, std::function<void ()>)>&) /usr/include/boost/thread/detail/thread.hpp:266:13 (bitcoind+0x330342) #3 boost::thread* boost::thread_group::create_thread<std::_Bind<void (* (char const*, std::function<void ()>))(char const*, std::function<void ()>)> >(std::_Bind<void (* (char const*, std::function<void ()>))(char const*, std::function<void ()>)>) /usr/include/boost/thread/detail/thread_group.hpp:79:60 (bitcoind+0x32039e) #4 AppInitMain(Config&, RPCServer&, HTTPRPCRequestProcessor&, NodeContext&, interfaces::BlockAndHeaderTipInfo*) /work/abc-ci-builds/build-tsan/../../src/init.cpp:2243:17 (bitcoind+0x309628) #5 AppInit(int, char**) /work/abc-ci-builds/build-tsan/../../src/bitcoind.cpp:181:16 (bitcoind+0x2eaa8e) #6 main /work/abc-ci-builds/build-tsan/../../src/bitcoind.cpp:208:13 (bitcoind+0x2eaa8e) #1 <null> <null> (libzmq.so.5+0x6e8b3) #2 CZMQNotificationInterface::Initialize() /work/abc-ci-builds/build-tsan/../../src/zmq/zmqnotificationinterface.cpp:86:23 (bitcoind+0xa199d4) #3 CZMQNotificationInterface::Create() /work/abc-ci-builds/build-tsan/../../src/zmq/zmqnotificationinterface.cpp:61:36 (bitcoind+0xa19328) #4 AppInitMain(Config&, RPCServer&, HTTPRPCRequestProcessor&, NodeContext&, interfaces::BlockAndHeaderTipInfo*) /work/abc-ci-builds/build-tsan/../../src/init.cpp:2482:36 (bitcoind+0x30d673) #5 AppInit(int, char**) /work/abc-ci-builds/build-tsan/../../src/bitcoind.cpp:181:16 (bitcoind+0x2eaa8e) ``` This is a backport of [[bitcoin/bitcoin#20748 | core#20748]] Test Plan: With TSAN: `for i in $(seq 100); do TSAN_OPTIONS=second_deadlock_stack=1: TSAN_OPTIONS=suppressions=/home/pierre/dev/bitcoin-abc/test/sanitizer_suppressions/tsan test/functional/test_runner.py interface_zmq; done` This failure is intermittent, but relatively easy to reproduce: I was able to get it with 10 repetitions of the test, prior to adding the suppression. Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D10315
Add suppression for
race:SendZmqMessage, which isn't covered by the existingzmq::*suppressionFixes #20618