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

GCLogRotation does not respect the log file size.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 7u17
    • hotspot
    • gc

      FULL PRODUCT VERSION :
      java version " 1.7.0_17 "
      Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
      Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

      FULL OS VERSION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      When one uses GC log rotation over a single file, the log max size is not properly honored.
      For example if I set
       -Xloggc:gcLogRot.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=10M
      and have a very verbose gc output, for example:
      -XX:+UseConcMarkSweepGC -XX:+PrintCMSInitiationStatistics -XX:PrintCMSStatistics=1 -XX:PrintFLSCensus=1 -XX:PrintFLSStatistics=2
      the size of the log file will cross 10M boundary and will increase (slowly but surely).
      It looks like the decision about rolling the file is made AFTER the log record was logged (not before) causing the size of the file to exceed the limit.

      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes

      REGRESSION. Last worked in version 7u17

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      see the description

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      the -XX:GCLogFileSize value will be honored
      REPRODUCIBILITY :
      This bug can be reproduced always.

            jwilhelm Jesper Wilhelmsson
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: