Re: [Boost-bugs] [Boost C++ Libraries] #4533: timespec translation fails for times before 1970

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4533: timespec translation fails for times before 1970
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-12-08 07:28:17


#4533: timespec translation fails for times before 1970
----------------------------------------------+-----------------------------
  Reporter: Philipp Huber <phu@…> | Owner: viboes
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.43.0 | Severity: Problem
Resolution: | Keywords: absolute time
----------------------------------------------+-----------------------------

Comment (by phu@…):

 Hi viboes

 Well, 16 month is quite a while ago...
 We do use boost intensively but have fixed already 3 bugs in different
 parts of boost, all sent to this bug tracker tool but with little or no
 response. So we keep on fixing every new release...

 We used boost for embedded linux on a hardware with broken realtime clock.
 So the system time was often randomly startet and in this case it was
 1919.

 The timeout resulted from a calculation of some time value minus another
 time value. let's say, we scheduled a timer to a specific absolute time.
 The scheduler thread inspects this time value, compares it with the
 current posix time and calculates how long it needs to sleep until the
 timer will be signaled.
 If the scheduler is busy, it can happen that the sleep timeout, which is
 basically the subtraction of two times, becomes negative. But it only
 happend with the low year numbers of 1919. At least, that is what I think
 caused the timeout to become negative. But I can't tell you for sure.
 After 16 Month.

 I understand that you would like to fix the cause of the negative timeout
 but as long as the timeout type allows negative values, you can not avoid
 a call with negative values in general anyway.

 What I can tell you for sure is, that the bugfix, which I suggested works
 well for us. Whether or not it is fixing the real cause of the bug.

 cheers
 phu

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4533#comment:6>
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:08 UTC