Boost C++ Libraries: Ticket #4484: bug in boost.thread on freebsd 8.0 https://svn.boost.org/trac10/ticket/4484 <p> I use boost1.43 on FreeBSD 8.0-RELEASE-p3 amd64, installed from ports. Here is a simple program that causes an assertion: </p> <blockquote> <p> Assertion failed: (!pthread_cond_wait(&amp;cond,m.mutex()-&gt;native_handle())), function wait, file ./boost/thread/pthread/condition_variable.hpp, line 20. </p> </blockquote> <p> during execution. </p> <pre class="wiki">#include &lt;boost/thread.hpp&gt; #include &lt;cstdlib&gt; using namespace std; void ThreadFun(int number) { sleep(5); } int main(int argc, char** argv) { if (argc &gt; 1) { pid_t pid = fork(); if (pid &lt; 0) { return EXIT_FAILURE; } else if (pid &gt; 0) { return EXIT_SUCCESS; } } boost::thread th1(boost::bind(&amp;ThreadFun, 1)); th1.join(); return EXIT_SUCCESS; } </pre><p> Error occurs only when I execute program with command line arguments(when the process forks) and only on freebsd 8.0 (on ubuntu 10.04 x64 and on freebsd 7.3 amd 64 it works correct). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4484 Trac 1.4.3 sh Thu, 29 Jul 2010 07:09:49 GMT attachment set https://svn.boost.org/trac10/ticket/4484 https://svn.boost.org/trac10/ticket/4484 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">main.cpp</span> </li> </ul> Ticket viboes Wed, 17 Nov 2010 21:31:21 GMT cc set https://svn.boost.org/trac10/ticket/4484#comment:1 https://svn.boost.org/trac10/ticket/4484#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">viboes</span> added </li> </ul> <p> Boost.Thread cleanup when the program exit. Do you know if Boost.Thread can do something to attached a handler when the dlclose is called on its dl handle? </p> Ticket shubin_evgeniy@… Fri, 19 Nov 2010 07:36:10 GMT <link>https://svn.boost.org/trac10/ticket/4484#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4484#comment:2</guid> <description> <p> This bug fixes by compiling with -pthread option of gcc </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 21 Nov 2010 18:41:20 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4484#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4484#comment:3</guid> <description> <p> Do you mean that the ticket can be closed or that something must be changed on the way Boost.Thread is built? If the first be free to close it yourself. </p> <p> Vicente </p> </description> <category>Ticket</category> </item> <item> <author>shubin_evgeniy@…</author> <pubDate>Tue, 23 Nov 2010 08:05:14 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4484#comment:4 https://svn.boost.org/trac10/ticket/4484#comment:4 <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