Opened 12 years ago
Closed 12 years ago
#11521 closed defect (fixed)
JAVA SDK - console.powerDown leads to VM stuck in "stopping" state.
Reported by: | Chris | Owned by: | |
---|---|---|---|
Component: | VM control | Version: | VirtualBox 4.2.4 |
Keywords: | Cc: | ||
Guest type: | all | Host type: | Linux |
Description
My initial assumption was that I was experiencing this issue: https://www.virtualbox.org/ticket/10854 I am not certain however as my log output differs a bit.
I am using the Java API. To isolate this issue I wrote a simple Scala tool to just create->start->poweroff->unregister a machine in a loop. At some random time within 5 and 100 iterations, powerDown followed by a progress.waitForCompletion(-1) would just hang and I got a message about the VM in an invalid state.
When I monitor: session.getMachine.getState and machine.getState, when the issue occurs, both stay at "Stopping".
In addition, sometimes I get the following message from the UI side of things
VT-x/AMD-V hardware acceleration has been enabled, but is not operational. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot. Please ensure that you have enabled VT-x/AMD-V properly in the BIOS of your host computer.
Here is the relevant part of the VBox.log
00:00:00.369953 VM: Halt method global1 (5) 00:00:00.369968 HaltedGlobal1 config: cNsSpinBlockThresholdCfg=2000 00:00:00.369973 Changing the VM state from 'CREATING' to 'CREATED'. 00:00:00.370078 Changing the VM state from 'CREATED' to 'POWERING_ON'. 00:00:00.370180 Changing the VM state from 'POWERING_ON' to 'RUNNING'. 00:00:00.373091 Guest Log: BIOS: VirtualBox 4.2.4 00:00:00.373209 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0) 00:00:00.382825 Console::powerDown(): A request to power off the VM has been issued (mMachineState=Stopping, InUninit=0) 00:00:00.384508 ERROR [COM]: aRC=VBOX_E_INVALID_VM_STATE (0x80bb0002) aIID={db7ab4ca-2a3f-4183-9243-c1208da92392} aComponent={Console} aText={Invalid machine state Stopping when checking if the guest entered the ACPI mode)}, preserve=false 00:00:00.384790 PIIX3 ATA: Ctl#0: RESET, DevSel=0 AIOIf=0 CmdIf0=0x00 (-1 usec ago) CmdIf1=0x00 (-1 usec ago) 00:00:00.384842 PIIX3 ATA: Ctl#0: finished processing RESET 00:00:00.385174 Guest Log: BIOS: ata0-0: PCHS=16383/16/63 LCHS=1024/255/63
I should also mention that I am experiencing this on both Intel and AMD machines, and using kernel 3.2 and 3.7.
Attachments (2)
Change History (9)
comment:2 by , 12 years ago
After more investigation, execution never gets to progress.waitForCompletion(-1)
It just hangs at powerDown
comment:3 by , 12 years ago
Updated test systems from 4.2.4 -> 4.2.10. Issue still occurs. What other logs might be useful to debug this? The kernel mod seems to get in a weird state as I cannot unload it. A reboot of the host seems to be the only way to recover.
comment:4 by , 12 years ago
Perhaps it'd speed up the things if you'll attach the simplified test case in scala or java, demonstrating the issue you've been blocked.
by , 12 years ago
Attachment: | sample_vbox.scala added |
---|
An obviously incomplete sample, but illustrates example
comment:5 by , 12 years ago
I added a simple example piece of scala. Let me know if it is helpful at all.
comment:6 by , 12 years ago
Alright I've upgraded to 4.2.12 on Debian-testing Hosts and this problem seems to have vanished. Can't reproduce it any longer.
comment:7 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
So I will close this ticket. Thank you!
I never thought to check dmesg for some reason. After reproducing this once again, dmesg contains: