Running my program with -fsanitize=thread
produces a data race warning with quill. Is this potentially because some other thread is accessing a value passed to a quill log statement that has not yet completed?
It looks like thread T2, created by quill, is reading from the same data that thread T8 is writing to. Thread T8 was created by taskflow.
If it's expected behavior that the threaded nature of quill could potentially cause a data race if some other thread is modifying the same data that was passed to quill, then this may not be a quill bug and I need to be more careful with my usage of quill.
From the summary at the bottom of the thread trace:
SUMMARY: ThreadSanitizer: data race /home/xander/dev/vcpkg/installed/x64-linux/include/quill/detail/sps
c_queue/UnboundedSPSCEventQueue.h:140:27 in quill::detail::UnboundedSPSCEventQueue<quill::detail::BaseE
vent>::try_pop()
Thanks for this fantastic open source library. Grateful for any guidance on usage in a multi-threaded environment.
Full thread trace:
==================
WARNING: ThreadSanitizer: data race (pid=18389)
Read of size 8 at 0x7b4800090100 by thread T2:
#0 quill::detail::UnboundedSPSCEventQueue<quill::detail::BaseEvent>::try_pop() /home/xander/dev/vc$
kg/installed/x64-linux/include/quill/detail/spsc_queue/UnboundedSPSCEventQueue.h:140:27 (MyDataPre$rocessor+0x42df57)
#1 quill::detail::BackendWorker::_read_event_queue(quill::detail::ThreadContext*)
/home/xander/dev$vcpkg/installed/x64-linux/include/quill/detail/backend/BackendWorker.h:352:37 (MyDataPreProcessor+$
x42df57)
#2 quill::detail::BackendWorker::_populate_priority_queue(std::vector<quill::detail::ThreadContext$
, quill::detail::CacheAlignedAllocator<quill::detail::ThreadContext*> > const&) /home/xander/dev/vcpkg$
installed/x64-linux/include/quill/detail/backend/BackendWorker.h:335:5 (MyDataPreProcessor+0x42d3a$
)
#3 quill::detail::BackendWorker::_main_loop() /home/xander/dev/vcpkg/installed/x64-linux/include/q$
ill/detail/backend/BackendWorker.h:548:3 (MyDataPreProcessor+0x42d3a5)
#4 quill::detail::BackendWorker::run()::'lambda'()::operator()() const::'lambda'()::operator()() c$
nst /home/xander/dev/vcpkg/installed/x64-linux/include/quill/detail/backend/BackendWorker.h:296:21 (Pl$
tusDataPreProcessor+0x51a6c7)
#5 void std::__invoke_impl<void, quill::detail::BackendWorker::run()::'lambda'()::operator()() con$
t::'lambda'()>(std::__invoke_other, quill::detail::BackendWorker::run()::'lambda'()::operator()() cons$
::'lambda'()&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:60:14
(MyDataPreProcessor+0x51a559)
#6 std::__invoke_result<quill::detail::BackendWorker::run()::'lambda'()::operator()() const::'lamb$
a'()>::type std::__invoke<quill::detail::BackendWorker::run()::'lambda'()::operator()() const::'lambda$
()>(quill::detail::BackendWorker::run()::'lambda'()::operator()() const::'lambda'()&&) /usr/bin/../lib$
gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:95:14 (MyDataPreProcessor+0x51a55$
)
#7 void std::thread::_Invoker<std::tuple<quill::detail::BackendWorker::run()::'lambda'()::operator$
)() const::'lambda'()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/$
0/../../../../include/c++/10/thread:264:13 (MyDataPreProcessor+0x51a559)
#8 std::thread::_Invoker<std::tuple<quill::detail::BackendWorker::run()::'lambda'()::operator()() $
onst::'lambda'()> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/t$
read:271:11 (MyDataPreProcessor+0x51a559)
#9 std::thread::_State_impl<std::thread::_Invoker<std::tuple<quill::detail::BackendWorker::run()::$
lambda'()::operator()() const::'lambda'()> > >::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../..$
../../include/c++/10/thread:215:13 (MyDataPreProcessor+0x51a559)
#10 execute_native_thread_routine /home/conda/feedstock_root/build_artifacts/ctng-compilers_161823$
181388/work/.build/x86_64-conda-linux-gnu/src/gcc/libstdc++-v3/src/c++11/thread.cc:80:18 (libstdc++.so$
6+0xc9066)
Previous write of size 8 at 0x7b4800090100 by thread T8:
#0 posix_memalign <null> (MyDataPreProcessor+0x435c98)
#1 quill::detail::aligned_alloc(unsigned long, unsigned long) /home/xander/dev/vcpkg/buildtrees/qu$
ll/src/v1.6.2-b72390cb62.clean/quill/src/detail/misc/Os.cpp:254:28 (MyDataPreProcessor+0x5979cb)
#2 ccMydata::preprocess_record_batch(std::shared_ptr<arrow::RecordBatch>, junction::Concurrent$
ap_Leapfrog<long, ccMydata::Book*, junction::DefaultKeyTraits<long>, junction::DefaultValu$
Traits<ccMydata::Book*> >&, folly::fbvector<std::shared_ptr<ccMydata::Book>, s$
d::allocator<std::shared_ptr<ccMydata::Book> > >&, long&, std::unordered_map<long, folly::$
bvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::Or$
erBookLevel> > >, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, folly::fb$
ector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::Orde$
BookLevel> > > > > >&, std::unordered_set<long, std::hash<long>, std::equal_to<long>, std::allocator<l$
ng> >&, long&, tf::Executor&, tf::Taskflow&, folly::fbvector<std::shared_ptr<std::deque<folly::fbvecto$
<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator
<std::shared_ptr<ccMydata::BookItem> > > > > >, std::allocator<std::shared_ptr<std::deque<fol
ly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata
::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, st
d::allocator<std::shared_ptr<ccMydata::BookItem> > > > > > > >&, unsigned short&)::$_2::opera
tor()() const /home/xander/dev/My_model/pyMydata/pyMydata/PreprocessData.cc:152:41 (MyD
ataPreProcessor+0x4dd52a)
#3 void std::__invoke_impl<void, ccMydata::preprocess_record_batch(std::shared_ptr<arrow::Recor
dBatch>, junction::ConcurrentMap_Leapfrog<long, ccMydata::Book*, junction::DefaultKeyTraits
<long>, junction::DefaultValueTraits<ccMydata::Book*> >&, folly::fbvector<std::shared_ptr<c
cMydata::Book>, std::allocator<std::shared_ptr<ccMydata::Book> > >&, long&, std
::unordered_map<long, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std
::shared_ptr<ccMydata::BookItem> > >, std::hash<long>, std::equal_to<long>, std::allocator<st
d::pair<long const, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::
shared_ptr<ccMydata::BookItem> > > > > >&, std::unordered_set<long, std::hash<long>, std::equ
al_to<long>, std::allocator<long> >&, long&, tf::Executor&, tf::Taskflow&, folly::fbvector<std::shared_
ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::share
d_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccMydata::O
rderBookLevel>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >, std::allocator<
std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocato
r<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccp
lutusdata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > > > >&
, unsigned short&)::$_2&>(std::__invoke_other, ccMydata::preprocess_record_batch(std::shared_ptr<ar
row::RecordBatch>, junction::ConcurrentMap_Leapfrog<long, ccMydata::Book*, junction::Defaul
tKeyTraits<long>, junction::DefaultValueTraits<ccMydata::Book*> >&, folly::fbvector<std::sh
ared_ptr<ccMydata::Book>, std::allocator<std::shared_ptr<ccMydata::Book> > >&,
long&, std::unordered_map<long, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::all
ocator<std::shared_ptr<ccMydata::BookItem> > >, std::hash<long>, std::equal_to<long>, std::al
locator<std::pair<long const, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::alloc
ator<std::shared_ptr<ccMydata::BookItem> > > > > >&, std::unordered_set<long, std::hash<long>
, std::equal_to<long>, std::allocator<long> >&, long&, tf::Executor&, tf::Taskflow&, folly::fbvector<st
d::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<
std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccplu
tusdata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >, std::
allocator<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std
::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shar
ed_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >
> > > > >&, unsigned short&)::$_2&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/
bits/invoke.h:60:14 (MyDataPreProcessor+0x4dd52a)
#4 std::enable_if<is_invocable_r_v<void, ccMydata::preprocess_record_batch(std::shared_ptr<arro
w::RecordBatch>, junction::ConcurrentMap_Leapfrog<long, ccMydata::Book*, junction::DefaultK
eyTraits<long>, junction::DefaultValueTraits<ccMydata::Book*> >&, folly::fbvector<std::shar
ed_ptr<ccMydata::Book>, std::allocator<std::shared_ptr<ccMydata::Book> > >&, lo
ng&, std::unordered_map<long, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::alloc
ator<std::shared_ptr<ccMydata::BookItem> > >, std::hash<long>, std::equal_to<long>, std::allo
cator<std::pair<long const, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocat
or<std::shared_ptr<ccMydata::BookItem> > > > > >&, std::unordered_set<long, std::hash<long>,
std::equal_to<long>, std::allocator<long> >&, long&, tf::Executor&, tf::Taskflow&, folly::fbvector<std:
:shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<st
d::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccplutu
sdata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >, std::al
locator<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::
allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared
_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > >
> > > >&, unsigned short&)::$_2&>, void>::type std::__invoke_r<void, ccMydata::preprocess_record_ba
tch(std::shared_ptr<arrow::RecordBatch>, junction::ConcurrentMap_Leapfrog<long, ccMydata::Book*, junction::DefaultKeyTraits<long>, junction::DefaultValueTraits<ccMydata::Book*> >&, f
olly::fbvector<std::shared_ptr<ccMydata::Book>, std::allocator<std::shared_ptr<ccMydata
::Book> > >&, long&, std::unordered_map<long, folly::fbvector<std::shared_ptr<ccMydata::Ord
erBookLevel>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::hash<long>, std::e
qual_to<long>, std::allocator<std::pair<long const, folly::fbvector<std::shared_ptr<ccMydata::Order
BookLevel>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >&, std::unordered_set
<long, std::hash<long>, std::equal_to<long>, std::allocator<long> >&, long&, tf::Executor&, tf::Taskflo
w&, folly::fbvector<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector
<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >, std::allocator<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata
::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<fol
ly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata
::BookItem> > > > > > > >&, unsigned short&)::$_2&>(ccMydata::preprocess_record_batch(std::sh
ared_ptr<arrow::RecordBatch>, junction::ConcurrentMap_Leapfrog<long, ccMydata::Book*, junct
ion::DefaultKeyTraits<long>, junction::DefaultValueTraits<ccMydata::Book*> >&, folly::fbvec
tor<std::shared_ptr<ccMydata::Book>, std::allocator<std::shared_ptr<ccMydata::Book> > >&, long&, std::unordered_map<long, folly::fbvector<std::shared_ptr<ccMydata::BookItem
>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::hash<long>, std::equal_to<lon
g>, std::allocator<std::pair<long const, folly::fbvector<std::shared_ptr<ccMydata::BookItem>,
std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >&, std::unordered_set<long, std:
:hash<long>, std::equal_to<long>, std::allocator<long> >&, long&, tf::Executor&, tf::Taskflow&, folly::
fbvector<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std:
:allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::share
d_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > >
> >, std::allocator<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvecto
r<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > > > >&, unsigned short&)::$_2&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../incl
ude/c++/10/bits/invoke.h:110:2 (MyDataPreProcessor+0x4dd52a)
#5 std::_Function_handler<void (), ccMydata::preprocess_record_batch(std::shared_ptr<arrow::Rec
ordBatch>, junction::ConcurrentMap_Leapfrog<long, ccMydata::Book*, junction::DefaultKeyTrai
ts<long>, junction::DefaultValueTraits<ccMydata::Book*> >&, folly::fbvector<std::shared_ptr
<ccMydata::Book>, std::allocator<std::shared_ptr<ccMydata::Book> > >&, long&, s
td::unordered_map<long, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<s
td::shared_ptr<ccMydata::BookItem> > >, std::hash<long>, std::equal_to<long>, std::allocator<
std::pair<long const, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std
::shared_ptr<ccMydata::BookItem> > > > > >&, std::unordered_set<long, std::hash<long>, std::e
qual_to<long>, std::allocator<long> >&, long&, tf::Executor&, tf::Taskflow&, folly::fbvector<std::share
d_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::sha
red_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccMydata:
:BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >, std::allocato
r<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::alloca
tor<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<c
cMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > > >
>&, unsigned short&)::$_2>::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/..
/../../../include/c++/10/bits/std_function.h:291:9 (MyDataPreProcessor+0x4dd52a)
#6 std::function<void ()>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../i
nclude/c++/10/bits/std_function.h:622:14 (MyDataPreProcessor+0x50ffd8)
#7 tf::Executor::_invoke_static_task(tf::Worker&, tf::Node*) /home/xander/dev/vcpkg/installed/x64-l
inux/include/taskflow/core/algorithm/../executor.hpp:818:3 (MyDataPreProcessor+0x50ffd8)
#8 tf::Executor::_invoke(tf::Worker&, tf::Node*) /home/xander/dev/vcpkg/installed/x64-linux/include
/taskflow/core/algorithm/../executor.hpp:666:7 (MyDataPreProcessor+0x50f3a1)
#9 tf::Executor::_exploit_task(tf::Worker&, tf::Node*&) /home/xander/dev/vcpkg/installed/x64-linux/
include/taskflow/core/algorithm/../executor.hpp:462:7 (MyDataPreProcessor+0x50e957)
#10 tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&)::operator()(tf::Worker&) const /home
/xander/dev/vcpkg/installed/x64-linux/include/taskflow/core/algorithm/../executor.hpp:392:9 (MyData
PreProcessor+0x50e957)
#11 void std::__invoke_impl<void, tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&), std::
reference_wrapper<tf::Worker> >(std::__invoke_other, tf::Executor::_spawn(unsigned long)::'lambda'(tf::
Worker&)&&, std::reference_wrapper<tf::Worker>&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../i
nclude/c++/10/bits/invoke.h:60:14 (MyDataPreProcessor+0x50e809)
#12 std::__invoke_result<tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&), std::reference
_wrapper<tf::Worker> >::type std::__invoke<tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&),
std::reference_wrapper<tf::Worker> >(tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&)&&, std:
:reference_wrapper<tf::Worker>&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bi
ts/invoke.h:95:14 (MyDataPreProcessor+0x50e809)
#13 void std::thread::_Invoker<std::tuple<tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&
), std::reference_wrapper<tf::Worker> > >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/..
/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/thread:264:13 (MyDataPreProcessor+0x50e809)
#14 std::thread::_Invoker<std::tuple<tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&), st
d::reference_wrapper<tf::Worker> > >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../
include/c++/10/thread:271:11 (MyDataPreProcessor+0x50e809)
#15 std::thread::_State_impl<std::thread::_Invoker<std::tuple<tf::Executor::_spawn(unsigned long)::
'lambda'(tf::Worker&), std::reference_wrapper<tf::Worker> > > >::_M_run() /usr/bin/../lib/gcc/x86_64-li
nux-gnu/10/../../../../include/c++/10/thread:215:13 (MyDataPreProcessor+0x50e809)
#16 execute_native_thread_routine /home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239
181388/work/.build/x86_64-conda-linux-gnu/src/gcc/libstdc++-v3/src/c++11/thread.cc:80:18 (libstdc++.so.
6+0xc9066)
As if synchronized via sleep:
#0 nanosleep <null> (MyDataPreProcessor+0x433b2d)
#1 void std::this_thread::sleep_for<long, std::ratio<1l, 1000000000l> >(std::chrono::duration<long,
std::ratio<1l, 1000000000l> > const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/
10/thread:401:9 (MyDataPreProcessor+0x42d4ef)
#2 quill::detail::BackendWorker::_main_loop() /home/xander/dev/vcpkg/installed/x64-linux/include/qu
ill/detail/backend/BackendWorker.h:570:5 (MyDataPreProcessor+0x42d4ef)
#3 quill::detail::BackendWorker::run()::'lambda'()::operator()() const::'lambda'()::operator()() co
nst /home/xander/dev/vcpkg/installed/x64-linux/include/quill/detail/backend/BackendWorker.h:296:21 (Plu
tusDataPreProcessor+0x51a6c7)
#4 void std::__invoke_impl<void, quill::detail::BackendWorker::run()::'lambda'()::operator()() cons
t::'lambda'()>(std::__invoke_other, quill::detail::BackendWorker::run()::'lambda'()::operator()() const
::'lambda'()&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:60:14
(MyDataPreProcessor+0x51a559)
#5 std::__invoke_result<quill::detail::BackendWorker::run()::'lambda'()::operator()() const::'lambd
a'()>::type std::__invoke<quill::detail::BackendWorker::run()::'lambda'()::operator()() const::'lambda'
()>(quill::detail::BackendWorker::run()::'lambda'()::operator()() const::'lambda'()&&) /usr/bin/../lib/
gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:95:14 (MyDataPreProcessor+0x51a559
)
#6 void std::thread::_Invoker<std::tuple<quill::detail::BackendWorker::run()::'lambda'()::operator(
)() const::'lambda'()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/1
0/../../../../include/c++/10/thread:264:13 (MyDataPreProcessor+0x51a559)
#7 std::thread::_Invoker<std::tuple<quill::detail::BackendWorker::run()::'lambda'()::operator()() c
onst::'lambda'()> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/th
read:271:11 (MyDataPreProcessor+0x51a559)
#8 std::thread::_State_impl<std::thread::_Invoker<std::tuple<quill::detail::BackendWorker::run()::'
lambda'()::operator()() const::'lambda'()> > >::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../
../../include/c++/10/thread:215:13 (MyDataPreProcessor+0x51a559)
#9 execute_native_thread_routine /home/conda/feedstock_root/build_artifacts/ctng-compilers_16182391
81388/work/.build/x86_64-conda-linux-gnu/src/gcc/libstdc++-v3/src/c++11/thread.cc:80:18 (libstdc++.so.6
+0xc9066)
Location is heap block of size 384 at 0x7b4800090000 allocated by thread T8:
#0 posix_memalign <null> (MyDataPreProcessor+0x435c98)
#1 quill::detail::aligned_alloc(unsigned long, unsigned long) /home/xander/dev/vcpkg/buildtrees/qui
ll/src/v1.6.2-b72390cb62.clean/quill/src/detail/misc/Os.cpp:254:28 (MyDataPreProcessor+0x5979cb)
#2 ccMydata::preprocess_record_batch(std::shared_ptr<arrow::RecordBatch>, junction::ConcurrentM
ap_Leapfrog<long, ccMydata::Book*, junction::DefaultKeyTraits<long>, junction::DefaultValue
Traits<ccMydata::Book*> >&, folly::fbvector<std::shared_ptr<ccMydata::Book>, st
d::allocator<std::shared_ptr<ccMydata::Book> > >&, long&, std::unordered_map<long, folly::f
bvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::Ord
erBookLevel> > >, std::hash<long>, std::equal_to<long>, std::allocator<std::pair<long const, folly::fbv
ector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::Order
BookLevel> > > > > >&, std::unordered_set<long, std::hash<long>, std::equal_to<long>, std::allocator<lo
ng> >&, long&, tf::Executor&, tf::Taskflow&, folly::fbvector<std::shared_ptr<std::deque<folly::fbvector
<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator
<std::shared_ptr<ccMydata::BookItem> > > > > >, std::allocator<std::shared_ptr<std::deque<fol
ly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata
::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, st
d::allocator<std::shared_ptr<ccMydata::BookItem> > > > > > > >&, unsigned short&)::$_2::opera
tor()() const /home/xander/dev/My_model/pyMydata/pyMydata/PreprocessData.cc:152:41 (MyD
ataPreProcessor+0x4dd52a)
#3 void std::__invoke_impl<void, ccMydata::preprocess_record_batch(std::shared_ptr<arrow::Recor
dBatch>, junction::ConcurrentMap_Leapfrog<long, ccMydata::Book*, junction::DefaultKeyTraits
<long>, junction::DefaultValueTraits<ccMydata::Book*> >&, folly::fbvector<std::shared_ptr<c
cMydata::Book>, std::allocator<std::shared_ptr<ccMydata::Book> > >&, long&, std
::unordered_map<long, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std
::shared_ptr<ccMydata::BookItem> > >, std::hash<long>, std::equal_to<long>, std::allocator<st
d::pair<long const, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::
shared_ptr<ccMydata::BookItem> > > > > >&, std::unordered_set<long, std::hash<long>, std::equ
al_to<long>, std::allocator<long> >&, long&, tf::Executor&, tf::Taskflow&, folly::fbvector<std::shared_
ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::share
d_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccMydata::O
rderBookLevel>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >, std::allocator<
std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocato
r<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccp
lutusdata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > > > >&
, unsigned short&)::$_2&>(std::__invoke_other, ccMydata::preprocess_record_batch(std::shared_ptr<ar
row::RecordBatch>, junction::ConcurrentMap_Leapfrog<long, ccMydata::Book*, junction::Defaul
tKeyTraits<long>, junction::DefaultValueTraits<ccMydata::Book*> >&, folly::fbvector<std::sh
ared_ptr<ccMydata::Book>, std::allocator<std::shared_ptr<ccMydata::Book> > >&,
long&, std::unordered_map<long, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::all
ocator<std::shared_ptr<ccMydata::BookItem> > >, std::hash<long>, std::equal_to<long>, std::al
locator<std::pair<long const, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::alloc
ator<std::shared_ptr<ccMydata::BookItem> > > > > >&, std::unordered_set<long, std::hash<long>
, std::equal_to<long>, std::allocator<long> >&, long&, tf::Executor&, tf::Taskflow&, folly::fbvector<st
d::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<
std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccplu
tusdata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >, std::
allocator<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std
::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shar
ed_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >
> > > > >&, unsigned short&)::$_2&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/
bits/invoke.h:60:14 (MyDataPreProcessor+0x4dd52a)
#4 std::enable_if<is_invocable_r_v<void, ccMydata::preprocess_record_batch(std::shared_ptr<arro
w::RecordBatch>, junction::ConcurrentMap_Leapfrog<long, ccMydata::Book*, junction::DefaultK
eyTraits<long>, junction::DefaultValueTraits<ccMydata::Book*> >&, folly::fbvector<std::shar
ed_ptr<ccMydata::Book>, std::allocator<std::shared_ptr<ccMydata::Book> > >&, lo
ng&, std::unordered_map<long, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::alloc
ator<std::shared_ptr<ccMydata::BookItem> > >, std::hash<long>, std::equal_to<long>, std::allo
cator<std::pair<long const, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocat
or<std::shared_ptr<ccMydata::BookItem> > > > > >&, std::unordered_set<long, std::hash<long>,
std::equal_to<long>, std::allocator<long> >&, long&, tf::Executor&, tf::Taskflow&, folly::fbvector<std:
:shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<st
d::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccplutu
sdata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >, std::al
locator<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::
allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared
_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > >
> > > >&, unsigned short&)::$_2&>, void>::type std::__invoke_r<void, ccMydata::preprocess_record_ba
tch(std::shared_ptr<arrow::RecordBatch>, junction::ConcurrentMap_Leapfrog<long, ccMydata::Book*, junction::DefaultKeyTraits<long>, junction::DefaultValueTraits<ccMydata::Book*> >&, f
olly::fbvector<std::shared_ptr<ccMydata::Book>, std::allocator<std::shared_ptr<ccMydata
::Book> > >&, long&, std::unordered_map<long, folly::fbvector<std::shared_ptr<ccMydata::Ord
erBookLevel>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::hash<long>, std::e
qual_to<long>, std::allocator<std::pair<long const, folly::fbvector<std::shared_ptr<ccMydata::Order
BookLevel>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >&, std::unordered_set
<long, std::hash<long>, std::equal_to<long>, std::allocator<long> >&, long&, tf::Executor&, tf::Taskflo
w&, folly::fbvector<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector
<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >, std::allocator<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata
::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<fol
ly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata
::BookItem> > > > > > > >&, unsigned short&)::$_2&>(ccMydata::preprocess_record_batch(std::sh
ared_ptr<arrow::RecordBatch>, junction::ConcurrentMap_Leapfrog<long, ccMydata::Book*, junct
ion::DefaultKeyTraits<long>, junction::DefaultValueTraits<ccMydata::Book*> >&, folly::fbvec
tor<std::shared_ptr<ccMydata::Book>, std::allocator<std::shared_ptr<ccMydata::Book> > >&, long&, std::unordered_map<long, folly::fbvector<std::shared_ptr<ccMydata::BookItem
>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::hash<long>, std::equal_to<lon
g>, std::allocator<std::pair<long const, folly::fbvector<std::shared_ptr<ccMydata::BookItem>,
std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >&, std::unordered_set<long, std:
:hash<long>, std::equal_to<long>, std::allocator<long> >&, long&, tf::Executor&, tf::Taskflow&, folly::
fbvector<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std:
:allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::share
d_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > >
> >, std::allocator<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvecto
r<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > > > >&, unsigned short&)::$_2&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../incl
ude/c++/10/bits/invoke.h:110:2 (MyDataPreProcessor+0x4dd52a)
#5 std::_Function_handler<void (), ccMydata::preprocess_record_batch(std::shared_ptr<arrow::Rec
ordBatch>, junction::ConcurrentMap_Leapfrog<long, ccMydata::Book*, junction::DefaultKeyTrai
ts<long>, junction::DefaultValueTraits<ccMydata::Book*> >&, folly::fbvector<std::shared_ptr
<ccMydata::Book>, std::allocator<std::shared_ptr<ccMydata::Book> > >&, long&, s
td::unordered_map<long, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<s
td::shared_ptr<ccMydata::BookItem> > >, std::hash<long>, std::equal_to<long>, std::allocator<
std::pair<long const, folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std
::shared_ptr<ccMydata::BookItem> > > > > >&, std::unordered_set<long, std::hash<long>, std::e
qual_to<long>, std::allocator<long> >&, long&, tf::Executor&, tf::Taskflow&, folly::fbvector<std::share
d_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::allocator<std::sha
red_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<ccMydata:
:BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > >, std::allocato
r<std::shared_ptr<std::deque<folly::fbvector<std::shared_ptr<ccMydata::BookItem>, std::alloca
tor<std::shared_ptr<ccMydata::BookItem> > >, std::allocator<folly::fbvector<std::shared_ptr<c
cMydata::BookItem>, std::allocator<std::shared_ptr<ccMydata::BookItem> > > > > > >
>&, unsigned short&)::$_2>::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/..
/../../../include/c++/10/bits/std_function.h:291:9 (MyDataPreProcessor+0x4dd52a)
#6 std::function<void ()>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../i
nclude/c++/10/bits/std_function.h:622:14 (MyDataPreProcessor+0x50ffd8)
#7 tf::Executor::_invoke_static_task(tf::Worker&, tf::Node*) /home/xander/dev/vcpkg/installed/x64-l
inux/include/taskflow/core/algorithm/../executor.hpp:818:3 (MyDataPreProcessor+0x50ffd8)
#8 tf::Executor::_invoke(tf::Worker&, tf::Node*) /home/xander/dev/vcpkg/installed/x64-linux/include
/taskflow/core/algorithm/../executor.hpp:666:7 (MyDataPreProcessor+0x50f3a1)
#9 tf::Executor::_exploit_task(tf::Worker&, tf::Node*&) /home/xander/dev/vcpkg/installed/x64-linux/
include/taskflow/core/algorithm/../executor.hpp:462:7 (MyDataPreProcessor+0x50e957)
#10 tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&)::operator()(tf::Worker&) const /home
/xander/dev/vcpkg/installed/x64-linux/include/taskflow/core/algorithm/../executor.hpp:392:9 (MyData
PreProcessor+0x50e957)
#11 void std::__invoke_impl<void, tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&), std::
reference_wrapper<tf::Worker> >(std::__invoke_other, tf::Executor::_spawn(unsigned long)::'lambda'(tf::
Worker&)&&, std::reference_wrapper<tf::Worker>&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../i
nclude/c++/10/bits/invoke.h:60:14 (MyDataPreProcessor+0x50e809)
#12 std::__invoke_result<tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&), std::reference
_wrapper<tf::Worker> >::type std::__invoke<tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&),
std::reference_wrapper<tf::Worker> >(tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&)&&, std:
:reference_wrapper<tf::Worker>&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bi
ts/invoke.h:95:14 (MyDataPreProcessor+0x50e809)
#13 void std::thread::_Invoker<std::tuple<tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&
), std::reference_wrapper<tf::Worker> > >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/..
/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/thread:264:13 (MyDataPreProcessor+0x50e809)
#14 std::thread::_Invoker<std::tuple<tf::Executor::_spawn(unsigned long)::'lambda'(tf::Worker&), st
d::reference_wrapper<tf::Worker> > >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../
include/c++/10/thread:271:11 (MyDataPreProcessor+0x50e809)
#15 std::thread::_State_impl<std::thread::_Invoker<std::tuple<tf::Executor::_spawn(unsigned long)::
'lambda'(tf::Worker&), std::reference_wrapper<tf::Worker> > > >::_M_run() /usr/bin/../lib/gcc/x86_64-li
nux-gnu/10/../../../../include/c++/10/thread:215:13 (MyDataPreProcessor+0x50e809)
#16 execute_native_thread_routine /home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239
181388/work/.build/x86_64-conda-linux-gnu/src/gcc/libstdc++-v3/src/c++11/thread.cc:80:18 (libstdc++.so.
6+0xc9066)
Thread T2 'Quill_Backend' (tid=18392, running) created by main thread at:
#0 pthread_create <null> (MyDataPreProcessor+0x4361db)
#1 __gthread_create /home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239181388/work/.b
uild/x86_64-conda-linux-gnu/build/build-cc-gcc-final/x86_64-conda-linux-gnu/libstdc++-v3/include/x86_64
-conda-linux-gnu/bits/gthr-default.h:676:35 (libstdc++.so.6+0xc91f8)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::threa
d::_State> >, void (*)()) /home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239181388/work/
.build/x86_64-conda-linux-gnu/src/gcc/libstdc++-v3/src/c++11/thread.cc:135:37 (libstdc++.so.6+0xc91f8)
#3 void std::__invoke_impl<void, quill::detail::BackendWorker::run()::'lambda'()>(std::__invoke_oth
er, quill::detail::BackendWorker::run()::'lambda'()&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../..
/../include/c++/10/bits/invoke.h:60:14 (MyDataPreProcessor+0x51a346)
#4 std::__invoke_result<quill::detail::BackendWorker::run()::'lambda'()>::type std::__invoke<quill:
:detail::BackendWorker::run()::'lambda'()>(quill::detail::BackendWorker::run()::'lambda'()&&) /usr/bin/
../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/invoke.h:95:14 (MyDataPreProcessor+0
x51a346)
#5 void std::call_once<quill::detail::BackendWorker::run()::'lambda'()>(std::once_flag&, quill::det
ail::BackendWorker::run()::'lambda'()&&)::'lambda'()::operator()() const /usr/bin/../lib/gcc/x86_64-lin
ux-gnu/10/../../../../include/c++/10/mutex:717:4 (MyDataPreProcessor+0x51a346)
#6 void std::call_once<quill::detail::BackendWorker::run()::'lambda'()>(std::once_flag&, quill::det
ail::BackendWorker::run()::'lambda'()&&)::'lambda0'()::operator()() const /usr/bin/../lib/gcc/x86_64-li
nux-gnu/10/../../../../include/c++/10/mutex:722:25 (MyDataPreProcessor+0x51a346)
#7 void std::call_once<quill::detail::BackendWorker::run()::'lambda'()>(std::once_flag&, quill::det
ail::BackendWorker::run()::'lambda'()&&)::'lambda0'()::__invoke() /usr/bin/../lib/gcc/x86_64-linux-gnu/
10/../../../../include/c++/10/mutex:722:21 (MyDataPreProcessor+0x51a346)
#8 pthread_once <null> (MyDataPreProcessor+0x439595)
#9 __gthread_once(int*, void (*)()) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/x86
_64-linux-gnu/c++/10/bits/gthr-default.h:700:12 (MyDataPreProcessor+0x51a2e0)
#10 void std::call_once<quill::detail::BackendWorker::run()::'lambda'()>(std::once_flag&, quill::de
tail::BackendWorker::run()::'lambda'()&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c
++/10/mutex:729:17 (MyDataPreProcessor+0x51a2e0)
#11 quill::detail::BackendWorker::run() /home/xander/dev/vcpkg/installed/x64-linux/include/quill/de
tail/backend/BackendWorker.h:249:3 (MyDataPreProcessor+0x42ad10)
#12 quill::detail::LogManager::start_backend_worker(bool, std::initializer_list<int> const&) /home/
xander/dev/vcpkg/installed/x64-linux/include/quill/detail/LogManager.h:150:21 (MyDataPreProcessor+0
x42ad10)
#13 quill::start(bool, std::initializer_list<int>) /home/xander/dev/vcpkg/installed/x64-linux/inclu
de/quill/Quill.h:60:57 (MyDataPreProcessor+0x42ac55)
#14 initialize_logging() /home/xander/dev/My_model/pyMydata/pyMydata/PreprocessData.cc:
483:5 (MyDataPreProcessor+0x4dc771)
#15 main /home/xander/dev/My_model/pyMydata/pyMydata/PreprocessData.cc:490:5 (MyDat
aPreProcessor+0x4dc832)
Thread T8 (tid=18399, running) created by main thread at:
#0 pthread_create <null> (MyDataPreProcessor+0x4361db)
#1 __gthread_create /home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239181388/work/.b
uild/x86_64-conda-linux-gnu/build/build-cc-gcc-final/x86_64-conda-linux-gnu/libstdc++-v3/include/x86_64
-conda-linux-gnu/bits/gthr-default.h:676:35 (libstdc++.so.6+0xc91f8)
#2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::threa
d::_State> >, void (*)()) /home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239181388/work/
.build/x86_64-conda-linux-gnu/src/gcc/libstdc++-v3/src/c++11/thread.cc:135:37 (libstdc++.so.6+0xc91f8)
#3 tf::Executor::Executor(unsigned long) /home/xander/dev/vcpkg/installed/x64-linux/include/taskflo
w/core/algorithm/../executor.hpp:277:3 (MyDataPreProcessor+0x4e92cf)
#4 ccMydata::process_incoming_batches(unsigned short&) /home/xander/dev/My_model/pyMyda
ta/pyMydata/PreprocessData.cc:294:22 (MyDataPreProcessor+0x4d54d3)
#5 main /home/xander/dev/My_model/pyMydata/pyMydata/PreprocessData.cc:493:5 (MyData
PreProcessor+0x4dc858)
SUMMARY: ThreadSanitizer: data race /home/xander/dev/vcpkg/installed/x64-linux/include/quill/detail/sps
c_queue/UnboundedSPSCEventQueue.h:140:27 in quill::detail::UnboundedSPSCEventQueue<quill::detail::BaseE
vent>::try_pop()