Boost C++ Libraries: Ticket #8586: Boost Thread .join() causes exception. Intel C++ 13.1.1. Windows XP SP3 https://svn.boost.org/trac10/ticket/8586 <p> Hello, sorry for my bad english. </p> <p> I just compiled a test example: </p> <pre class="wiki">#include &lt;boost/thread/thread.hpp&gt; #include &lt;iostream&gt; void hello_world() { std::cout &lt;&lt; "Hello from thread!" &lt;&lt; std::endl; } int main() { boost::thread my_thread(&amp;hello_world); my_thread.join(); } </pre><p> And when my_thread.join(); calls I get an exception. </p> <p> Boost 1.53.0: One error: <a class="ext-link" href="http://i.imgur.com/J2zpjQ0.png"><span class="icon">​</span>http://i.imgur.com/J2zpjQ0.png</a> Boost 1.52.0: Two errors: <a class="ext-link" href="http://i.imgur.com/CekLb8O.png"><span class="icon">​</span>http://i.imgur.com/CekLb8O.png</a> Boost 1.51.0: No errors. Boost 1.48.0: No errors. </p> <p> I use Intel C++ Compiler 13.1.1. Windows XP SP3. I compile Boost: call bjam toolset="intel" ---build-type=complete threading=multi link=static runtime-link=static </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8586 Trac 1.4.3 viboes Sun, 19 May 2013 14:11:45 GMT owner, status, description changed https://svn.boost.org/trac10/ticket/8586#comment:1 https://svn.boost.org/trac10/ticket/8586#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>description</strong> modified (<a href="/trac10/ticket/8586?action=diff&amp;version=1">diff</a>) </li> </ul> Ticket viboes Sun, 19 May 2013 14:15:17 GMT <link>https://svn.boost.org/trac10/ticket/8586#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:2</guid> <description> <p> Could you report the stack from where the exception is thrown? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 19 May 2013 14:42:35 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8586#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:3</guid> <description> <p> Does it works for Intel 12.x? </p> </description> <category>Ticket</category> </item> <item> <author>Alexey <lakmus@…></author> <pubDate>Mon, 20 May 2013 08:36:23 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8586#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8586#comment:3" title="Comment 3">viboes</a>: </p> <blockquote class="citation"> <p> Does it works for Intel 12.x? </p> </blockquote> <p> Hello, I compiled this example on Intel 12.0.1 too, same results for all four versions of boost I used before: </p> <pre class="wiki">Thread_Boost1.53.0_ICC13.1.1.exe - bug Thread_Boost1.52.0_ICC13.1.1.exe - bug Thread_Boost1.51.0_ICC13.1.1.exe - works fine Thread_Boost1.48.0_ICC13.1.1.exe - works fine Thread_Boost1.53.0_ICC12.0.1.exe - bug Thread_Boost1.52.0_ICC12.0.1.exe - bug Thread_Boost1.51.0_ICC12.0.1.exe - works fine Thread_Boost1.48.0_ICC12.0.1.exe - works fine </pre><p> It's ok if I provide executable files for all results? You can grab it here: <a class="ext-link" href="http://rghost.ru/46127334"><span class="icon">​</span>http://rghost.ru/46127334</a>. I tried to debug Thread_Boost1.53.0_ICC13.1.1.exe in OllyDBG and that what I got: <a class="ext-link" href="http://i.imgur.com/VyDtVL1.png"><span class="icon">​</span>http://i.imgur.com/VyDtVL1.png</a>. I hope it helps. Please tell me if you need more information from me. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Mon, 20 May 2013 09:18:03 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8586#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:5</guid> <description> <p> No the executables are of any use. However the fact that both version match the results mean that the problem should come from an evolution on Boost 1.52 that doesn't works correctly with Intel compiler. </p> <p> I was expecting a symbolic stack :( This is a must to take care of a crash. </p> <p> Could you tell me if adding a sleep on the thread function avoid the crash? </p> </description> <category>Ticket</category> </item> <item> <author>Alexey <lakmus@…></author> <pubDate>Mon, 20 May 2013 11:29:20 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8586#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:6</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8586#comment:5" title="Comment 5">viboes</a>: </p> <blockquote class="citation"> <p> No the executables are of any use. However the fact that both version match the results mean that the problem should come from an evolution on Boost 1.52 that doesn't works correctly with Intel compiler. </p> <p> I was expecting a symbolic stack :( This is a must to take care of a crash. </p> </blockquote> <p> I tried to get call stack and what I got: </p> <ol><li>When I attach to process after exception - <a class="ext-link" href="http://i.imgur.com/ke7ze5v.png"><span class="icon">​</span>http://i.imgur.com/ke7ze5v.png</a> </li><li>When I start to debug process from beginning - <a class="ext-link" href="http://i.imgur.com/uvFO9k8.png"><span class="icon">​</span>http://i.imgur.com/uvFO9k8.png</a> </li></ol><p> I'm sorry if it's might be not helpful, I use Visual Studio very rare, so I'm not very experienced in it. </p> <blockquote class="citation"> <p> Could you tell me if adding a sleep on the thread function avoid the crash? </p> </blockquote> <p> I tried to add this code </p> <pre class="wiki">boost::this_thread::sleep_for(boost::chrono::milliseconds(10000)); </pre><p> after "Hello from thread!" message, but no difference, still crashes. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Mon, 20 May 2013 14:39:18 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8586#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:7</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8586#comment:6" title="Comment 6">Alexey &lt;lakmus@…&gt;</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8586#comment:5" title="Comment 5">viboes</a>: </p> <blockquote class="citation"> <p> No the executables are of any use. However the fact that both version match the results mean that the problem should come from an evolution on Boost 1.52 that doesn't works correctly with Intel compiler. </p> <p> I was expecting a symbolic stack :( This is a must to take care of a crash. </p> </blockquote> <p> I tried to get call stack and what I got: </p> <ol><li>When I attach to process after exception - <a class="ext-link" href="http://i.imgur.com/ke7ze5v.png"><span class="icon">​</span>http://i.imgur.com/ke7ze5v.png</a> </li></ol></blockquote> <p> Thanks for this execution context. Could you show the complete symbolic stack? </p> <blockquote class="citation"> <ol start="2"><li>When I start to debug process from beginning - <a class="ext-link" href="http://i.imgur.com/uvFO9k8.png"><span class="icon">​</span>http://i.imgur.com/uvFO9k8.png</a> </li></ol><p> I'm sorry if it's might be not helpful, I use Visual Studio very rare, so I'm not very experienced in it. </p> <blockquote class="citation"> <p> Could you tell me if adding a sleep on the thread function avoid the crash? </p> </blockquote> <p> I tried to add this code </p> <pre class="wiki">boost::this_thread::sleep_for(boost::chrono::milliseconds(10000)); </pre><p> after "Hello from thread!" message, but no difference, still crashes. </p> </blockquote> <p> OK. At lest we know it is around the thread destruction. </p> </description> <category>Ticket</category> </item> <item> <author>Alexey <lakmus@…></author> <pubDate>Mon, 20 May 2013 16:23:02 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8586#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:8</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8586#comment:7" title="Comment 7">viboes</a>: </p> <blockquote class="citation"> <p> Thanks for this execution context. Could you show the complete symbolic stack? </p> </blockquote> <p> I'm not sure where is complete symbolic stack in MSVS, but I managed to dig this windows when I loaded pdb information in debugger: </p> <p> <a class="ext-link" href="http://i.imgur.com/SBGlCOp.png"><span class="icon">​</span>http://i.imgur.com/SBGlCOp.png</a> </p> <p> <a class="ext-link" href="http://i.imgur.com/Ys8taGg.png"><span class="icon">​</span>http://i.imgur.com/Ys8taGg.png</a> </p> <p> Is this helpful? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Tue, 21 May 2013 22:52:59 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8586#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:9</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8586#comment:8" title="Comment 8">Alexey &lt;lakmus@…&gt;</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8586#comment:7" title="Comment 7">viboes</a>: </p> <blockquote class="citation"> <p> Thanks for this execution context. Could you show the complete symbolic stack? </p> </blockquote> <p> I'm not sure where is complete symbolic stack in MSVS, but I managed to dig this windows when I loaded pdb information in debugger: </p> <p> <a class="ext-link" href="http://i.imgur.com/SBGlCOp.png"><span class="icon">​</span>http://i.imgur.com/SBGlCOp.png</a> </p> <p> <a class="ext-link" href="http://i.imgur.com/Ys8taGg.png"><span class="icon">​</span>http://i.imgur.com/Ys8taGg.png</a> </p> <p> Is this helpful? </p> </blockquote> <p> Not too much :( </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 03 Aug 2013 13:56:34 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8586#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:10</guid> <description> <p> I don't reach to reproduce the error. Please, could you try defining BOOST_THREAD_DONT_USE_ATOMIC? </p> </description> <category>Ticket</category> </item> <item> <author>Alexey <lakmus@…></author> <pubDate>Sat, 03 Aug 2013 17:09:26 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8586#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:11</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8586#comment:10" title="Comment 10">viboes</a>: </p> <blockquote class="citation"> <p> I don't reach to reproduce the error. Please, could you try defining BOOST_THREAD_DONT_USE_ATOMIC? </p> </blockquote> <p> Still receive an error. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 04 Aug 2013 09:07:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8586#comment:12 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:12</guid> <description> <p> Could you try dynamic allocation? </p> <pre class="wiki">int main() { boost::thread* my_thread = new boost::thread(&amp;hello_world); my_thread-&gt;join(); delete my_thread; } </pre><p> and also </p> <pre class="wiki">int main() { boost::thread my_thread(&amp;hello_world); boost::this_thread::sleep_for(boost::chrono::milliseconds(10000)); my_thread.join(); } </pre><pre class="wiki"> </pre> </description> <category>Ticket</category> </item> <item> <author>Alexey <lakmus@…></author> <pubDate>Sun, 04 Aug 2013 10:07:57 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8586#comment:13 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:13</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8586#comment:12" title="Comment 12">viboes</a>: </p> <blockquote class="citation"> <pre class="wiki">int main() { boost::thread* my_thread = new boost::thread(&amp;hello_world); my_thread-&gt;join(); delete my_thread; } </pre></blockquote> <p> Still error. </p> <blockquote class="citation"> <pre class="wiki">int main() { boost::thread my_thread(&amp;hello_world); boost::this_thread::sleep_for(boost::chrono::milliseconds(10000)); my_thread.join(); } </pre></blockquote> <p> Error after 10 sec. With BOOST_THREAD_DONT_USE_ATOMIC both results are the same too. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Tue, 17 Sep 2013 05:21:10 GMT</pubDate> <title>summary changed https://svn.boost.org/trac10/ticket/8586#comment:14 https://svn.boost.org/trac10/ticket/8586#comment:14 <ul> <li><strong>summary</strong> <span class="trac-field-old">Boost Thread .join() causes exception</span> → <span class="trac-field-new">Boost Thread .join() causes exception. Intel C++ 13.1.1. Windows XP SP3</span> </li> </ul> Ticket viboes Tue, 17 Sep 2013 21:20:15 GMT <link>https://svn.boost.org/trac10/ticket/8586#comment:15 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:15</guid> <description> <p> Isn't this a duplicate of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7666" title="#7666: Bugs: Boost Thread SIGSEGV on join() when -D_GLIBCXX_DEBUG is used (closed: invalid)">#7666</a>? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Tue, 17 Sep 2013 21:21:35 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8586#comment:16 https://svn.boost.org/trac10/ticket/8586#comment:16 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> Ticket viboes Thu, 19 Sep 2013 22:09:15 GMT <link>https://svn.boost.org/trac10/ticket/8586#comment:17 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:17</guid> <description> <p> With which options was built Boost? Please show the result of bjam with -d2 option </p> <pre class="wiki">bjam toolset="intel" ---build-type=complete threading=multi link=static runtime-link=static -d2 </pre><p> And your program? </p> <p> What is the size of boost::detail::thread_data_base on your program? And in a Boost.Thread test? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Thu, 26 Sep 2013 18:01:22 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8586#comment:18 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8586#comment:18</guid> <description> <blockquote> <p> I suspect that this is related to an ABI incompatibility. </p> </blockquote> </description> <category>Ticket</category> </item> </channel> </rss>