Opened 9 years ago
Closed 8 years ago
#9767 closed Bugs (fixed)
boost::interprocess bootstamp generation causes error in case of corrupt Windows Event Log
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | interprocess |
Version: | Boost 1.55.0 | Severity: | Problem |
Keywords: | boost ipc windows event log boot stamp | Cc: |
Description
If Windows Event Log doesn't contain the Startup Event (Event 6005)
for any reason, then get_bootstamp
returns an empty string.
CallStack :
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
When create_tmp_and_clean_old
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.
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.
Now we are using BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME, but it causes some stack error warning on that Windows 8.1 PC.
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.
Change History (3)
comment:1 by , 9 years ago
Summary: | boost::interprocess shared_memory_object failure in case of corrupted Windows Event Log → boost::interprocess bootstamp generation causes error in case of corrupted Windows Event Log |
---|
comment:2 by , 9 years ago
Summary: | boost::interprocess bootstamp generation causes error in case of corrupted Windows Event Log → boost::interprocess bootstamp generation causes error in case of corrupt Windows Event Log |
---|
comment:3 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Implemented the suggested workaround in commit SHA-1: fb1b0e547c8afe60cb9c1a008ce38a8606f7536d (develop branch)
If BOOST_INTERPROCESS_SHARED_DIR_PATH is defined, that directory is used instead of the shared folder + bootstamp folder.