[jboss-jira] [JBoss JIRA] (WFCORE-3948) Potential race condition on deployment of EAR when Class-Path manifest entry is in use

Brian Stansberry (Jira) issues at jboss.org
Tue Sep 24 15:55:00 EDT 2019


    [ https://issues.jboss.org/browse/WFCORE-3948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788666#comment-13788666 ] 

Brian Stansberry commented on WFCORE-3948:
------------------------------------------

I fear making AttachmentList thread safe is something of a sweep-the-problem-under-the-rug approach, as the ConcurrentModificationException is telling us something useful -- we've got a reader executing concurrent with a writer. Presumably what the writer is doing is relevant, so preventing the reader going at the same time doesn't mean the readers see the full set of information.

Any readers in a later Phase than writers should be fine; it's the readers in the same phase that are at risk of incorrect reads.

The subdeployments execute their DUPs for a phase concurrently.

So Scott's point re "Could it help to get the "topLevelDeployment.addToAttachmentList(Attachments.ADDITIONAL_MODULES, module)" call to happen before the subdeployers are called?" is on target.

> Potential race condition on deployment of EAR when Class-Path manifest entry is in use
> --------------------------------------------------------------------------------------
>
>                 Key: WFCORE-3948
>                 URL: https://issues.jboss.org/browse/WFCORE-3948
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Server
>            Reporter: Stuart Douglas
>            Priority: Major
>
> Attachments#ADDITIONAL_MODULES is attached to the top level DU, but modified by sub deployments in ManifestClassPathProcessor#createAdditionalModule without any sort of synchronisation. This can result in ConcurrentModificationException when the list is read/written to by other sub deployments at the same time.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list