[ https://issues.apache.org/jira/browse/CLOUDSTACK-2856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wei Zhou closed CLOUDSTACK-2856. -------------------------------- > NPE is seen when a guest vm is stopped first and then destroyed > --------------------------------------------------------------- > > Key: CLOUDSTACK-2856 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2856 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server > Affects Versions: 4.2.0 > Reporter: Abhinav Roy > Assignee: Wei Zhou > Fix For: 4.2.0 > > Attachments: apilog.log, management-server.log > > > Steps : > ======================== > 1. Deploy a guest VM. > 2. Stop the VM. > 3. Destroy the VM. > Expected behaviour : > ======================== > 1. The VM should be successfully destroyed. > Observed behaviour : > ======================= > NPE is thrown when the VM is destroyed. > 2013-06-05 17:03:49,778 DEBUG [cloud.async.AsyncJobManagerImpl] > (catalina-exec-25:null) submit async job-52, details: AsyncJobVO {id:52, > userId: 2, accountId: 2, sessionKey: null, instanceType: VirtualMachine, > instanceId: 9, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd, > cmdOriginator: null, cmdInfo: > {"response":"json","id":"cd351199-941e-4d66-b1c4-f31202d32b92","sessionkey":"1uDZqKxOwYgif6jtyJvQ+aQdIM0\u003d","ctxUserId":"2","httpmethod":"GET","_":"1370431837633","ctxAccountId":"2","ctxStartEventId":"194"}, > cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, > processStatus: 0, resultCode: 0, result: null, initMsid: 90310994128556, > completeMsid: null, lastUpdated: null, lastPolled: null, created: null} > 2013-06-05 17:03:49,780 DEBUG [cloud.api.ApiServlet] (catalina-exec-25:null) > ===END=== 10.144.7.12 -- GET > command=destroyVirtualMachine&id=cd351199-941e-4d66-b1c4-f31202d32b92&response=json&sessionkey=1uDZqKxOwYgif6jtyJvQ%2BaQdIM0%3D&_=1370431837633 > 2013-06-05 17:03:49,782 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-25:job-52) Executing > org.apache.cloudstack.api.command.user.vm.DestroyVMCmd for job-52 > 2013-06-05 17:03:49,812 ERROR [cloud.async.AsyncJobManagerImpl] > (Job-Executor-25:job-52) Unexpected exception while executing > org.apache.cloudstack.api.command.user.vm.DestroyVMCmd > java.lang.NullPointerException > at > com.cloud.vm.UserVmManagerImpl.collectVmDiskStatistics(UserVmManagerImpl.java:3427) > at > com.cloud.vm.UserVmManagerImpl.destroyVm(UserVmManagerImpl.java:3383) > at > com.cloud.vm.UserVmManagerImpl.destroyVm(UserVmManagerImpl.java:1897) > at > com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) > at > org.apache.cloudstack.api.command.user.vm.DestroyVMCmd.execute(DestroyVMCmd.java:100) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:155) > at > com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:437) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > at java.util.concurrent.FutureTask.run(FutureTask.java:166) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:679) > 2013-06-05 17:03:49,813 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-25:job-52) Complete async job-52, jobStatus: 2, resultCode: > 530, result: Error Code: 530 Error text: null > 2013-06-05 17:03:51,443 DEBUG > [network.router.VirtualNetworkApplianceManagerImpl] > (RouterStatusMonitor-1:null) Found 5 routers to update status. > NOTE : > ====================== > This behaviour is not seen when the VM is destroyed directly without stopping > it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira