DLTcollab / tangle-accelerator

Accelerate IOTA transactions by caching API requests and redirecting to faster alternatives
MIT License
22 stars 16 forks source link

CI: Data race when executing ScyllaDB interface #286

Open YingHan-Chen opened 5 years ago

YingHan-Chen commented 5 years ago

Description

Running CI in node1, the test_scylla will connect to Scylla node in node0. However, there are many data races happened.

Below is part of the test log. `================== WARNING: ThreadSanitizer: data race (pid=14) Read of size 1 at 0x7b2c0007ff64 by thread T6:

0 writev (libtsan.so.0+0x33cba)

#1 <null> <null> (libuv.so.1+0x15a7a)

Previous write of size 8 at 0x7b2c0007ff60 by main thread:

0 malloc (libtsan.so.0+0x2ae03)

#1 datastax::internal::core::Buffer::Buffer(unsigned long) <null> (libcassandra.so.2+0x9ac24)
#2 create_bundle_table storage/scylla_api.c:190 (libstorage_Slibstorage.so+0x299d)
#3 init_scylla storage/scylla_api.c:248 (libstorage_Slibstorage.so+0x2b35)
#4 main tests/test_scylla.c:134 (test_scylla+0x2a77)

Location is heap block of size 170 at 0x7b2c0007ff60 allocated by main thread:

0 malloc (libtsan.so.0+0x2ae03)

#1 datastax::internal::core::Buffer::Buffer(unsigned long) <null> (libcassandra.so.2+0x9ac24)
#2 create_bundle_table storage/scylla_api.c:190 (libstorage_Slibstorage.so+0x299d)
#3 init_scylla storage/scylla_api.c:248 (libstorage_Slibstorage.so+0x2b35)
#4 main tests/test_scylla.c:134 (test_scylla+0x2a77)

Thread T6 (tid=21, running) created by thread T1 at:

0 pthread_create (libtsan.so.0+0x2bcee)

#1 uv_thread_create <null> (libuv.so.1+0x17cc0)

SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x33cba) in writev

================== WARNING: ThreadSanitizer: data race (pid=14) Atomic read of size 1 at 0x7b3800000010 by thread T6:

0 pthread_mutex_lock (libtsan.so.0+0x3fadb)

#1 uv_mutex_lock <null> (libuv.so.1+0x17e18)

Previous write of size 8 at 0x7b3800000010 by main thread:

0 malloc (libtsan.so.0+0x2ae03)

#1 datastax::internal::core::Session::execute(datastax::internal::SharedRefPtr<datastax::internal::core::Request const> const&, datastax::internal::core::Address const*) <null> (libcassandra.so.2+0x182663)
#2 create_bundle_table storage/scylla_api.c:190 (libstorage_Slibstorage.so+0x299d)
#3 init_scylla storage/scylla_api.c:248 (libstorage_Slibstorage.so+0x2b35)
#4 main tests/test_scylla.c:134 (test_scylla+0x2a77)

Location is heap block of size 224 at 0x7b3800000000 allocated by main thread:

0 malloc (libtsan.so.0+0x2ae03)

#1 datastax::internal::core::Session::execute(datastax::internal::SharedRefPtr<datastax::internal::core::Request const> const&, datastax::internal::core::Address const*) <null> (libcassandra.so.2+0x182663)
#2 create_bundle_table storage/scylla_api.c:190 (libstorage_Slibstorage.so+0x299d)
#3 init_scylla storage/scylla_api.c:248 (libstorage_Slibstorage.so+0x2b35)
#4 main tests/test_scylla.c:134 (test_scylla+0x2a77)

Thread T6 (tid=21, running) created by thread T1 at:

0 pthread_create (libtsan.so.0+0x2bcee)

#1 uv_thread_create <null> (libuv.so.1+0x17cc0)

SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x3fadb) in __interceptor_pthread_mutex_lock

`

howjmay commented 4 years ago

@locke2833 Have we got any progress on this issue?

howjmay commented 4 years ago

@YingHan-Chen We have implemented keyspace name assigning in scyllaDB interface, so can we close this issue?