Details
-
Type:
Task
-
Status: Stalled
-
Priority:
Minor
-
Resolution: Unresolved
-
Fix Version/s: 10.2
-
Component/s: None
-
Labels:None
Description
Now all pthread conditions in MariaDB are created with the default attributes. It means that pthread_cond_timedwait() uses "realtime" clock, and changes in the system time (e.g., if the system administrator manually changes the clock) might interrupt timed condition waits. In almost all cases this is not desirable. To fix it, we should use
pthread_condattr_setclock(attr, CLOCK_MONOTONIC)
create all conditions with this attribute, and use
clock_gettime(CLOCK_MONOTONIC, ...)
when calculating wakeup time.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Somehow this didn't work. I'm getting lots of timeouts, but in the debugger I see that the current time (yes, CLOCK_MONOTONIC) is clearly less than the wakeup time.