Details
-
Bug
-
Resolution: Fixed
-
High
-
5.6.0
-
None
-
None
Description
How to reproduce:
1. Disable all bamboo agents (remote and local);
2. start deployment project;
3. start remote agent.
The problem is in the following method:
com.atlassian.bamboo.deployments.runtime.DeploymentsInProgressServiceImpl#getDeploymentExecutingOnAgent
Here it is (incorrect code highlighted with *****):
@Nullable @Override public DeploymentInProgress getDeploymentExecutingOnAgent(final long agentId) { for (DeploymentInProgress deploymentInProgress : deploymentInProgressMap.values()) { *****if (deploymentInProgress.getAgentId() == agentId)**** { return deploymentInProgress; } } return null; }
deploymentInProgress.getAgentId() is null (deployment is still unassigned) and it's unboxing before compare execution leads to NPE:
[RemoteInvocationTraceInterceptor] Processing of BambooJmsServiceExporter remote call resulted in fatal exception: com.atlassian.bamboo.buildqueue.manager.RemoteAgentManager.registerAgent [INFO] [talledLocalContainer] java.lang.NullPointerException [INFO] [talledLocalContainer] at com.atlassian.bamboo.deployments.runtime.DeploymentsInProgressServiceImpl.getDeploymentExecutingOnAgent(DeploymentsInProgressServiceImpl.java:103) [INFO] [talledLocalContainer] at com.atlassian.bamboo.buildqueue.manager.AgentManagerImpl.abandonDeployment(AgentManagerImpl.java:542) [INFO] [talledLocalContainer] at com.atlassian.bamboo.buildqueue.manager.AgentManagerImpl.abandonBuild(AgentManagerImpl.java:570) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:597) [INFO] [talledLocalContainer] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) [INFO] [talledLocalContainer] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) [INFO] [talledLocalContainer] at com.sun.proxy.$Proxy87.abandonBuild(Unknown Source) [INFO] [talledLocalContainer] at com.atlassian.bamboo.buildqueue.manager.RemoteAgentManagerImpl$2.visitRemote(RemoteAgentManagerImpl.java:246) [INFO] [talledLocalContainer] at com.atlassian.bamboo.v2.build.agent.RemoteAgentDefinitionImpl.accept(RemoteAgentDefinitionImpl.java:49) [INFO] [talledLocalContainer] at com.atlassian.bamboo.buildqueue.manager.RemoteAgentManagerImpl.registerReturningAgent(RemoteAgentManagerImpl.java:155) [INFO] [talledLocalContainer] at com.atlassian.bamboo.buildqueue.manager.RemoteAgentManagerImpl.registerAgent(RemoteAgentManagerImpl.java:99) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:597) [INFO] [talledLocalContainer] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) [INFO] [talledLocalContainer] at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:70) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [INFO] [talledLocalContainer] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) [INFO] [talledLocalContainer] at com.sun.proxy.$Proxy104.registerAgent(Unknown Source) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:597) [INFO] [talledLocalContainer] at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:205) [INFO] [talledLocalContainer] at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:38) [INFO] [talledLocalContainer] at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:76) [INFO] [talledLocalContainer] at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:112) [INFO] [talledLocalContainer] at org.logicblaze.lingo.jms.JmsServiceExporterMessageListener.doInvoke(JmsServiceExporterMessageListener.java:222) [INFO] [talledLocalContainer] at com.atlassian.bamboo.lingo.BambooJmsServiceExporter.doInvoke(BambooJmsServiceExporter.java:42) [INFO] [talledLocalContainer] at org.logicblaze.lingo.jms.JmsServiceExporterMessageListener.onMessage(JmsServiceExporterMessageListener.java:102) [INFO] [talledLocalContainer] at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1361) [INFO] [talledLocalContainer] at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131) [INFO] [talledLocalContainer] at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202) [INFO] [talledLocalContainer] at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:129) [INFO] [talledLocalContainer] at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:47) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:695)
Attachments
Issue Links
- mentioned in
-
Page Loading...