-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
Non-atomic update of a concurrently shared value
Defect 114076 (STATIC_C)
Checker ATOMICITY (subcategory none)
File: /src/evict/evict_lru.c
Function __evict_pass
/src/evict/evict_lru.c, line: 716
Locking "cache->evict_pass_lock.lock".
__wt_spin_lock(session, &cache->evict_pass_lock);
/src/evict/evict_lru.c, line: 659
Assigning data that might be protected by the lock to "time_now".
time_now = __wt_clock(session);
/src/evict/evict_lru.c, line: 714
Unlocking "cache->evict_pass_lock.lock". "time_now" might now be unreliable because other threads can now change the data that it depends on.
__wt_spin_unlock(session, &cache->evict_pass_lock);
/src/evict/evict_lru.c, line: 716
Locking "cache->evict_pass_lock.lock" again.
__wt_spin_lock(session, &cache->evict_pass_lock);
/src/evict/evict_lru.c, line: 734
Using an unreliable value of "time_now" inside the second locked section. If the data that "time_now" depends on was changed by another thread, this use might be incorrect.
if (WT_CLOCKDIFF_MS(time_now, time_prev) >= 20 &&