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

SIGFPE in CompactibleFreeListSpaceLAB::compute_desired_plab_size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • 9
    • hotspot
    • None
    • gc
    • b115

      Running following command(run TestGCOld hotspot jtreg test) on Linux-x64 cause 64 bit JVM exit with SIGFPE signal:
      java -XX:+UseConcMarkSweepGC -XX:CMSOldPLABNumRefills=9223372036854775808 TestGCOld 10 10 10 10 100

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGFPE (0x8) at pc=0x00007f6ca7fe2bde, pid=14991, tid=14996
      #
      # JRE version: Java(TM) SE Runtime Environment (9.0) (fastdebug build 9-internal+0-2016-03-10-011512.daholme.jdk9-hs-rt)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 9-internal+0-2016-03-10-011512.daholme.jdk9-hs-rt, mixed mode, tiered, compressed oops, concurrent mark sweep gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x8b6bde] CompactibleFreeListSpaceLAB::compute_desired_plab_size()+0xbe
      #
      ...

      hs_err_pid14991.log is attached.

      Also, can be reproduced by running javac:
      javac -J-XX:+UseConcMarkSweepGC -J-XX:CMSOldPLABNumRefills=9223372036854775808 HelloWorld.java

      32 bit JVM also affected:
      java -XX:+UseConcMarkSweepGC -XX:CMSOldPLABNumRefills=2147483648 TestGCOld 10 10 10 10 100

      The problem in overflow in compute_desired_plab_size() function:
      void CompactibleFreeListSpaceLAB::compute_desired_plab_size() {
      ...
                MIN2(CMSOldPLABMax,
                     _global_num_blocks[i]/(_global_num_workers[i]*CMSOldPLABNumRefills))));
      ...
      }

      '_global_num_workers[i]*CMSOldPLABNumRefills' can results in 0 due to the overflow and this can cause division by zero.

            sangheki Sangheon Kim
            ddmitriev Dmitry Dmitriev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: