Random crash when starting applications
Hi @engamber
while testing out the web interface from Elham, I have now twice seen applications failing to start properly with the traceback below. This is with daqling v0.3.3. For this one I don't have an obvious fix.
Cheers, Brian
[2019-08-28 19:53:36.353] [core] [info] [4394] [Core.cpp:31] [daqling::core::Core::setupCommandPath()] BINDING COMMAND SOCKET : tcp://*:5540
[2019-08-28 19:53:36.355] [core] [info] [4394] [ConnectionManager.cpp:44] [daqling::core::ConnectionManager::setupCommandConnection()] Command is connected on: tcp://*:5540
/opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/stl_vector.h:933:34: runtime error: reference binding to null pointer of type 'struct value_type'
/DAQ/daq/daqling/src/Core/Command.cpp:168:29: runtime error: reference binding to null pointer of type 'struct function'
/opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/functional:811:62: runtime error: reference binding to null pointer of type 'struct type'
/opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/move.h:75:36: runtime error: reference binding to null pointer of type 'struct function'
/opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/functional:812:43: runtime error: reference binding to null pointer of type 'const struct function'
/opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/std_function.h:656:11: runtime error: member call on null pointer of type 'const struct function'
/opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/std_function.h:564:25: runtime error: member access within null pointer of type 'const struct function'
/opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/std_function.h:564:25: runtime error: member call on null pointer of type 'const struct _Function_base'
/opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/std_function.h:564:25: runtime error: member access within null pointer of type 'const struct function'
/opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/std_function.h:260:37: runtime error: member access within null pointer of type 'const struct _Function_base'
AddressSanitizer:DEADLYSIGNAL
=================================================================
==4394==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x0000004571e3 bp 0x7fa1654fa9e0 sp 0x7fa1654fa9d0 T4)
==4394==The signal is caused by a READ memory access.
==4394==Hint: address points to the zero page.
#0 0x4571e2 in std::_Function_base::_M_empty() const /opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/std_function.h:260
#1 0x7fa17041a599 in std::function<void ()>::operator bool() const /opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/std_function.h:564
#2 0x7fa17040eb23 in std::function<void ()>::function(std::function<void ()> const&) /opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/std_function.h:656
#3 0x7fa170452ebd in std::_Bind<std::function<void ()> ()>::_Bind<>(std::function<void ()> const&) /opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/functional:462
#4 0x7fa17043139b in std::_Bind_helper<std::__or_<std::is_integral<std::decay<std::function<void ()>&>::type>, std::is_enum<std::decay<std::function<void ()>&>::type> >::value, std::function<void ()>&>::type std::bind<std::function<void ()>&>(std::function<void ()>&) /opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/functional:812
#5 0x7fa17041a07a in bool daqling::utilities::ReusableThread::set_work<std::function<void ()>&>(std::function<void ()>&) /DAQ/daq/daqling/src/Utils/ReusableThread.hpp:61
#6 0x7fa1703fab2e in daqling::core::Command::handleCommand() /DAQ/daq/daqling/src/Core/Command.cpp:168
#7 0x7fa1704c1444 in operator() /DAQ/daq/daqling/src/Core/ConnectionManager.cpp:70
#8 0x7fa1704dff15 in __invoke_impl<void, daqling::core::ConnectionManager::setupCommandConnection(uint8_t, std::__cxx11::string)::<lambda()> > /opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/invoke.h:60
#9 0x7fa1704deb15 in __invoke<daqling::core::ConnectionManager::setupCommandConnection(uint8_t, std::__cxx11::string)::<lambda()> > /opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/invoke.h:95
#10 0x7fa1704e4189 in _M_invoke<0> /opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/thread:244
#11 0x7fa1704e3dc4 in operator() /opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/thread:253
#12 0x7fa1704e3c7e in _M_run /opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/thread:196
#13 0x7fa16ef71d9e in execute_native_thread_routine ../../../../../libstdc++-v3/src/c++11/thread.cc:80
#14 0x7fa16da68dd4 in start_thread (/lib64/libpthread.so.0+0x7dd4)
#15 0x7fa16d79202c in __clone (/lib64/libc.so.6+0xfe02c)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /opt/ohpc/pub/compiler/gcc/8.3.0/include/c++/8.3.0/bits/std_function.h:260 in std::_Function_base::_M_empty() const
Thread T4 created by T0 here:
#0 0x7fa1711311c0 in __interceptor_pthread_create ../../../../libsanitizer/asan/asan_interceptors.cc:202
#1 0x7fa16ef72024 in __gthread_create /home/abuild/rpmbuild/BUILD/gcc-8.3.0/obj/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:662
#2 0x7fa16ef72024 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) ../../../../../libstdc++-v3/src/c++11/thread.cc:135
#3 0x7fa1704c378f in daqling::core::ConnectionManager::setupCommandConnection(unsigned char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) /DAQ/daq/daqling/src/Core/ConnectionManager.cpp:49
#4 0x7fa170350055 in daqling::core::Core::setupCommandPath() /DAQ/daq/daqling/src/Core/Core.cpp:32
#5 0x4e821f in main /DAQ/daq/daqling/src/Exec/daqling.cpp:81
#6 0x7fa16d6b6494 in __libc_start_main (/lib64/libc.so.6+0x22494)
==4394==ABORTING