VirtualBox

Opened 17 years ago

Closed 14 years ago

Last modified 14 years ago

#521 closed defect (wontfix)

shutdown of a VM with ALSA sound backend freezes host (Linux 2.6.11)

Reported by: larsf Owned by:
Component: host support Version: VirtualBox 1.6.0
Keywords: host freeze on poweroff Cc:
Guest type: other Host type: Linux

Description

I have an IBM xSeries with 2 CPUs à 2,4GHz with Hyper-Threading (makes 4 virtual CPUs à 2,4GHz) and 2 GB RAM running Ubuntu Feisty (7.04) as host system.

Running three VMs via commands like "nohup VBoxVRDP -startvm sles10-node1 > /home/virtualbox/Machines/sles10-node1/Logs/nohup.log 2>&1 &" works without problems. Adding and starting a fourth node leads to the problem, that the kernel of the host completely freezes when trying to poweroff (VBoxManage controlvm sles10-node1 poweroff) or kill (kill -9 <pid>) one of the four processes for the four running VMs. On the console the following message appears: "BUG: soft lock detected for CPU#3".

Passing the parameter "nostflock" to the kernel via the menu.lst in /boot/grub/ was tried, but with the same result! :/ Disabling Hyper-Threading in the BIOS didn't improve the issue either.

A memtest86+ will run this night, but we don't really think the RAM is broken or something, but you never know... If the test does not indicate any errors tomorrow morning, the issue still remains unsolved... :(

The strange thing is that this issue only occurs when running 4 VMs (with 3 all works fine) and only when trying to poweroff or kill one of them. Until then, they run happily!

An extract of /var/log/messages is attached...

Attachments (5)

var-log-messages (25.7 KB ) - added by larsf 17 years ago.
excerpt of /var/log/messages of the host (Ubuntu 7.04)
VBox.log.1 (31.4 KB ) - added by larsf 17 years ago.
VBox log of the VM that was supposed to poweroff
VBox.log (32.6 KB ) - added by larsf 17 years ago.
VBox.log of the VM the "sutdown -h now" command was run in and also froze the host
VBox.log.alsa (28.2 KB ) - added by You-Cheng Hsieh 16 years ago.
Vbox.log which alsa is used for host and VM.
VBox.log.oss (38.6 KB ) - added by You-Cheng Hsieh 16 years ago.
VBox.log which oss is used for host and VM.

Download all attachments as: .zip

Change History (31)

by larsf, 17 years ago

Attachment: var-log-messages added

excerpt of /var/log/messages of the host (Ubuntu 7.04)

comment:1 by larsf, 17 years ago

I mean the kernel parameter "nosoftlock" of course, sorry for the typo... ;)

comment:2 by larsf, 17 years ago

ok, although memtest86 and memtest86+ froze the first host, I still think this is also an issue of vbox itself. I tested the above described scenario of 3 and 4 VMs on a second host (Xseries with 2 CPUs à 2,6 GHz and 4GB RAM) running RHEL4, kernel 2.6.9 and got the same result: when killing (via kill) or powering off (via VBoxManage controlvm sles10-node1 poweroff) one of my VMs the host completely freezes. In this case there are no hints at all on the screen or in the logs. On the first host it said at least "soft lock detected for CPU#1). I can also reproduce this issue when running any number of VMs and trying to poweroff one of them while they are still booting the operating system (in this case SLES10).

So it could be possible that the hardware of the first host is maybe broken, but it is very unlikely that the second host is broken too as it is in production since months! ;)

maybe that helps a little bit to reproduce or even locate the bug... :/

In the meantime, I'll see what happens when invoking a "reboot" or "shutdown -h now" command in a shell within one of the VMs itself...

by larsf, 17 years ago

Attachment: VBox.log.1 added

VBox log of the VM that was supposed to poweroff

comment:3 by larsf, 17 years ago

I attached the VBox.log of the VM that was supposed to poweroff, maybe it helps somehow?

comment:4 by larsf, 17 years ago

executing a "reboot" in one of the VMs itself works, BUT: executing a "shutdown -h now" in one of the VMs freezes the host as well... :/

I'll attach the VBox.log of the VM I run the "shutdown -h" command in.

by larsf, 17 years ago

Attachment: VBox.log added

VBox.log of the VM the "sutdown -h now" command was run in and also froze the host

comment:5 by larsf, 17 years ago

As klaus-vb just told me in the IRC channel, this seems to be a bug in the Vbox code used for internal networking. A workaround until the bug has been completely located and fixed is to use one of the other networking types (host adapter or NAT).

comment:6 by Sander van Leeuwen, 17 years ago

