[SERVER-53185] Log more information when cpuNanos metrics is zero Created: 02/Dec/20  Updated: 29/Oct/23  Resolved: 15/Dec/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Louis Williams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2020-12-28
Participants:
Linked BF Score: 13

 Description   

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.



 Comments   
Comment by Githook User [ 15/Dec/20 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-53185 log more information when cpuNanos is zero
Branch: master
https://github.com/mongodb/mongo/commit/3b7d696a9bc98c24f5b64ff9476681f75e605753

Generated at Thu Feb 08 05:30:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.