Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-9475

ObjectSizer will fail on java 16 and later

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • core

    Description

      The instances of org.apache.geode.cache.util.ObjectSizer, SIZE_CLASS_ONCE, REFLECTION_SIZE, and DEFAULT will not work on java 16 and later because they call Field.setAccessible which is not allowed under normal conditions starting with java 16 (see: https://softwaregarden.dev/en/posts/new-java/illegal-access-in-java-16 ).

      To workaround this failure set the JVM command line option: --illegal-access=permit

      These ObjectSizer instances are used in a number of places internally by geode and can also explicitly be configured by users. Internally they are used by default for eviction (heap or mem), the wan gateway, and tombstone gc. Most all regions produce tombstones so that is the most likely point of failure.

      The code that calls setAccessible is: org.apache.geode.internal.size.ObjectTraverser#buildFieldSet and it is not clear how this code can be changed to do its job without using setAccessible.

      Attachments

        Activity

          People

            echobravo Ernest Burghardt
            dschneider Darrel Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: