Boost C++ Libraries: Ticket #12010: Exception thrown when using syslog_backend and a separate asio_server with a udp socket https://svn.boost.org/trac10/ticket/12010 <p> When I try to setup a syslog_backend in a code base that already has an asio_server that opens UDP sockets, an exception gets thrown. </p> <p> I am building with gcc 4.8 on ubuntu 14.04. </p> <p> I compile my program as such: </p> <pre class="wiki"> /usr/bin/c++ -Wall -Werror -std=c++11 -g -I/home/Phil/work/3p/posix-x86_64/boost@1.60.0/include -MMD -MT boostTestProject/CMakeFiles/BoostExe.dir/main.cpp.o -MF "boostTestProject/CMakeFiles/BoostExe.dir/main.cpp.o.d" -o boostTestProject/CMakeFiles/BoostExe.dir/main.cpp.o -c /home/Phil/work/Testing/boostTestProject/main.cpp usr/bin/c++ -Wall -Werror -std=c++11 -g boostTestProject/CMakeFiles/BoostExe.dir/main.cpp.o -o boostTestProject/BoostExe -rdynamic /home/Phil/work/3p/posix-x86_64/boost@1.60.0/lib/static/debug/libboost_log.a /home/Phil/work/3p/posix-x86_64/boost@1.60.0/lib/static/debug/libboost_log_setup.a /home/Phil/work/3p/posix-x86_64/boost@1.60.0/lib/static/debug/libboost_system.a /home/Phil/work/3p/posix-x86_64/boost@1.60.0/lib/static/debug/libboost_filesystem.a /home/Phil/work/3p/posix-x86_64/boost@1.60.0/lib/static/debug/libboost_date_time.a /home/Phil/work/3p/posix-x86_64/boost@1.60.0/lib/static/debug/libboost_program_options.a /home/Phil/work/3p/posix-x86_64/boost@1.60.0/lib/static/debug/libboost_thread.a /home/Phil/work/3p/posix-x86_64/boost@1.60.0/lib/static/debug/libboost_chrono.a -lpthread -lrt </pre><p> Below is a capture of the stack trace and error I get: </p> <pre class="wiki"> Traceback (most recent call last): File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in &lt;module&gt; from libstdcxx.v6.printers import register_libstdcxx_printers ImportError: No module named 'libstdcxx' terminate called after throwing an instance of 'boost::exception_detail::clone_impl&lt;boost::exception_detail::error_info_injector&lt;boost::system::system_error&gt; &gt;' what(): open: Already open Program received signal SIGABRT, Aborted. 0x00007ffff710bcc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff710bcc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007ffff710f0d8 in __GI_abort () at abort.c:89 #2 0x00007ffff7710535 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #3 0x00007ffff770e6d6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #4 0x00007ffff770e703 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #5 0x00007ffff770e976 in __cxa_rethrow () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #6 0x00000000004c1d08 in boost::log::v2s_mt_posix::core::push_record_move (this=0x74c930, rec=...) at libs/log/src/core.cpp:734 #7 0x00000000004a29b1 in push_record ( rec=&lt;unknown type in /home/Phil/work/build/Testing/Ninja/Debug/boostTestProject/BoostExe, CU 0x42378, DIE 0x723ce&gt;, this=0x74c930) at /home/pjosep/work/boost_1_60_0_built/posix-x86_64/boost@1.56.0/include/boost/log/core/core.hpp:308 #8 boost::log::v2s_mt_posix::sources::basic_logger&lt;char, boost::log::v2s_mt_posix::sources::severity_logger_mt&lt;int&gt;, boost::log::v2s_mt_posix::sources::multi_thread_model&lt;boost::log::v2s_mt_posix::aux::light_rw_mutex&gt; &gt;::push_record_unlocked(boost::log::v2s_mt_posix::record&amp;&amp;) ( this=0x7fffffffe070, rec=&lt;unknown type in /home/Phil/work/build/Testing/Ninja/Debug/boostTestProject/BoostExe, CU 0x42378, DIE 0x7bb10&gt;) at /home/pjosep/work/boost_1_60_0_built/posix-x86_64/boost@1.56.0/include/boost/log/sources/basic_logger.hpp:267 #9 0x00000000004a198a in boost::log::v2s_mt_posix::sources::basic_composite_logger&lt;char, boost::log::v2s_mt_posix::sources::severity_logger_mt&lt;int&gt;, boost::log::v2s_mt_posix::sources::multi_thread_model&lt;boost::log::v2s_mt_posix::aux::light_rw_mutex&gt;, boost::log::v2s_mt_posix::sources::features&lt;boost::log::v2s_mt_posix::sources::severity&lt;int&gt; &gt; &gt;::push_record(boost::log::v2s_mt_posix::record&amp;&amp;) (this=0x7fffffffe070, rec=&lt;unknown type in /home/Phil/work/build/Testing/Ninja/Debug/boostTestProject/BoostExe, CU 0x42378, DIE 0x7bb10&gt;) at /home/pjosep/work/boost_1_60_0_built/posix-x86_64/boost@1.56.0/include/boost/log/sources/basic_logger.hpp:472 #10 0x00000000004a0792 in boost::log::v2s_mt_posix::aux::record_pump&lt;boost::log::v2s_mt_posix::sources::severity_logger_mt&lt;int&gt; &gt;::~record_pump ( this=0x7fffffffdff0, __in_chrg=&lt;optimized out&gt;) at /home/pjosep/work/boost_1_60_0_built/posix-x86_64/boost@1.56.0/include/boost/log/sources/record_ostream.hpp:340 #11 0x000000000049c341 in main (argc=1, argv=0x7fffffffe1e8) at /home/Phil/work/Testing/boostTestProject/main.cpp:43 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12010 Trac 1.4.3 Philip Joseph <philip.joseph@…> Fri, 19 Feb 2016 23:10:59 GMT attachment set https://svn.boost.org/trac10/ticket/12010 https://svn.boost.org/trac10/ticket/12010 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">SyslogFailureSource.cpp</span> </li> </ul> Ticket Philip Joseph <philip.joseph@…> Tue, 23 Feb 2016 20:08:25 GMT <link>https://svn.boost.org/trac10/ticket/12010#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12010#comment:1</guid> <description> <p> Actually, I figured out our issue. We needed to add c++11 compile flags to our static builds of Log. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Tue, 23 Feb 2016 22:18:17 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/12010#comment:2 https://svn.boost.org/trac10/ticket/12010#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> Ticket