DCDBPusher segfault on return from main
DCDBPusher will crash with a segmentation fault after returning from main under certain configurations. A wide variety of factors affects how and when the bug occurs, such as:
- Number of plugins, sensors and sensor groups instantiated;
- Compilation and execution environment;
- Minimal, uncorrelated changes to the code.
The bug has been confirmed to occur independently of the REST API, data analytics framework, and the specific pusher plugins being used. A temporary fix has been identified in NOT unloading dynamic libraries when destroying the PluginManager object. However, it is not certain whether this fix only reduced the likelihood of occurrence of the bug, or actually got rid of it.
We suspect the bug might be related to the termination and destruction of objects used by the BOOST ASIO backend (boost::asio::io_service) which might have global scope.