Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-18881

org.jboss.as.connector.util.CopyOnWriteArrayListMultiMap is prone to ConcurrentModificationExceptions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 30.0.0.Final
    • JCA
    • None
    • ---
    • ---

    Description

      A call to CopyOnWriteArrayListMultiMap.putIfAbsent(K, V) or remove(K, V) while another thread is iterating over the list returned via get(...), e.g. [1], will result in a ConcurrentModificationException. Additionally, it is unclear to me why any of the methods of this class are synchronized, since the underlying data structure is already thread safe (excluding the mapped list, which should probably use a CopyOnWriteArrayList or similar).

      [1] https://github.com/wildfly/wildfly/blob/main/connector/src/main/java/org/jboss/as/connector/deployers/ra/processors/RaXmlDependencyProcessor.java#L43

      Attachments

        Activity

          People

            tadamski@redhat.com Tomasz Adamski
            pferraro@redhat.com Paul Ferraro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: