[ 
https://issues.apache.org/jira/browse/IMPALA-9308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sahil Takiar resolved IMPALA-9308.
----------------------------------
    Fix Version/s: Impala 3.4.0
         Assignee: Sahil Takiar
       Resolution: Fixed

This has been fixed by: 
https://issues.apache.org/jira/browse/IMPALA-5904?focusedCommentId=17033935&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17033935

> TSAN data race in ReservationTracker::used_reservation_ updates
> ---------------------------------------------------------------
>
>                 Key: IMPALA-9308
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9308
>             Project: IMPALA
>          Issue Type: Sub-task
>          Components: Backend
>            Reporter: Sahil Takiar
>            Assignee: Sahil Takiar
>            Priority: Major
>             Fix For: Impala 3.4.0
>
>
> buffer-pool-test fails on a TSAN build with the following error:
> {code}
> WARNING: ThreadSanitizer: data race (pid=49502)
>   Write of size 8 at 0x7b500001fc80 by thread T68:
>     #0 impala::ReservationTracker::UpdateUsedReservation(long) 
> /home/systest/Impala/be/src/runtime/bufferpool/reservation-tracker.cc:441:21 
> (buffer-pool-test+0x1987ef5)
>     #1 impala::ReservationTracker::ReleaseTo(long) 
> /home/systest/Impala/be/src/runtime/bufferpool/reservation-tracker.cc:392:3 
> (buffer-pool-test+0x1988047)
>     #2 impala::BufferPool::TransferBuffer(impala::BufferPool::ClientHandle*, 
> impala::BufferPool::BufferHandle*, impala::BufferPool::ClientHandle*, 
> impala::BufferPool::BufferHandle*) 
> /home/systest/Impala/be/src/runtime/bufferpool/buffer-pool.cc:268:37 
> (buffer-pool-test+0
> x197c349)
>     #3 
> impala::BufferPoolTest_BufferTransferConcurrent_Test::TestBody()::$_0::operator()()
>  const 
> /home/systest/Impala/be/src/runtime/bufferpool/buffer-pool-test.cc:828:46 
> (buffer-pool-test+0x194881c)
>     #4 
> boost::detail::thread_data<impala::BufferPoolTest_BufferTransferConcurrent_Test::TestBody()::$_0>::run()
>  
> /home/systest/Impala/toolchain/boost-1.57.0-p3/include/boost/thread/detail/thread.hpp:116:17
>  (buffer-pool-test+0x1948470)
>     #5 thread_proxy <null> (buffer-pool-test+0x2f9d659)
>   Previous atomic read of size 8 at 0x7b500001fc80 by thread T67:
>     #0 __tsan_atomic64_load 
> /mnt/source/llvm/llvm-5.0.1.src-p1/projects/compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc:540
>  (buffer-pool-test+0x18db5c6)
>     #1 base::subtle::Acquire_Load(long const volatile*) 
> /home/systest/Impala/be/src/gutil/atomicops-internals-tsan.h:179:10 
> (buffer-pool-test+0x19778de)
>     #2 impala::ReservationTracker::GetUsedReservation() 
> /home/systest/Impala/be/src/runtime/bufferpool/reservation-tracker.cc:407:10 
> (buffer-pool-test+0x198824f)
>     #3 impala::BufferPool::ClientHandle::GetUsedReservation() const 
> /home/systest/Impala/be/src/runtime/bufferpool/buffer-pool.cc:328:32 
> (buffer-pool-test+0x197cb29)
>     #4 
> impala::BufferPoolTest_BufferTransferConcurrent_Test::TestBody()::$_0::operator()()
>  const 
> /home/systest/Impala/be/src/runtime/bufferpool/buffer-pool-test.cc:833:214 
> (buffer-pool-test+0x19489c5)
>     #5 
> boost::detail::thread_data<impala::BufferPoolTest_BufferTransferConcurrent_Test::TestBody()::$_0>::run()
>  
> /home/systest/Impala/toolchain/boost-1.57.0-p3/include/boost/thread/detail/thread.hpp:116:17
>  (buffer-pool-test+0x1948470)
>     #6 thread_proxy <null> (buffer-pool-test+0x2f9d659)
>   Location is heap block of size 464 at 0x7b500001fc00 allocated by main 
> thread:                                                                       
>                                                                               
>                              [1948/29764]
>     #0 operator new(unsigned long) 
> /mnt/source/llvm/llvm-5.0.1.src-p1/projects/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc:44
>  (buffer-pool-test+0x19231c3)
>     #1 impala::BufferPool::RegisterClient(std::string const&, 
> impala::TmpFileMgr::FileGroup*, impala::ReservationTracker*, 
> impala::MemTracker*, long, impala::RuntimeProfile*, 
> impala::BufferPool::ClientHandle*, impala::MemLimit) 
> /home/systest/Impala/be/src/runtime/buffer
> pool/buffer-pool.cc:125:19 (buffer-pool-test+0x197a340)
>     #2 impala::BufferPoolTest_BufferTransferConcurrent_Test::TestBody() 
> /home/systest/Impala/be/src/runtime/bufferpool/buffer-pool-test.cc:798:40 
> (buffer-pool-test+0x192cd98)
>     #3 void 
> testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, 
> void>(testing::Test*, void (testing::Test::*)(), char const*) <null> 
> (buffer-pool-test+0x41702e2)
>     #4 __libc_start_main 
> /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291 (libc.so.6+0x2082f)
>   Thread T68 (tid=52296, running) created by main thread at:
>     #0 pthread_create 
> /mnt/source/llvm/llvm-5.0.1.src-p1/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:889
>  (buffer-pool-test+0x18bab5b)
>     #1 boost::thread::start_thread_noexcept() <null> 
> (buffer-pool-test+0x2f9ca39)
>     #2 
> boost::thread::thread<impala::BufferPoolTest_BufferTransferConcurrent_Test::TestBody()::$_0>(impala::BufferPoolTest_BufferTransferConcurrent_Test::TestBody()::$_0&&)
>  
> /home/systest/Impala/toolchain/boost-1.57.0-p3/include/boost/thread/detail/thread.hpp:266:13
>  (buf
> fer-pool-test+0x192d395)
>     #3 impala::BufferPoolTest_BufferTransferConcurrent_Test::TestBody() 
> /home/systest/Impala/be/src/runtime/bufferpool/buffer-pool-test.cc:806:28 
> (buffer-pool-test+0x192d072)
>     #4 void 
> testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, 
> void>(testing::Test*, void (testing::Test::*)(), char const*) <null> 
> (buffer-pool-test+0x41702e2)
>     #5 __libc_start_main 
> /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291 (libc.so.6+0x2082f)
>   Thread T67 (tid=52295, running) created by main thread at:
>     #0 pthread_create 
> /mnt/source/llvm/llvm-5.0.1.src-p1/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:889
>  (buffer-pool-test+0x18bab5b)
>     #1 boost::thread::start_thread_noexcept() <null> 
> (buffer-pool-test+0x2f9ca39)
>     #2 
> boost::thread::thread<impala::BufferPoolTest_BufferTransferConcurrent_Test::TestBody()::$_0>(impala::BufferPoolTest_BufferTransferConcurrent_Test::TestBody()::$_0&&)
>  
> /home/systest/Impala/toolchain/boost-1.57.0-p3/include/boost/thread/detail/thread.hpp:266:13
>  (buf
> fer-pool-test+0x192d395)
>     #3 impala::BufferPoolTest_BufferTransferConcurrent_Test::TestBody() 
> /home/systest/Impala/be/src/runtime/bufferpool/buffer-pool-test.cc:806:28 
> (buffer-pool-test+0x192d072)
>     #4 void 
> testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, 
> void>(testing::Test*, void (testing::Test::*)(), char const*) <null> 
> (buffer-pool-test+0x41702e2)
>     #5 __libc_start_main 
> /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291 (libc.so.6+0x2082f)
> SUMMARY: ThreadSanitizer: data race 
> /home/systest/Impala/be/src/runtime/bufferpool/reservation-tracker.cc:441:21 
> in impala::ReservationTracker::UpdateUsedReservation(long)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to