[jboss-jira] [JBoss JIRA] (WFCORE-1016) NPE or AssertionError if op is cancelled on slave between sending prepare and receiving commit/rollback
Brian Stansberry (JIRA)
issues at jboss.org
Sun Sep 27 17:36:00 EDT 2015
Brian Stansberry created WFCORE-1016:
----------------------------------------
Summary: NPE or AssertionError if op is cancelled on slave between sending prepare and receiving commit/rollback
Key: WFCORE-1016
URL: https://issues.jboss.org/browse/WFCORE-1016
Project: WildFly Core
Issue Type: Bug
Components: Domain Management
Affects Versions: 2.0.0.CR5
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Fix For: 2.0.0.CR6
OperationCancellationTestCase showed this failure:
{code}
2015-09-23 06:43:40,147 INFO [org.jboss.as.test.integration.management.extension.blocker.BlockerExtension] (Host Controller Service Threads - 82) block requested by testSlaveBlockCompletionCancelSlave for slave/undefined(COMMIT)
2015-09-23 06:43:40,147 INFO [org.jboss.as.test.integration.management.extension.blocker.BlockerExtension] (Host Controller Service Threads - 82) will block at COMMIT for 20000
2015-09-23 06:43:40,164 INFO [org.jboss.as.controller.management-operation] (Host Controller Service Threads - 71) WFLYCTL0352: Cancelling operation 'block' with id '1900489784' running on thread 'Host Controller Service Threads - 82'
2015-09-23 06:43:40,185 ERROR [stderr] (Host Controller Service Threads - 82) Exception in thread "Host Controller Service Threads - 82" java.lang.AssertionError
2015-09-23 06:43:40,185 ERROR [stderr] (Host Controller Service Threads - 82) at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestContext.completed(TransactionalProtocolOperationHandler.java:475)
2015-09-23 06:43:40,186 ERROR [stderr] (Host Controller Service Threads - 82) at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestHandler.doExecute(TransactionalProtocolOperationHandler.java:190)
2015-09-23 06:43:40,186 ERROR [stderr] (Host Controller Service Threads - 82) at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestHandler$1.run(TransactionalProtocolOperationHandler.java:136)
2015-09-23 06:43:40,186 ERROR [stderr] (Host Controller Service Threads - 82) at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestHandler$1.run(TransactionalProtocolOperationHandler.java:132)
2015-09-23 06:43:40,186 ERROR [stderr] (Host Controller Service Threads - 82) at java.security.AccessController.doPrivileged(Native Method)
2015-09-23 06:43:40,186 ERROR [stderr] (Host Controller Service Threads - 82) at javax.security.auth.Subject.doAs(Subject.java:360)
2015-09-23 06:43:40,186 ERROR [stderr] (Host Controller Service Threads - 82) at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:81)
2015-09-23 06:43:40,186 ERROR [stderr] (Host Controller Service Threads - 82) at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestHandler$2$1.run(TransactionalProtocolOperationHandler.java:152)
2015-09-23 06:43:40,186 ERROR [stderr] (Host Controller Service Threads - 82) at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestHandler$2$1.run(TransactionalProtocolOperationHandler.java:148)
2015-09-23 06:43:40,187 ERROR [stderr] (Host Controller Service Threads - 82) at java.security.AccessController.doPrivileged(Native Method)
2015-09-23 06:43:40,187 ERROR [stderr] (Host Controller Service Threads - 82) at org.jboss.as.controller.remote.TransactionalProtocolOperationHandler$ExecuteRequestHandler$2.execute(TransactionalProtocolOperationHandler.java:148)
2015-09-23 06:43:40,187 ERROR [stderr] (Host Controller Service Threads - 82) at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:299)
2015-09-23 06:43:40,187 ERROR [stderr] (Host Controller Service Threads - 82) at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:519)
2015-09-23 06:43:40,187 ERROR [stderr] (Host Controller Service Threads - 82) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2015-09-23 06:43:40,187 ERROR [stderr] (Host Controller Service Threads - 82) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2015-09-23 06:43:40,187 ERROR [stderr] (Host Controller Service Threads - 82) at java.lang.Thread.run(Thread.java:745)
2015-09-23 06:43:40,187 ERROR [stderr] (Host Controller Service Threads - 82) at org.jboss.threads.JBossThread.run(JBossThread.java:320)
{code}
What happens here is the slave HC executing the 'block' op has sent a prepare message to the master, and then when the commit has not come back yet the test driver triggers a cancel on the slave. At this point the thread running the 'block' op returns and tries to send the final result to the master. But it fails because the prepare logic has nulled out the requestContext field, and the commit message has not arrived yet to restore a new one.
If assertions weren't enabled, the result would be an NPE when the null requestContext is used.
I don't see any reason for null out the requestContext.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list