[MXS-4967] Log throttling is sometimes disabled too early Created: 2024-02-05  Updated: 2024-02-06  Resolved: 2024-02-06

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 6.4.13, 22.08.11, 23.02.8, 23.08.4
Fix Version/s: 6.4.15, 22.08.12, 23.02.9, 23.08.5

Type: Bug Priority: Minor
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 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.


Generated at Thu Feb 08 04:32:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.