priority: majorcritical
Summary: host freezes on poweroff of a VM when running 4 VMsInternal networking bug hangs host after closing

comment:7 by Paulo Sousa, 16 years ago

Hi I have a Intel Core 2 Duo E4500 with a Gigabyte VM900M mainboard and 2GB RAM. The host is using a Windows XP SP2. When I run VBOX 1.5.6 with 4 guests (3 Slackwares + 1 Windows XP) and try to halt one machine, the system freezes (Stopping). I tried the host interface and NAT and all worked fine. I can send more information if you want.

comment:8 by Frank Mehnert, 16 years ago

paulo, what host architecture do you use, x86 or x86_64 (amd64)?

comment:9 by Paulo Sousa, 16 years ago

Frank, the hardware is ready for 64, but the OS is 32.

comment:10 by You-Cheng Hsieh, 16 years ago

Hello, My host is Linux x86 and CPU is Intel Pentium-M Dothan. I only run one VM but it will always freeze the host when I halt it. Reboot the VM will not freeze. Only happens after 1.4.0, and still happens in 1.6.0. Virtualbox 1.3.x work fine for me.

Do you think it's the same bug? Or should I report another bug?

comment:11 by Sander van Leeuwen, 16 years ago

Version: VirtualBox 1.4.0VirtualBox 1.6.0

Sounds like the same thing to me, so here is a good place to report it.

comment:12 by You-Cheng Hsieh, 16 years ago

Hi, I can halt my VM without freezing host if I disable audio or use null audio driver in 1.6.0. Could you please test?

comment:13 by You-Cheng Hsieh, 16 years ago

I can make sure now this bug on my linux is caused by ALSA. I switch to use OSS driver for both host and guest, the VM can now halt fine.

The Changelog of 1.4.0: # Audio: fixed problem with ALSA on Linux before 2.6.18 blocking other ALSA clients on the system. I think it is possibly the cause. My host kernel is 2.6.11, alsa 1.0.8. It seems it fixed problem, and produce another problem.

comment:14 by Frank Mehnert, 16 years ago

Thanks for this detailed information. But I doubt that this change could have a bad impact. The problem with ALSA on Linux < 2.6.18 is that an ALSA client tries to start an ALSA server if there is no server running so far. With Linux >= 2.6.18 this is done by the kernel but with Linux < 2.6.18 this is done by forking the current process. The fix you mentioned changed the allocation strategy of physical memory to make sure it don't changes the mappings during fork().

We will try to reproduce your problem here now that we have more information.

comment:15 by Frank Mehnert, 16 years ago

I just started a VM successfully on Linux 2.6.17.14 with the ALSA sound backend. Please could you attach your VBox.log file of the session when it freezes? Perhaps copy the file just before it would freeze or after the next reboot.

by You-Cheng Hsieh, 16 years ago

Attachment: VBox.log.alsa added

Vbox.log which alsa is used for host and VM.

by You-Cheng Hsieh, 16 years ago

Attachment: VBox.log.oss added

VBox.log which oss is used for host and VM.

comment:16 by You-Cheng Hsieh, 16 years ago

The shutdown process is not logged when using alsa. I've tried several times, but it's just that.

comment:17 by Frank Mehnert, 16 years ago

Which guest are you using?

comment:18 by You-Cheng Hsieh, 16 years ago

The logs were created with my own livecd, which was made based on Mandriva Linux. But I also met same problem(freeze host when halt guest) with winxp. Because the disk image is broken, winxp is now unbootable.

comment:19 by Frank Mehnert, 16 years ago

yochenhsieh: Your host Linux kernel is 32 bit as well, right?

comment:20 by You-Cheng Hsieh, 16 years ago

Yes, the host kernel is 32bit.

comment:21 by Frank Mehnert, 16 years ago

Summary: Internal networking bug hangs host after closingshutdown of a VM with ALSA sound backend freezes host (Linux 2.6.11)

comment:22 by Frank Mehnert, 16 years ago

priority: criticalmajor

Any chance to upgrade your kernel to a more recent one? It is possible that this is some incompatibility of our kernel mode with Linux 2.6.11 which was released in the first quarter of 2005. We will look for this issue but I don't think that this bug is critical as more recent kernels work. And larsf did not response anymore so I assume that his problem disappeared.

comment:23 by You-Cheng Hsieh, 16 years ago

I will just use OSS instead. Thanks for your help.

comment:24 by Frank Mehnert, 16 years ago

Host type: otherLinux

comment:25 by Frank Mehnert, 16 years ago

Component: otherhost support

comment:26 by Frank Mehnert, 14 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use