Boost C++ Libraries: Ticket #9767: boost::interprocess bootstamp generation causes error in case of corrupt Windows Event Log https://svn.boost.org/trac10/ticket/9767 <p> If Windows Event Log doesn't contain the Startup Event (Event 6005) for any reason, then <code>get_bootstamp</code> returns an empty string. <a class="missing wiki">CallStack</a> : </p> <pre class="wiki">shared_memory_object::priv_open_or_create ipcdetail::create_tmp_and_clean_old_and_get_filename create_tmp_and_clean_old tmp_folder get_bootstamp get_last_bootup_time </pre><p> When <code>create_tmp_and_clean_old</code> tries to delete all the entries for the previous boot sessions, the empty string (that is delete all folders except "") causes it to delete the current session's files as well. </p> <p> We found the bug on a Windows 8.1 PC, where there was an error entry flooding the event log, I guess it simply pushed Event 6005 out of the queue. First, we tried to solve the problem in that particular Windows system, but eventually we came to the conclusion, that manually deleting the event log causes the same symptoms, rendering the boost interprocess quite unreliable. </p> <p> Now we are using BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME, but it causes some stack error warning on that Windows 8.1 PC. </p> <p> For us, it would be a solution, if we could manually set the temp folder and omit the boot stamp, because then I can surely clear it, and it is a 100% working solution. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9767 Trac 1.4.3 anonymous Mon, 10 Mar 2014 15:00:11 GMT summary changed https://svn.boost.org/trac10/ticket/9767#comment:1 https://svn.boost.org/trac10/ticket/9767#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">boost::interprocess shared_memory_object failure in case of corrupted Windows Event Log</span> → <span class="trac-field-new">boost::interprocess bootstamp generation causes error in case of corrupted Windows Event Log</span> </li> </ul> Ticket anonymous Mon, 10 Mar 2014 15:01:03 GMT summary changed https://svn.boost.org/trac10/ticket/9767#comment:2 https://svn.boost.org/trac10/ticket/9767#comment:2 <ul> <li><strong>summary</strong> <span class="trac-field-old">boost::interprocess bootstamp generation causes error in case of corrupted Windows Event Log</span> → <span class="trac-field-new">boost::interprocess bootstamp generation causes error in case of corrupt Windows Event Log</span> </li> </ul> Ticket Ion Gaztañaga Sun, 27 Apr 2014 23:24:52 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9767#comment:3 https://svn.boost.org/trac10/ticket/9767#comment:3 <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">fixed</span> </li> </ul> <p> Implemented the suggested workaround in commit SHA-1: fb1b0e547c8afe60cb9c1a008ce38a8606f7536d (develop branch) </p> <p> If BOOST_INTERPROCESS_SHARED_DIR_PATH is defined, that directory is used instead of the shared folder + bootstamp folder. </p> Ticket