-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Fully Compatible
-
ALL
-
Execution Team 2020-12-28
-
13
In this test, 'cpuNanos' occasionally returns '0' instead of a positive integer.
I believe this may happen if the OS migrates a thread to a different CPU, which could lead to bogus results, per the man page:
The CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID clocks are realized on many platforms using timers from the CPUs (TSC on i386, AR.ITC on Itanium). These registers may differ between CPUs and as a consequence these clocks may return bogus results if a process is migrated to another CPU.
The test failures have always resulted in values of exactly 0 elapsed time (never negative) which suggests something else could be going on as well.
Print more diagnostic information when operations return 0 cpuNanos.