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

FlexibleWorkGang initializes _active_workers to more than _total_workers

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b68

      Backports

        Description

        This is the FlexibleWorkGang constructor:

          FlexibleWorkGang(const char* name, uint workers,
                           bool are_GC_task_threads,
                           bool are_ConcurrentGC_threads) :
            WorkGang(name, workers, are_GC_task_threads, are_ConcurrentGC_threads),
            _active_workers(UseDynamicNumberOfGCThreads ? 1U : ParallelGCThreads) {}

        and the WorkGang constructor:
        WorkGang::WorkGang(const char* name,
                           uint workers,
                           bool are_GC_task_threads,
                           bool are_ConcurrentGC_threads) :
          AbstractWorkGang(name, are_GC_task_threads, are_ConcurrentGC_threads) {
          _total_workers = workers;
        }

        If 'workers' are less than ParallelGCThreads, then _active_workers will be set to a value that is greater than _total_workers (unless we run with UseDynamicNumberOfGCThreads). Both G1 and CMS typically sets the number of concurrent workers to a value below ParallelGCThreads.

        This is currently a benign bug, since the GCs will later calculate a new value for _active_workers that will never be higher than _total_workers.

        However, this bug impedes stricter asserts and should be fixed.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  stefank Stefan Karlsson
                  Reporter:
                  stefank Stefan Karlsson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: