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

Non-synchronized access to shared members of com.sun.jndi.ldap.pool.Pool

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7u101, 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b126
    • Verification:
      Not verified

      Backports

        Description

        Access to com.sun.jndi.ldap.pool.Pool.map isn't synchronized in several executing paths: in methods toString(), showStats() and getPooledConnection().

        In particular, this results in ConcurrentModificationException when debug information is on.

        Example of a stack trace with CME:
        Caused By: java.util.ConcurrentModificationException
                at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:882)
                at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:921)
                at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:919)
                at java.util.AbstractMap.toString(AbstractMap.java:518)
                at com.sun.jndi.ldap.pool.Pool.toString(Pool.java:229)
                at java.lang.String.valueOf(String.java:2849)
                at java.lang.StringBuilder.append(StringBuilder.java:128)
                at com.sun.jndi.ldap.pool.Pool.d(Pool.java:240)
                at com.sun.jndi.ldap.pool.Pool.getPooledConnection(Pool.java:120)
                at
        com.sun.jndi.ldap.LdapPoolManager.getLdapClient(LdapPoolManager.java:329)
                at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1603)
                at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2699)
                at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:317)

          Activity

          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/b6c9d1c6c6d4
          User: igerasim
          Date: 2016-07-03 02:32:30 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/b6c9d1c6c6d4 User: igerasim Date: 2016-07-03 02:32:30 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/b6c9d1c6c6d4
          User: lana
          Date: 2016-07-06 20:17:35 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/b6c9d1c6c6d4 User: lana Date: 2016-07-06 20:17:35 +0000

            People

            • Assignee:
              igerasim Ivan Gerasimov
              Reporter:
              igerasim Ivan Gerasimov
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: