Bug 821706 - NullPointerException in RemoveVmCommand
NullPointerException in RemoveVmCommand
Status: CLOSED INSUFFICIENT_DATA
Product: oVirt
Classification: Community
Component: ovirt-engine-core (Show other bugs)
unspecified
Unspecified Unspecified
urgent Severity high
: ---
: ---
Assigned To: Roy Golan
Avihai Shoham
virt
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-15 07:38 EDT by Rami Vaknin
Modified: 2012-06-11 08:03 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-05 04:31:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rami Vaknin 2012-05-15 07:38:31 EDT
Environment:
Devel env, last commit's hash: bc0e9bb2c06e1e3544685ba858582900f198289c

Scenario:
I marked ~20 Up vms in the webadmin's Virtual Machines grid and stopped them
(right-click -> Stop), after few moments I removed the vms that were already
stopped.

Result:
This scenario leads to NullPointerEcxeption in RemoveVmCommand.

Log:
2012-05-08 18:11:37,176 INFO  [org.ovirt.engine.core.bll.RemoveVmCommand]
(pool-10-thread-45) [56c8068e] Lock freed to object EngineLock [exclusiveLocks=
key: org.ovirt.engine.core.bll.RemoveVmCommand value:
1515d337-9663-466c-aa1c-47e9015f1eeb
, sharedLocks= ]
2012-05-08 18:11:37,174 ERROR [org.ovirt.engine.core.bll.RemoveVmCommand]
(pool-10-thread-43) [7719e34c] Command
org.ovirt.engine.core.bll.RemoveVmCommand throw exception:
java.lang.NullPointerException
        at
org.ovirt.engine.core.bll.VmHandler.checkStatusAndLockVm(VmHandler.java:195)
[engine-bll.jar:]
        at
org.ovirt.engine.core.bll.RemoveVmCommand.ExecuteVmCommand(RemoveVmCommand.java:54)
[engine-bll.jar:]
        at
org.ovirt.engine.core.bll.VmCommand.executeCommand(VmCommand.java:97)
[engine-bll.jar:]
        at
org.ovirt.engine.core.bll.CommandBase.ExecuteWithoutTransaction(CommandBase.java:754)
[engine-bll.jar:]
        at
org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:846)
[engine-bll.jar:]
        at
org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1155)
[engine-bll.jar:]
        at
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:168)
[engine-utils.jar:]
        at
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:107)
[engine-utils.jar:]
        at org.ovirt.engine.core.bll.CommandBase.Execute(CommandBase.java:861)
[engine-bll.jar:]
        at
org.ovirt.engine.core.bll.CommandBase.ExecuteAction(CommandBase.java:268)
[engine-bll.jar:]
        at
org.ovirt.engine.core.bll.MultipleActionsRunner.executeValidatedCommands(MultipleActionsRunner.java:182)
[engine-bll.jar:]
        at
org.ovirt.engine.core.bll.MultipleActionsRunner.RunCommands(MultipleActionsRunner.java:162)
[engine-bll.jar:]
        at
org.ovirt.engine.core.bll.MultipleActionsRunner$1.run(MultipleActionsRunner.java:84)
[engine-bll.jar:]
        at
org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:64)
[engine-utils.jar:]
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
[rt.jar:1.6.0_22]
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
[rt.jar:1.6.0_22]
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
[rt.jar:1.6.0_22]
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[rt.jar:1.6.0_22]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[rt.jar:1.6.0_22]
        at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_22]

2012-05-08 18:11:37,180 INFO 
[org.ovirt.engine.core.vdsbroker.irsbroker.RemoveVMVDSCommand]
(pool-10-thread-45) [56c8068e] START, RemoveVMVDSCommand(storagePoolId =
33d04740-d64f-4831-8de0-c111fdb8066d, ignoreFailoverLimit = false,
compatabilityVersion = null, storageDomainId =
00000000-0000-0000-0000-000000000000, vmGuid =
1515d337-9663-466c-aa1c-47e9015f1eeb), log id: 48581c84
2012-05-08 18:11:37,220 INFO  [org.ovirt.engine.core.bll.RemoveVmCommand]
(pool-10-thread-43) [7719e34c] Lock freed to object EngineLock [exclusiveLocks=
key: org.ovirt.engine.core.bll.RemoveVmCommand value:
03631aad-7b42-4c73-8b3e-aa406d482454
, sharedLocks= ]
Comment 1 Itamar Heim 2012-05-16 10:35:02 EDT
raising priority until this is investigated for root cause to determine how deep is the issue
Comment 2 Roy Golan 2012-05-29 00:58:55 EDT
I need the logs or a reproducer. this doesn't hapen on my env (with far less VMs though). 
Try to dig tour env to see if you still got them.
Comment 3 Rami Vaknin 2012-06-11 08:03:17 EDT
I couldn't reproduce it either in the newest code:
I've tried with last commit's hash: 0f298ab06222be0121faa9e2b400f59ddec22d35

Note You need to log in before you can comment on or make changes to this bug.