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

TSAN failures with CassandraDriver tests #3658

Closed
amitanandaiyer opened this issue Feb 14, 2020 · 2 comments
Closed

TSAN failures with CassandraDriver tests #3658

amitanandaiyer opened this issue Feb 14, 2020 · 2 comments

Comments

@amitanandaiyer
Copy link
Contributor

amitanandaiyer commented Feb 14, 2020


 WARNING: ThreadSanitizer: data race (pid=5669)
   Write of size 8 at 0x7b440003a428 by thread T36:
     #0 operator delete(void*) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/llvm-7.0.1.src/projects/compiler-rt/lib/tsan/rtl/      tsan_new_delete.cc:127 (cassandra_cpp_driver-test+0x4dd501)
     #1 cass::Connection::PendingWrite::~PendingWrite() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/cassandra-cpp-driver-2.9.0-   yb-6/src/connection.hpp:229:9 (libcassandra.so.2+0xa60a1)
     #2 cass::Connection::PendingWriteBase::on_write(uv_write_s*, int) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/cassandra-cpp- driver-2.9.0-yb-6/src/connection.cpp:1018:3 (libcassandra.so.2+0xa41c1)
     #3 uv__write_callbacks /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/libuv-1.23.0/src/unix/stream.c:976:7 (libuv.so+0x2147f)
     #4 uv__stream_io /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/libuv-1.23.0/src/unix/stream.c:1348:5 (libuv.so+0x209b6)
     #5 uv__run_pending /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/libuv-1.23.0/src/unix/core.c:780:5 (libuv.so+0x10b32)
     #6 uv_run /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/libuv-1.23.0/src/unix/core.c:362 (libuv.so+0x10b32)
     #7 cass::LoopThread::on_run_internal(void*) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/cassandra-cpp-driver-2.9.0-yb-6/src/ loop_thread.hpp:128:5 (libcassandra.so.2+0x16c84d)

   Previous write of size 8 at 0x7b440003a428 by thread T38:
     #0 cass::Connection::PendingWriteBase::write(cass::RequestCallback*) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/cassandra-  cpp-driver-2.9.0-yb-6/src/connection.cpp:951:9 (libcassandra.so.2+0x9ed97)
     #1 cass::Connection::internal_write(cass::SharedRefPtr<cass::RequestCallback> const&, bool) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-           7fc63d1583-centos/src/cassandra-cpp-driver-2.9.0-yb-6/src/connection.cpp:302:41 (libcassandra.so.2+0x9e8ca)
     #2 cass::Connection::write(cass::SharedRefPtr<cass::RequestCallback> const&, bool) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/  src/cassandra-cpp-driver-2.9.0-yb-6/src/connection.cpp:272:20 (libcassandra.so.2+0x9e35d)
     #3 cass::MultipleRequestCallback::execute_query(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::               basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/ cassandra-cpp-driver-2.9.0-yb-6/src/request_callback.cpp:212:21 (libcassandra.so.2+0x149635)
     #4 cass::ControlConnection::ControlMultipleRequestCallback<cass::ControlConnection::UnusedData>::execute_query(std::__1::basic_string<char, std::__1::                 char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /opt/yb-build/        thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/cassandra-cpp-driver-2.9.0-yb-6/src/control_connection.cpp:1154:28 (libcassandra.so.2+0xb56c7)
     #5 cass::ControlConnection::refresh_partitions() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/cassandra-cpp-driver-2.9.0-yb-  6/src/control_connection.cpp:524 (libcassandra.so.2+0xb56c7)
     #6 cass::PartitionAwarePolicy::on_work(cass::PeriodicTask*) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/cassandra-cpp-       driver-2.9.0-yb-6/src/partition_aware_policy.cpp:320:35 (libcassandra.so.2+0x13325b)
     #7 cass::PeriodicTask::on_work(uv_work_s*) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/cassandra-cpp-driver-2.9.0-yb-6/src/  periodic_task.hpp:76:5 (libcassandra.so.2+0xecceb)
     #8 uv__queue_work /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/libuv-1.23.0/src/threadpool.c:259:3 (libuv.so+0xb375)
     #9 worker /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/libuv-1.23.0/src/threadpool.c:83:5 (libuv.so+0xb707)

   Thread T36 (tid=5881, running) created by main thread at:
     #0 pthread_create /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/llvm-7.0.1.src/projects/compiler-rt/lib/tsan/rtl/              tsan_interceptors.cc:965 (cassandra_cpp_driver-test+0x46a55b)
     #1 uv_thread_create /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/libuv-1.23.0/src/unix/thread.c:202:9 (libuv.so+0x240c9)
     #2 cass::LoopThread::run() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/cassandra-cpp-driver-2.9.0-yb-6/src/loop_thread.hpp:  106:14 (libcassandra.so.2+0x15f4e4)
     #3 cass::Session::connect_async(cass::Config const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, cass::              SharedRefPtr<cass::Future> const&) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/cassandra-cpp-driver-2.9.0-yb-6/src/session.cpp:  373 (libcassandra.so.2+0x15f4e4)
     #4 cass_session_connect_keyspace_n /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/cassandra-cpp-driver-2.9.0-yb-6/src/session.  cpp:66:12 (libcassandra.so.2+0x15ee30)
     #5 cass_session_connect_keyspace /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/cassandra-cpp-driver-2.9.0-yb-6/src/session.    cpp:55:10 (libcassandra.so.2+0x15ec29)
     #6 cass_session_connect /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/cassandra-cpp-driver-2.9.0-yb-6/src/session.cpp:49       (libcassandra.so.2+0x15ec29)
     #7 yb::CassandraSession::Connect(CassCluster_*) /nfusr/centos-gcp-cloud/jenkins-slave-bc4/jenkins/jenkins-github-yugabyte-db-phabricator-25901/build/tsan-clang-       dynamic-ninja/../../src/yb/integration-tests/cassandra_cpp_driver-test.cc:333:28 (cassandra_cpp_driver-test+0x4f90ae)
     #8 yb::CassandraSession::Create(CassCluster_*) /nfusr/centos-gcp-cloud/jenkins-slave-bc4/jenkins/jenkins-github-yugabyte-db-phabricator-25901/build/tsan-clang-        dynamic-ninja/../../src/yb/integration-tests/cassandra_cpp_driver-test.cc:339:5 (cassandra_cpp_driver-test+0x4f8f0c)
     #9 yb::CppCassandraDriver::CreateSession() /nfusr/centos-gcp-cloud/jenkins-slave-bc4/jenkins/jenkins-github-yugabyte-db-phabricator-25901/build/tsan-clang-dynamic-    ninja/../../src/yb/integration-tests/cassandra_cpp_driver-test.cc:453:12 (cassandra_cpp_driver-test+0x4ed428)
     #10 yb::CppCassandraDriverTest::SetUp() /nfusr/centos-gcp-cloud/jenkins-slave-bc4/jenkins/jenkins-github-yugabyte-db-phabricator-25901/build/tsan-clang-dynamic-       ninja/../../src/yb/integration-tests/cassandra_cpp_driver-test.cc:480:16 (cassandra_cpp_driver-test+0x4f69ab)
     #11 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /opt/yb-build/         thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/googletest-release-1.8.0/googletest/src/gtest.cc:2402:10 (libgmock.so+0x55c6f)
     #12 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /opt/yb-build/thirdparty/ yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/googletest-release-1.8.0/googletest/src/gtest.cc:2438 (libgmock.so+0x55c6f)
     #13 testing::Test::Run() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/googletest-release-1.8.0/googletest/src/gtest.cc:2470:  3 (libgmock.so+0x34f21)
     #14 testing::TestInfo::Run() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/googletest-release-1.8.0/googletest/src/gtest.cc:   2656:11 (libgmock.so+0x362ac)
     #15 testing::TestCase::Run() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/googletest-release-1.8.0/googletest/src/gtest.cc:   2774:28 (libgmock.so+0x36d86)
     #16 testing::internal::UnitTestImpl::RunAllTests() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/googletest-release-1.8.0/     googletest/src/gtest.cc:4649:43 (libgmock.so+0x430d6)
     #17 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::  UnitTestImpl::*)(), char const*) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/googletest-release-1.8.0/googletest/src/gtest.cc:   2402:10 (libgmock.so+0x56bdf)
     #18 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::     UnitTestImpl::*)(), char const*) /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/googletest-release-1.8.0/googletest/src/gtest.cc:   2438 (libgmock.so+0x56bdf)
     #19 testing::UnitTest::Run() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/src/googletest-release-1.8.0/googletest/src/gtest.cc:   4257:10 (libgmock.so+0x42981)
     #20 RUN_ALL_TESTS() /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20191209181439-7fc63d1583-centos/installed/tsan/include/gtest/gtest.h:2233:46 (libyb_test_main.   so+0x500b)
     #21 main /nfusr/centos-gcp-cloud/jenkins-slave-bc4/jenkins/jenkins-github-yugabyte-db-phabricator-25901/build/tsan-clang-dynamic-ninja/../../src/yb/util/test_main.cc: 104:13 (libyb_test_main.so+0x4c4d)
@amitanandaiyer
Copy link
Contributor Author

setting a large cql_nodelist_refresh_interval_secs may avoid this.

@bmatican
Copy link
Contributor

bmatican commented Feb 7, 2023

Closing as too old. We've also fixed some cpp cassandra driver races.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants