Address sanitizer error when shutting down
Looks like there was a CheckStatistics
call during shutdown. Tried to check already deleted variable.
Resolution can be an ordered shutdown where CheckStatistics
is stopped at beginning of shutdown.
[2019-10-23 11:57:43.264] [core] [warning] [23935] [daqling::core::Command::stop_and_notify()] Shutting down...
=================================================================
==23919==ERROR: AddressSanitizer: heap-use-after-free on address 0x60c0000061e0 at pc 0x7fae70513412 bp 0x7fae618b9520 sp 0x7fae618b9518
READ of size 8 at 0x60c0000061e0 thread T10
#0 0x7fae70513411 in std::__shared_ptr<daqling::core::Metric_base, (__gnu_cxx::_Lock_policy)2>::get() const /opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/shared_ptr_base.h:1308
#1 0x7fae70510c25 in daqling::core::Statistics::CheckStatistics() /home/engamber/workspace/daqling/src/Core/Statistics.cpp:57