Commit a479e1a
committed
Address possible data race with loggerApi
WARNING: ThreadSanitizer: data race (pid=16718)
Write of size 8 at 0x7f6a616aad60 by main thread:
#0 create_instance /home/abhinav/couchbase/ep-engine/src/ep_engine.cc:1809:9 (ep.so+0x0000000b2c9c)
couchbase#1 create_engine_instance /home/abhinav/couchbase/memcached/utilities/engine_loader.c:121:31 (libmcd_util.so.1.0.0+0x0000000056fd)
couchbase#2 create_bucket(bool, char const*) /home/abhinav/couchbase/memcached/programs/engine_testapp/engine_testapp.cc:924:9 (engine_testapp+0x0000000b99ed)
couchbase#3 create_buckets(char const*, int, std::vector<BucketHolder, std::allocator<BucketHolder> >&) /home/abhinav/couchbase/ep-engine/tests/ep_testsuite_common.cc:316:36 (ep_testsuite.so+0x0000000ab215)
couchbase#4 test_multi_bucket_set_get(test*) /home/abhinav/couchbase/ep-engine/tests/ep_testsuite.cc:14174:9 (ep_testsuite.so+0x000000093011)
couchbase#5 execute_test(test, char const*, char const*) /home/abhinav/couchbase/memcached/programs/engine_testapp/engine_testapp.cc:1103:19 (engine_testapp+0x0000000b937d)
#6 main /home/abhinav/couchbase/memcached/programs/engine_testapp/engine_testapp.cc:1439 (engine_testapp+0x0000000b937d)
Previous read of size 8 at 0x7f6a616aad60 by thread T2 (mutexes: write M11526, write M11540):
#0 LOG(EXTENSION_LOG_LEVEL, char const*, ...) /home/abhinav/couchbase/ep-engine/src/ep_engine.cc:1916:9 (ep.so+0x0000000b2eb4)
couchbase#1 TaskQueue::_schedule(SingleThreadedRCPtr<GlobalTask>&) /home/abhinav/couchbase/ep-engine/src/taskqueue.cc:225:5 (ep.so+0x000000141957)
couchbase#2 TaskQueue::schedule(SingleThreadedRCPtr<GlobalTask>&) /home/abhinav/couchbase/ep-engine/src/taskqueue.cc:239:5 (ep.so+0x000000141bde)
couchbase#3 ExecutorPool::_schedule(SingleThreadedRCPtr<GlobalTask>, task_type_t) /home/abhinav/couchbase/ep-engine/src/executorpool.cc:430:5 (ep.so+0x0000000ef2f5)
couchbase#4 ExecutorPool::schedule(SingleThreadedRCPtr<GlobalTask>, task_type_t) /home/abhinav/couchbase/ep-engine/src/executorpool.cc:437:17 (ep.so+0x0000000ef44f)
couchbase#5 Warmup::scheduleEstimateDatabaseItemCount() /home/abhinav/couchbase/ep-engine/src/warmup.cc:538:9 (ep.so+0x000000158b7a)
#6 Warmup::step() /home/abhinav/couchbase/ep-engine/src/warmup.cc:883:13 (ep.so+0x000000155510)
#7 Warmup::transition(int, bool) /home/abhinav/couchbase/ep-engine/src/warmup.cc:920:9 (ep.so+0x00000015856e)
#8 Warmup::createVBuckets(unsigned short) /home/abhinav/couchbase/ep-engine/src/warmup.cc:525 (ep.so+0x00000015856e)
#9 WarmupCreateVBuckets::run() /home/abhinav/couchbase/ep-engine/src/warmup.h:249:9 (ep.so+0x000000165236)
#10 ExecutorThread::run() /home/abhinav/couchbase/ep-engine/src/executorthread.cc:112:26 (ep.so+0x0000000f8296)
#11 launch_executor_thread(void*) /home/abhinav/couchbase/ep-engine/src/executorthread.cc:33:9 (ep.so+0x0000000f7e35)
#12 platform_thread_wrap /home/abhinav/couchbase/platform/src/cb_pthreads.c:23:5 (libplatform.so.0.1.0+0x000000003d31)
Location is global 'loggerApi' of size 8 at 0x7f6a616aad60 (ep.so+0x00000042ad60)
Change-Id: I3ec917106a9684dfc8ce26664a6926135b6cb299
Reviewed-on: http://review.couchbase.org/55840
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: buildbot <build@couchbase.com>1 parent e06c9f8 commit a479e1a
1 file changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
1805 | 1805 | | |
1806 | 1806 | | |
1807 | 1807 | | |
1808 | | - | |
1809 | | - | |
| 1808 | + | |
| 1809 | + | |
1810 | 1810 | | |
1811 | 1811 | | |
1812 | 1812 | | |
| |||
1913 | 1913 | | |
1914 | 1914 | | |
1915 | 1915 | | |
1916 | | - | |
| 1916 | + | |
1917 | 1917 | | |
1918 | 1918 | | |
1919 | 1919 | | |
1920 | 1920 | | |
1921 | 1921 | | |
1922 | 1922 | | |
1923 | 1923 | | |
1924 | | - | |
| 1924 | + | |
1925 | 1925 | | |
1926 | 1926 | | |
1927 | | - | |
| 1927 | + | |
1928 | 1928 | | |
1929 | 1929 | | |
1930 | 1930 | | |
| |||
1942 | 1942 | | |
1943 | 1943 | | |
1944 | 1944 | | |
1945 | | - | |
| 1945 | + | |
1946 | 1946 | | |
1947 | 1947 | | |
1948 | 1948 | | |
| |||
0 commit comments