[jboss-jira] [JBoss JIRA] (WFCORE-1616) ServerSuspendHandler tries to do step completion and rollback handling in a different thread
Brian Stansberry (JIRA)
issues at jboss.org
Wed Jun 22 15:35:00 EDT 2016
[ https://issues.jboss.org/browse/WFCORE-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256024#comment-13256024 ]
Brian Stansberry commented on WFCORE-1616:
------------------------------------------
https://github.com/bstansberry/wildfly-core/commit/f3ee7eea232c0517bf4be356fd65ed694833e231 adds the missing standard assert that AbstractOperationContext uses on other methods to ensure that only valid threads are invoking on it. This will cause the 2) and 3) cases from the JIRA description to fail. https://ci.wildfly.org/viewLog.html?buildId=19472&tab=buildResultsDiv&buildTypeId=WF_WildFlyCoreIntegrationExperiments is a test run that I expect to fail due to this.
> ServerSuspendHandler tries to do step completion and rollback handling in a different thread
> --------------------------------------------------------------------------------------------
>
> Key: WFCORE-1616
> URL: https://issues.jboss.org/browse/WFCORE-1616
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Reporter: Brian Stansberry
>
> ServerSuspendHandler is calling OperationContext.completeStep() and passing in a rollback handler from a org.jboss.as.server.suspend.OperationListener that may be invoked by a different thread. The OperationContext is not intended to be invoked from multiple threads in this way.
> 3 things can happen with this setup:
> 1) There is no activity preventing suspend, so the suspend controller immediately calls back to the OperationListener on the thread that's handling the operation. So then things work fine.
> 2) There is something that prevents synchronous suspend (i.e. user activity) so then the OperationListener gets invoked later by another thread. The completeStep call registers a rollback handler that will never get called because the op is already done. No harm, no foul unless the operation rolled back.
> 3) Same as 2) but the OperationListener gets invoked later by another thread while the mgmt op is still executing and somehow something goes wrong, since AbstractOperationContext.Step is not written for concurrent modification.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list