Details
Description
If the log throttling has been triggered, it is possible that the log throttling is turned off too early under certain conditions. The effects of this are mostly visible in the failure of the log_throttling test case.
The problem originates from the fact that the current timestamp is read before a mutex is locked that protects the log throttling information that is then compared to the latest "modification" timestamp stored in the data structure that the mutex protects. There's no guarantee that the threads will read the timestamps and acquire the lock in the same order which results in negative jumps in time. This alone wouldn't be a problem but the code uses unsigned integers for the timestamps which results in underflow when the current timestamp is in the past.