[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
Wed Nov 27 08:32:01 EST 2019
[ https://issues.jboss.org/browse/WFCORE-3948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13818490#comment-13818490 ]
Brian Stansberry commented on WFCORE-3948:
------------------------------------------
All of my above discussion is wrong; all that's needed is for AttachmentList to be thread safe.
Why?
The DeploymentUnitPhaseService for the STRUCTURE Phase for the top level deployment installs all the SubDeploymentUnitService instances. It's a general rule that any service has a dep on the service that installed it, so that means any SubDeploymentUnitService will not start until the top level deployment has completed STRUCTURE phase and will see all its data.
Within the STRUCTURE phase, the subdeployments don't care about the data from other subdeployments.
SubDeploymentProcessor adds a dep on the STRUCTURE phase for each subdeployment to the top level deployment's PARSE phase. So all the subdeployments will have completed STRUCTURE before the top begins PARSE work. All the writes happen in STRUCTURE so they will be complete. All the reads after STRUCTURE are either by the top level deployment, which waits for the writes, or by subdeployments which are not concerned with any writes by other subdeployments.
> 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
> Assignee: Brian Stansberry
> 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