Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-3989

KMS APIs fail due to ConcurrentModificationException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0, 2.4.0
    • kms
    • None

    Description

      When KMS APIs are called concurrently they can fail with  ConcurrentModificationException, due to updates to a map instance while another thread is in the middle of iterating the map - for example:

      java.util.ConcurrentModificationException: null
              at java.util.HashMap$HashIterator.nextNode(HashMap.java:1469)
              at java.util.HashMap$EntryIterator.next(HashMap.java:1503)
              at java.util.HashMap$EntryIterator.next(HashMap.java:1501)
              at org.apache.hadoop.crypto.key.RangerKeyStoreProvider.flush(RangerKeyStoreProvider.java:360)
              at org.apache.hadoop.crypto.key.KeyProviderExtension.flush(KeyProviderExtension.java:127)
              at org.apache.hadoop.crypto.key.KeyProviderExtension.flush(KeyProviderExtension.java:127)
              at org.apache.hadoop.crypto.key.KeyProviderExtension.flush(KeyProviderExtension.java:127)
              at org.apache.hadoop.crypto.key.kms.server.KeyAuthorizationKeyProvider.flush(KeyAuthorizationKeyProvider.java:365)
              at org.apache.hadoop.crypto.key.kms.server.KMS$1.run(KMS.java:159)
              at org.apache.hadoop.crypto.key.kms.server.KMS$1.run(KMS.java:155)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.security.auth.Subject.doAs(Subject.java:422)
              at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1845)
              at org.apache.hadoop.crypto.key.kms.server.KMS.createKey(KMS.java:154) 

      Attachments

        1. RANGER-3989.patch
          233 kB
          Madhan Neethiraj

        Issue Links

          Activity

            People

              madhan Madhan Neethiraj
              madhan Madhan Neethiraj
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: