Boost C++ Libraries: Ticket #8006: Boost::Chrono Assertion at startup - steady_clock::now() - Windows https://svn.boost.org/trac10/ticket/8006 <p> steady_clock::time_point now = steady_clock::now(); sometimes causes </p> <pre class="wiki">Assertion failed: 0 &amp;&amp; "Boost::Chrono - Internal Error", file C:\Projects\Librari es\src\boost\boost_1_48_0\boost/chrono/detail/inlined/win/chrono.hpp, line 44 on Windows XP, boost 1.48 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8006 Trac 1.4.3 meckschlager@… Thu, 07 Feb 2013 11:01:37 GMT <link>https://svn.boost.org/trac10/ticket/8006#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:1</guid> <description> <p> Now I see, boost::chrono is all thread unsafe and I was reading the time from 2 threads simultaneously (I guess that's so not uncommon) Is that really good? Locking the time reading method seems a bit weird to me... </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Thu, 07 Feb 2013 18:19:19 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8006#comment:1" title="Comment 1">meckschlager@…</a>: </p> <blockquote class="citation"> <p> Now I see, boost::chrono is all thread unsafe and I was reading the time from 2 threads simultaneously (I guess that's so not uncommon) </p> </blockquote> <p> Why do you think that the code is thread unsafe? </p> <blockquote class="citation"> <p> Is that really good? Locking the time reading method seems a bit weird to me... </p> </blockquote> <p> What is weird for you? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Thu, 07 Feb 2013 18:22:56 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:3</guid> <description> <p> Replying to <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8006" title="#8006: Support Requests: Boost::Chrono Assertion at startup - steady_clock::now() - Windows (closed: fixed)">meckschlager@…</a>: </p> <blockquote class="citation"> <p> steady_clock::time_point now = steady_clock::now(); sometimes causes Assertion failed: 0 &amp;&amp; "Boost::Chrono - Internal Error", file C:\Projects\Librari es\src\boost\boost_1_48_0\boost/chrono/detail/inlined/win/chrono.hpp, line 44 on Windows XP, boost 1.48 </p> </blockquote> <p> The code in question is </p> <pre class="wiki"> if ( (nanosecs_per_tic &lt;= 0.0L) || (!boost::detail::win32::QueryPerformanceCounter( &amp;pcount )) ) { BOOST_ASSERT(0 &amp;&amp; "Boost::Chrono - Internal Error"); return steady_clock::time_point(); } </pre><p> could you check which condition is true? </p> </description> <category>Ticket</category> </item> <item> <author>meckschlager@…</author> <pubDate>Fri, 08 Feb 2013 06:54:42 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:4</guid> <description> <p> Hi, thanks embracing that issue up! </p> <blockquote class="citation"> <p> Why do you think that the code is thread unsafe? </p> </blockquote> <p> It states so in the chrono users guide "All functions in the library are thread-unsafe except when noted explicitly." (<a href="http://www.boost.org/doc/libs/1_52_0/doc/html/chrono/users_guide.html">http://www.boost.org/doc/libs/1_52_0/doc/html/chrono/users_guide.html</a>) thats why I came to the working solution </p> <p> lock steady_clock::time_point now = steady_clock::now(); unlock </p> <p> Now, it just seems unnecessary that multiple threads might have to wait to get the current time, which many os methods would return without requiring a lock. </p> <p> cheers m. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Fri, 08 Feb 2013 22:46:24 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:5</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8006#comment:4" title="Comment 4">meckschlager@…</a>: </p> <blockquote class="citation"> <p> Hi, thanks embracing that issue up! </p> <blockquote class="citation"> <p> Why do you think that the code is thread unsafe? </p> </blockquote> <p> It states so in the chrono users guide "All functions in the library are thread-unsafe except when noted explicitly." (<a href="http://www.boost.org/doc/libs/1_52_0/doc/html/chrono/users_guide.html">http://www.boost.org/doc/libs/1_52_0/doc/html/chrono/users_guide.html</a>) thats why I came to the working solution </p> <p> lock steady_clock::time_point now = steady_clock::now(); unlock </p> <p> Now, it just seems unnecessary that multiple threads might have to wait to get the current time, which many os methods would return without requiring a lock. </p> </blockquote> <p> Hrr! I would fix this on the documentation, call to Clock::now() should be thread safe. </p> <p> Thanks for the report. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Wed, 20 Mar 2013 22:15:54 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/8006#comment:6 https://svn.boost.org/trac10/ticket/8006#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> I have fixed the documentation in revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/83511" title="Chrono: Added thread-safe doc for now().">[83511]</a>. have you analyzed which condition was failing? </p> Ticket viboes Wed, 10 Apr 2013 17:09:11 GMT <link>https://svn.boost.org/trac10/ticket/8006#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:7</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/8006#comment:6" title="Comment 6">viboes</a>: </p> <blockquote class="citation"> <p> I have fixed the documentation in revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/83511" title="Chrono: Added thread-safe doc for now().">[83511]</a>. have you analyzed which condition was failing? </p> </blockquote> <p> Could you tell me which is the result of </p> <pre class="wiki">boost::detail::win32::QueryPerformanceCounter( &amp;pcount ) </pre><p> when the program asserts? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 19 May 2013 14:40:52 GMT</pubDate> <title>status, description changed; resolution set https://svn.boost.org/trac10/ticket/8006#comment:8 https://svn.boost.org/trac10/ticket/8006#comment:8 <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">worksforme</span> </li> <li><strong>description</strong> modified (<a href="/trac10/ticket/8006?action=diff&amp;version=8">diff</a>) </li> </ul> <p> I can not reproduce this error. Without your help I'm unable to help you? Reopen it if you have some insight. </p> Ticket anonymous Sat, 15 Jun 2013 07:29:57 GMT status, version changed; resolution deleted https://svn.boost.org/trac10/ticket/8006#comment:9 https://svn.boost.org/trac10/ticket/8006#comment:9 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.48.0</span> → <span class="trac-field-new">Boost 1.50.0</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">worksforme</span> </li> </ul> <p> The same assertion happen in my application. Application running 4 threads constructed by thread_group. </p> <pre class="wiki">pcount = {0x063ff1c300000000} nanosecs_per_tic = 488.71054212171725 call stack ---------- boost::chrono::steady_clock::now() Line 44 + 0x16 bytes C++ boost::condition_variable_any::wait_for&lt;... Line 508 + 0x23 bytes C++ ... (call from my application) BOOST v1.50 MSVC 9 - WIN32;_DEBUG;_WIN32_WINNT=0x0501 - /Od (disabled optimization) Running at: Windows 7, intel i7 </pre><p> Hope this information can help. </p> <p> kt. </p> Ticket viboes Sat, 15 Jun 2013 08:46:03 GMT <link>https://svn.boost.org/trac10/ticket/8006#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:10</guid> <description> <p> I don't know how to explain that <a class="missing wiki">QueryPerformanceCounter</a> fails. Maybe the following remark could explain it </p> <pre class="wiki">"Remarks On a multiprocessor computer, it should not matter which processor is called. However, you can get different results on different processors due to bugs in the basic input/output system (BIOS) or the hardware abstraction layer (HAL)." </pre><p> Anyway. it is surprising that Microsoft doesn't provides stead_clocks on their C++11 library implementation (See some post on SO). </p> <p> I addition neither gcc nor libC++ provide them on windows as </p> <pre class="wiki"> clock_gettime(CLOCK_MONOTONIC, &amp;tp); </pre><p> is not available. </p> <p> What about not providing steady_clock on Windows? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 15 Jun 2013 09:09:00 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/8006#comment:11 https://svn.boost.org/trac10/ticket/8006#comment:11 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">new</span> </li> </ul> Ticket viboes Sat, 15 Jun 2013 09:09:12 GMT status changed https://svn.boost.org/trac10/ticket/8006#comment:12 https://svn.boost.org/trac10/ticket/8006#comment:12 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket viboes Sat, 15 Jun 2013 10:24:55 GMT summary changed https://svn.boost.org/trac10/ticket/8006#comment:13 https://svn.boost.org/trac10/ticket/8006#comment:13 <ul> <li><strong>summary</strong> <span class="trac-field-old">Boost::Chrono Assertion at startup</span> → <span class="trac-field-new">Boost::Chrono Assertion at startup - steady_clock::now() - Windows</span> </li> </ul> Ticket dmitry@… Tue, 17 Sep 2013 11:49:31 GMT <link>https://svn.boost.org/trac10/ticket/8006#comment:14 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:14</guid> <description> <p> I'm getting this assertion from time to time when use asio::steady_timer which in turns uses steady_clock::now(). I've checked under debugger: nanosecs_per_tic is positive number (311.0 in my case), so <a class="missing wiki">QueryPerformanceCounter</a> returns FALSE. <a class="missing wiki">GetLastError</a>() in debugger returns 0, but I'm not sure this is the value set after <a class="missing wiki">QueryPerformanceCounter</a>. Some googling reveals that the argument to this function must be aligned to 64 bit boundary. I've also checked address of the argument - and it looks aligned properly. </p> <p> No more guesses from me :/ </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 20 Oct 2013 18:39:15 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:15 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:15</guid> <description> <p> Thanks for looking on this. Do you think that retrying the call to <a class="missing wiki">QueryPerformanceCounter</a> when fails could help? </p> </description> <category>Ticket</category> </item> <item> <author>andreas.weis@…</author> <pubDate>Tue, 07 Jan 2014 09:42:43 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:16 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:16</guid> <description> <p> We get this problem as well. I can reproduce everything dmitry described on a Windows 7 x64 installation: <a class="missing wiki">QueryPerformanceCounter</a> returns FALSE from time to time, but <a class="missing wiki">GetLastError</a> reports ERROR_SUCCESS. The argument to <a class="missing wiki">QueryPerformanceCounter</a> is aligned properly, and from what the MSDN docs say the function call should not fail, but it does anyway. </p> <p> It really looks like the assert is too strict in this case. Maybe just retrying the call to <a class="missing wiki">QueryPerformanceCounter</a> will help. As an alternative, I noticed that the chrono implementation shipping with the VC10 standard library uses the <a class="missing wiki">GetSystemTimeAsFileTime</a> API instead of the high performance counters. Maybe those functions are more reliable? </p> </description> <category>Ticket</category> </item> <item> <author>dmitry@…</author> <pubDate>Tue, 07 Jan 2014 09:57:59 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:17 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:17</guid> <description> <p> Andreas, actually using <a class="missing wiki">GetSystemTimeAsFileTime</a> in MSVC STL is a bug. See bug with ID 719443 on Microsoft Connect website (I can't post link here). </p> <p> Maybe it makes sense to wait until it's implemented and tested by Microsoft, then it can be "backported" to boost::chrono. </p> <p> Regarding timers on Windows, this article claims that we can't rely on <a class="missing wiki">QueryPerformanceCounter</a> API and should fall back to something different on some motherboard models and versions of Windows </p> </description> <category>Ticket</category> </item> <item> <author>dmitry@…</author> <pubDate>Tue, 07 Jan 2014 10:00:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:18 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:18</guid> <description> <p> "This article" in my last post is the article on gamedev.net site called "Timer pitfalls and solutions" </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Thu, 09 Jan 2014 06:27:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:19 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:19</guid> <description> <p> Please, could you try this patch </p> <pre class="wiki">diff --git a/include/boost/chrono/detail/inlined/win/chrono.hpp b/include/boost/chrono/detail/inlined/win/chrono.hpp index 84cac01..e2128d6 100644 --- a/include/boost/chrono/detail/inlined/win/chrono.hpp +++ b/include/boost/chrono/detail/inlined/win/chrono.hpp @@ -38,12 +38,19 @@ namespace chrono_detail static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic(); boost::detail::winapi::LARGE_INTEGER_ pcount; - if ( (nanosecs_per_tic &lt;= 0.0L) || - (!boost::detail::winapi::QueryPerformanceCounter( &amp;pcount )) ) + if ( nanosecs_per_tic &lt;= 0.0L ) { - BOOST_ASSERT(0 &amp;&amp; "Boost::Chrono - Internal Error"); + BOOST_ASSERT(0 &amp;&amp; "Boost::Chrono - get_nanosecs_per_tic Internal Error"); return steady_clock::time_point(); } + unsigned times=0; + while ( ! boost::detail::winapi::QueryPerformanceCounter( &amp;pcount ) ) + { + if ( ++times &gt; 3 ) { + BOOST_ASSERT(0 &amp;&amp; "Boost::Chrono - QueryPerformanceCounter Internal Error"); + return steady_clock::time_point(); + } + } return steady_clock::time_point(steady_clock::duration( static_cast&lt;steady_clock::rep&gt;((nanosecs_per_tic) * pcount.QuadPart))); </pre><p> Giving as result </p> <pre class="wiki"> steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT { static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic(); boost::detail::winapi::LARGE_INTEGER_ pcount; if ( nanosecs_per_tic &lt;= 0.0L ) { BOOST_ASSERT(0 &amp;&amp; "Boost::Chrono - get_nanosecs_per_tic Internal Error"); return steady_clock::time_point(); } unsigned times=0; while ( ! boost::detail::winapi::QueryPerformanceCounter( &amp;pcount ) ) { if ( ++times &gt; 3 ) { BOOST_ASSERT(0 &amp;&amp; "Boost::Chrono - QueryPerformanceCounter Internal Error"); return steady_clock::time_point(); } } return steady_clock::time_point(steady_clock::duration( static_cast&lt;steady_clock::rep&gt;((nanosecs_per_tic) * pcount.QuadPart))); } </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 19 Jan 2014 07:12:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:20 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:20</guid> <description> <p> <a class="ext-link" href="https://github.com/boostorg/chrono/commit/7e44be61ec499f3d78e3df3a4333ed5ad629f9df"><span class="icon">​</span>https://github.com/boostorg/chrono/commit/7e44be61ec499f3d78e3df3a4333ed5ad629f9df</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 19 Jan 2014 07:13:58 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/8006#comment:21 https://svn.boost.org/trac10/ticket/8006#comment:21 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.56.0</span> </li> </ul> Ticket viboes Sun, 23 Feb 2014 13:41:18 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8006#comment:22 https://svn.boost.org/trac10/ticket/8006#comment:22 <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">fixed</span> </li> </ul> <p> Merged to master <a class="ext-link" href="https://github.com/boostorg/chrono/commit/143260daeb2703961448a0928d199747ca34dfca"><span class="icon">​</span>https://github.com/boostorg/chrono/commit/143260daeb2703961448a0928d199747ca34dfca</a> </p> Ticket dsp@… Mon, 28 Jul 2014 05:47:47 GMT <link>https://svn.boost.org/trac10/ticket/8006#comment:23 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:23</guid> <description> <p> I have just downloaded the current boost 1.56.0 beta and I notice that the bug-fix applied to </p> <p> steady_clock::now() </p> <p> has not been correspondingly applied to the overload </p> <p> steady_clock::now(system::error_code&amp;) </p> <p> which is available when BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING is not defined. </p> <p> I would strongly recommend to apply that patch to this function as well, otherwise the discrimination between error and non-error would be different when using either the first or the second overload </p> </description> <category>Ticket</category> </item> <item> <dc:creator>CharlesSavoie</dc:creator> <pubDate>Thu, 26 Mar 2015 20:52:24 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:24 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:24</guid> <description> <p> I too hit this assertion on first use once in a while. It seems unlikely that <a class="missing wiki">QueryPerformanceCounter</a> is failing on any modern hardware, or especially that calling it again would solve the problem. </p> <p> However, the "static double nanosecs_per_tic" is definitely a problem in a multithreaded environment since the return value could be used by one thread before another thread has finished calling the chrono_detail::get_nanosecs_per_tic() function and assigning the value. Static local variables are never to be used in a multithreaded environment, which an MSDN blog post explains. I can't post a link here, so please search for "C++ scoped static initialization is not thread-safe, on purpose!". </p> <p> I would recommend rethinking this method and all methods that use static local variables. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>CharlesSavoie</dc:creator> <pubDate>Thu, 26 Mar 2015 20:52:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:24 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:24</guid> <description> <p> I too hit this assertion on first use once in a while. It seems unlikely that <a class="missing wiki">QueryPerformanceCounter</a> is failing on any modern hardware, or especially that calling it again would solve the problem. </p> <p> However, the "static double nanosecs_per_tic" is definitely a problem in a multithreaded environment since the return value could be used by one thread before another thread has finished calling the chrono_detail::get_nanosecs_per_tic() function and assigning the value. Static local variables are never to be used in a multithreaded environment, which an MSDN blog post explains. I can't post a link here, so please search for "C++ scoped static initialization is not thread-safe, on purpose!". </p> <p> I would recommend rethinking this method and all methods that use static local variables. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>CharlesSavoie</dc:creator> <pubDate>Fri, 27 Mar 2015 03:38:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:25 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:25</guid> <description> <p> Apologies for skipping some of the comments before replying; you did say <a class="missing wiki">QueryPerformanceCounter</a> was sometimes returning false on your system. I'll attempt the patch and see if it helps my issue. Again, sorry for assuming otherwise, and for the double post. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Fri, 27 Mar 2015 07:09:37 GMT</pubDate> <title>status changed; resolution deleted https://svn.boost.org/trac10/ticket/8006#comment:26 https://svn.boost.org/trac10/ticket/8006#comment:26 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> Please, reopen a ticket when you want something to be done :) </p> Ticket viboes Fri, 27 Mar 2015 07:09:49 GMT milestone changed https://svn.boost.org/trac10/ticket/8006#comment:27 https://svn.boost.org/trac10/ticket/8006#comment:27 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.56.0</span> → <span class="trac-field-new">To Be Determined</span> </li> </ul> Ticket viboes Sun, 28 Jun 2015 09:49:16 GMT <link>https://svn.boost.org/trac10/ticket/8006#comment:28 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:28</guid> <description> <p> I don't remember when </p> <pre class="wiki">static double nanosecs_per_tic </pre><p> has been removed, but there are no more static in the develop branch. </p> <p> Please, could you check it? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 28 Jun 2015 09:51:13 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:29 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:29</guid> <description> <p> <a class="ext-link" href="https://github.com/boostorg/chrono/commit/318e5f24297977d1bc126d2cd7ac65effe1cb7b7"><span class="icon">​</span>https://github.com/boostorg/chrono/commit/318e5f24297977d1bc126d2cd7ac65effe1cb7b7</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 25 Oct 2015 23:49:21 GMT</pubDate> <title>type changed https://svn.boost.org/trac10/ticket/8006#comment:30 https://svn.boost.org/trac10/ticket/8006#comment:30 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Support Requests</span> </li> </ul> <p> Moved to support until someone respond. </p> Ticket anonymous Sun, 31 Jul 2016 21:14:05 GMT <link>https://svn.boost.org/trac10/ticket/8006#comment:31 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:31</guid> <description> <p> I've hit this assertion as well (Boost 1.55, VS 2013, Windows 10 64-bit) by trying to acquire a shared mutex for a limited period of time (1 ms). Here was the callstack: </p> <ol><li>steady_clock::now() </li><li>shared_mutex::try_lock_shared_for() </li><li>shared_lock::try_lock_for() </li></ol><p> Although obviously not thread-safe, it didn't look to me that the assignment of the return value of chrono_detail::get_nanosecs_per_tic() to the static variable nanosecs_per_tic was the cause of the problem since nanosecs_per_tic had a positive value (about 311) at the time of the assertion. </p> <p> This implies that the problem must have been with the return value of winapi::<a class="missing wiki">QueryPerformanceCounter</a>() to which I didn't have access. </p> </description> <category>Ticket</category> </item> <item> <author>franz@…</author> <pubDate>Sun, 31 Jul 2016 21:15:12 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8006#comment:32 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8006#comment:32</guid> <description> <p> I've hit this assertion as well (Boost 1.55, VS 2013, Windows 10 64-bit) by trying to acquire a shared mutex for a limited period of time (1 ms). Here was the callstack: </p> <ol><li>steady_clock::now() </li><li>shared_mutex::try_lock_shared_for() </li><li>shared_lock::try_lock_for() </li></ol><p> Although obviously not thread-safe, it didn't look to me that the assignment of the return value of chrono_detail::get_nanosecs_per_tic() to the static variable nanosecs_per_tic was the cause of the problem since nanosecs_per_tic had a positive value (about 311) at the time of the assertion. </p> <p> This implies that the problem must have been with the return value of winapi::<a class="missing wiki">QueryPerformanceCounter</a>() to which I didn't have access. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Mon, 28 Aug 2017 05:26:38 GMT</pubDate> <title>status changed; resolution set; milestone deleted https://svn.boost.org/trac10/ticket/8006#comment:33 https://svn.boost.org/trac10/ticket/8006#comment:33 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-deleted">To Be Determined</span> </li> </ul> <p> This should be fixed since boost 1.56. </p> <p> Please, reopen it it is still there. </p> Ticket