[Boost-bugs] [Boost C++ Libraries] #5409: Creation of the named mutex may take even 1.5 minute

Subject: [Boost-bugs] [Boost C++ Libraries] #5409: Creation of the named mutex may take even 1.5 minute
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-04-01 13:21:06


#5409: Creation of the named mutex may take even 1.5 minute
-------------------------------+--------------------------------------------
 Reporter: habdank@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.45.0 | Severity: Showstopper
 Keywords: |
-------------------------------+--------------------------------------------
 Dears,

 We faced the problem that creation of the named mutex may take up to 1.5
 minutes(!).
 We had been able to debug which function call is really using that amount
 of time.

 In the file:

 boost\interprocess\detail\tmp_dir_helpers.hpp

 in the function:

 inline void tmp_folder(std::string &tmp_name)
 {
    get_tmp_base_dir(tmp_name);
    #ifdef BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME
    tmp_name += "/";
    get_bootstamp(tmp_name, true);
    #endif
 }

 call to get_bootstamp(tmp_name, true); is waiting VERY long time.
 We saw that this function is using some WMI to get timestamp.

 We found that there are other methods to obtain boot time.
 Maybe that will be helpful and those methods are not using expensive calls
 to WMI:

 http://cpp.canbal.com/view.php?sessionid=qAo6EkHmKh9INoDkejiDum9LBQNvGWi2yoDfERxglB4%3D

 http://stackoverflow.com/questions/5411140/retrieving-boot-time-using-
 gettickcount64

 As that was a show stopper for us, we commented out parts of that
 function, so our function looks like:

 inline void tmp_folder(std::string &tmp_name)
 {
    get_tmp_base_dir(tmp_name);
    //#ifdef BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME
    //tmp_name += "/";
    //get_bootstamp(tmp_name, true);
    //#endif
 }

 It is not nice, but it works (for us) :-).

 Best regards,
 Seweryn.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5409>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC