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

UndertowEventHandlerAdapterService#suspend is susceptible to ConcurrentModificationException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 38.0.0.Final, 38.0.1.Final, 39.0.0.Beta1
    • mod_cluster
    • None
    • ---
    • ---

      The resume() method in UndertowEventHandlerAdapterService is missing the synchronized keyword, creating a race condition with concurrent deployment events.

      If a deployment event (e.g., onDeploymentStart or onDeploymentStop) occurs concurrently with server resume, the unsynchronized iteration can throw ConcurrentModificationException.

      Nevertheless this is quite an uncommon scenario.

      Introduced in https://github.com/wildfly/wildfly/commit/99dfd12face64566f0d32540afea15f4c07d3ef2#diff-76725fc7efe1f4432ab7a4e3dde845b2350cef11d5a0b5bebc8adaf68c2ff3a5R197-R199

      The solution is to get rid of synchronization and replace by concurrent collection.

              rhn-engineering-rhusar Radoslav Husar
              rhn-engineering-rhusar Radoslav Husar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: