Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8297173

usageTicks and totalTicks should be volatile to ensure that different threads get the latest ticks

    XMLWordPrintable

Details

    Description

      A DESCRIPTION OF THE PROBLEM :
      The usageTicks and totalTicks properties in the com.sun.management.internal.OperatingSystemImpl.ContainerCpuTicks class are not volatile, so different threads may not be able to get the latest cpu load when they get the cpu load.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Hard to reproduce, but usageTicks and totalTicks should be volatile to ensure that different threads get the latest ticks.


      Attachments

        Issue Links

          Activity

            People

              sgehwolf Severin Gehwolf
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: