Boost C++ Libraries: Ticket #13158: core dump when get parent_path in a new thread https://svn.boost.org/trac10/ticket/13158 <p> I will create a boost thread to delete some outdated files, and there is high possibility the program crash, when the program exit. </p> <p> I got the issue like me, but not determined. I doubt it's reason of the static variable of locale. in groups.google.com/forum/#!topic/boost-list/HOyZxH8JJc4 </p> <pre class="wiki"> time_t del_time = cut_time - log_keep_time_ * 60; std::string del_path(file_path_); boost::thread del_thread(MiLogFile::removeExpiredLog, del_path, del_time); del_thread.detach(); int MiLogFile::removeExpiredLog(std::string file_path, uint32_t expire_time) { boost::filesystem::path log_path(file_path); boost::filesystem::path dir = log_path.parent_path(); </pre><pre class="wiki">#3 0x00007fad7a9f4393 in __dynamic_cast () from /usr/lib64/libstdc++.so.6 #4 0x00007fad7a9d9fbb in std::codecvt&lt;wchar_t, char, __mbstate_t&gt; const&amp; std::use_facet&lt;std::codecvt&lt;wchar_t, char, __mbstate_t&gt; &gt;(std::locale const&amp;) () from /usr/lib64/libstdc++.so.6 #5 0x00007fad7ca415ad in boost::filesystem::path::parent_path() const () from ../../../..//ext//boost_1_56_0/stage/lib/libboost_filesystem.so.1.56.0 #6 0x00007fad7cc77ad0 in common::milog::MiLogFile::removeExpiredLog (file_path=..., expire_time=1502292035) at src/milog_file.cpp:361 #7 0x00007fad7cc7b706 in operator()&lt;int, int (*)(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, unsigned int), boost::_bi::list0&gt; (a=..., f=&lt;optimized out&gt;, this=&lt;optimized out&gt;) at ../../../../..//ext//boost_1_56_0/boost/bind/bind.hpp:303 #8 operator() (this=&lt;optimized out&gt;) at ../../../../..//ext//boost_1_56_0/boost/bind/bind_template.hpp:20 #9 boost::detail::thread_data&lt;boost::_bi::bind_t&lt;int, int (*)(std::string, unsigned int), boost::_bi::list2&lt;boost::_bi::value&lt;char*&gt;, boost::_bi::value&lt;long&gt; &gt; &gt; &gt;::run (this=&lt;optimized out&gt;) at ../../../../..//ext//boost_1_56_0/boost/thread/detail/thread.hpp:115 #10 0x00007fad7e3d5e83 in thread_proxy () from ../../../..//ext//boost_1_56_0/stage/lib/libboost_thread.so.1.56.0 #11 0x00007fad79ef5aa1 in start_thread () from /lib64/libpthread.so.0 #12 0x00007fad7a1f3aad in clone () from /lib64/libc.so.6 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13158 Trac 1.4.3 anonymous Thu, 10 Aug 2017 16:08:31 GMT component changed; owner set https://svn.boost.org/trac10/ticket/13158#comment:1 https://svn.boost.org/trac10/ticket/13158#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Beman Dawes</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">filesystem</span> </li> </ul> Ticket