Git Product home page Git Product logo

Comments (2)

assarbad avatar assarbad commented on August 20, 2024

Hi @kkumar45,

I have recently reported - and today diagnosed - this issue as well over in SourceTrail issue 1002.

I have to admit that using GetTickCount64 would be able to work around this. Depends entirely what the minimum Windows version supported by Boost is at the moment.

Another possibility would be to use what I proposed over in that SourceTrail ticket. Quoting myself:

Still, it would be much more sensible to query the creation time of \REGISTRY or \SystemRoot in the Object Manager namespace. My tool NT Objects demonstrates this. And yes, these can be queried as totally unprivileged user. I just verified it after a reboot and I have the following time stamps (times in UTC):

  • \REGISTRY: 2020-05-11 14:29:45.644
  • \SystemRoot: 2020-05-11 14:29:45.555

(as a side-note, these values are actually roughly nine seconds before the timestamp of the event 6005 "The Event log service was started.")

I didn't check what PSTools (or psinfo in particular) use, but using event ID 6005 really doesn't strike me as a very prudent course of action.

And the error being thrown is also rather generic for an error that could reasonably occur weeks or months into a given boot session. And what's more, running a program with such a widely used library may succeed now, but after the event log cycles or I clear it, the program just starts to fail with a rather unspecific error message.

The big question is, and I don't know what the Boost project aims for in that regard, whether this should work across projects using different settings. Because as nice as GetTickCount64 is, it doesn't give you the number of seconds since Unix epoch. (edit: just noticed your subtraction!)

from interprocess.

kkumar45 avatar kkumar45 commented on August 20, 2024

@assarbad Thanks..
Recently I ran into another problem with Boost interprocess. Boost provides 3 different MACRO's which can be used to calculate the bootup time on Windows (needed to create the shared folder).

Let's consider a situation of two different application using different macros, their bootup time is different and thus it results in the deletions of shared folder created by the first application since the bootup time of second application is different from first.

There is a logic in Boost which checks and deletes all other folder if they don't match the most recently calculated bootup time.

File : shared_dir_helpers.hpp

// Get the shared directory name by calculating bootup time
get_shared_dir(shared_dir);    

//This function erases all the subdirectories of a directory except the one pointed by "subdir.c_str()"
delete_subdirectories(root_shared_dir, subdir.c_str());   

Thus it deletes the shared dir created by the first application which looks to be a bug here.

from interprocess.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.