Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-53185

Log more information when cpuNanos metrics is zero

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.9.0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2020-12-28
    • 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.

      Attachments

        Activity

          People

            louis.williams@mongodb.com Louis Williams
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: