[
https://issues.jboss.org/browse/JBAS-9077?page=com.atlassian.jira.plugin....
]
jaikiran pai commented on JBAS-9077:
------------------------------------
Spent a bit of time on this one today. The DeploymentServiceListener _doesn't_ invoke
the callback when a service installation fails:
{code}
public void serviceFailed(final ServiceController<? extends Object> controller,
final StartException reason) {
controller.removeListener(this);
startExceptions.put(controller.getName(), reason);
tick(controller);
}
{code}
The "tick" method is supposed to invoke the callback to report the failed
service:
{code}
private void tick(ServiceController<?> controller) {
//this can happen if a service with missing deps is removed
//we do not decrement the count, as this has already happened
//in the dependencyUninstalled method
if (count.decrementAndGet() == 0) {
target.removeListener(this);
if(startExceptions.isEmpty() && failedDependencies.isEmpty()) {
log.infof("Completed deployment of \"%s\" in %d
ms", deploymentName, Long.valueOf((System.nanoTime() - startTime) / 1000000L));
callback.handleComplete();
} else {
final StringBuilder builder = new StringBuilder("Deployment
\"%s\" failed in %d ms. ");
if(!startExceptions.isEmpty()) {
builder.append("Service failures:
").append(startExceptions.values());
}
if(!failedDependencies.isEmpty()) {
builder.append("Failed Dependencies:
").append(failedDependencies);
}
log.infof(builder.toString(), deploymentName,
Long.valueOf((System.nanoTime() - startTime) / 1000000L));
callback.handleFailure(startExceptions, failedDependencies);
}
}
}
{code}
However, the "if" block in the tick method doesn't evaluate to true and as
a result the callback isn't invoked to handle the failure. I don't yet know the
details about the listeners and the deployment lifecycle, so not too sure if that count
check is correct.
Deployment failure leads to a server hang
-----------------------------------------
Key: JBAS-9077
URL:
https://issues.jboss.org/browse/JBAS-9077
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Environment: JBoss AS7 master
Reporter: jaikiran pai
Fix For: 7.0.0.Beta2
Attachments: error-leads-to-hang.txt
This might be related to JBAS-9010 (and/or JBAS-9037). Am not sure, so creating a
separate JIRA. A deployment failure like this:
{code}
16:12:54,194 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed
to start service jboss.deployment.unit."ejb3-example.jar".INSTALL:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."ejb3-example.jar".INSTALL: Failed to process phase
INSTALL of deployment "ejb3-example.jar"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:108)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1344)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[:1.6.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[:1.6.0_21]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
Caused by: java.lang.NullPointerException
at
org.jboss.as.ejb3.component.session.SessionBeanComponentConfiguration.addMethodApplicableLockType(SessionBeanComponentConfiguration.java:139)
at
org.jboss.as.ejb3.component.session.SessionBeanComponentDescription.prepareLockConfiguration(SessionBeanComponentDescription.java:263)
at
org.jboss.as.ejb3.component.session.SessionBeanComponentDescription.prepareComponentConfiguration(SessionBeanComponentDescription.java:236)
at
org.jboss.as.ee.component.AbstractComponentDescription.createComponentConfiguration(AbstractComponentDescription.java:366)
at
org.jboss.as.ee.component.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:81)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:102)
... 4 more
{code}
causes the demo and the smoke-tests to hang. Attached is the thread dump.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira