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

Intermittent SEGV running ParallelGC

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Environment:

      Partner X aarch64 hardware

    • Subcomponent:
      gc
    • Resolved In Build:
      b94
    • CPU:
      aarch64
    • OS:
      linux

      Backports

        Description

        We are seeing intermittent SEGVs running specjbb2013 with both aarch64 jdk8 port (built from ssh://enevill@hg.openjdk.java.net/aarch64-port/jdk8u) and jdk9 (built from ssh://enevill@hg.openjdk.java.net/jdk9/hs-comp).

        This crash only occurs on Partner X hardware.

        Prebuilt binaries which exhibit the problem may be downloaded from

        http://openjdk.linaro.org/releases/jdk8u-server-release-1509.tar.xz

        http://openjdk.linaro.org/releases/jdk9-server-release-1508.tar.xz

        A sample hs_err log is attached below.

        This only occurs with UseParallelGC so it happens by default with jdk8 but only happens with jdk9 with -XX:+UseParallelGC

        The frequency of the crash is about one in 10 runs.

        The command used to invoke specjbb2013 is

        java -Xmx50g -Xms50g -Xmn40g -Dspecjbb.forkjoin.workers=48 -jar specjbb2013.jar -m COMPOSITE

        (note: if using jdk9 you also need -XX:+UseParallelGC to observe the problem)
        1. hs_err_pid12209.log
          81 kB
          Ed Nevill
        2. hs_err_pid26881.log
          172 kB
          Ed Nevill

          Activity

          Hide
          aph Andrew Haley added a comment -
          There is a race between threads when updating the block table in ParallelCompactData::calc_new_pointer :

             if (!region_ptr->blocks_filled()) {
              PSParallelCompact::fill_blocks(addr_to_region_idx(addr));
              region_ptr->set_blocks_filled();
            }

          Neither blocks_filled() nor set_blocks_filled() have any memory fences so it is possible for a thread to observe a partially-filled block table.
          Show
          aph Andrew Haley added a comment - There is a race between threads when updating the block table in ParallelCompactData::calc_new_pointer :    if (!region_ptr->blocks_filled()) {     PSParallelCompact::fill_blocks(addr_to_region_idx(addr));     region_ptr->set_blocks_filled();   } Neither blocks_filled() nor set_blocks_filled() have any memory fences so it is possible for a thread to observe a partially-filled block table.
          Hide
          twisti Christian Thalinger added a comment -
          If this is a GC problem, which it seems it is, you should move it to the right subcomponent.
          Show
          twisti Christian Thalinger added a comment - If this is a GC problem, which it seems it is, you should move it to the right subcomponent.
          Hide
          tschatzl Thomas Schatzl added a comment -
          noreg-hard: this is an issue related to missing memory barriers. This is hard to reliably reproduce.
          Show
          tschatzl Thomas Schatzl added a comment - noreg-hard: this is an issue related to missing memory barriers. This is hard to reliably reproduce.
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/d5e5e9f4fc04
          User: tschatzl
          Date: 2015-11-04 20:00:33 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/d5e5e9f4fc04 User: tschatzl Date: 2015-11-04 20:00:33 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/d5e5e9f4fc04
          User: lana
          Date: 2015-11-25 21:18:08 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/d5e5e9f4fc04 User: lana Date: 2015-11-25 21:18:08 +0000

            People

            • Assignee:
              aph Andrew Haley
              Reporter:
              enevill Ed Nevill
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 weeks, 4 days
                2w 4d
                Remaining:
                Remaining Estimate - 2 weeks, 4 days
                2w 4d
                Logged:
                Time Spent - Not Specified
                Not Specified