VirtualBox

Ticket #521 (new defect)

Opened 1 year ago

Last modified 2 weeks ago

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

Reported by: larsf Assigned to:
Priority: major 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

var-log-messages (25.7 kB) - added by larsf on 07/26/07 18:12:16.
excerpt of /var/log/messages of the host (Ubuntu 7.04)
VBox.log.1 (31.4 kB) - added by larsf on 07/27/07 16:43:37.
VBox log of the VM that was supposed to poweroff
VBox.log (32.6 kB) - added by larsf on 07/27/07 17:09:38.
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 yochenhsieh on 05/07/08 02:11:43.
Vbox.log which alsa is used for host and VM.
VBox.log.oss (38.6 kB) - added by yochenhsieh on 05/07/08 02:13:10.
VBox.log which oss is used for host and VM.

Change History

07/26/07 18:12:16 changed by larsf

  • attachment var-log-messages added.

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

07/26/07 18:15:18 changed by larsf

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

07/27/07 16:40:20 changed by larsf

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...

07/27/07 16:43:37 changed by larsf

  • attachment VBox.log.1 added.

VBox log of the VM that was supposed to poweroff

07/27/07 16:44:52 changed by larsf

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

07/27/07 17:08:38 changed by larsf

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.

07/27/07 17:09:38 changed by larsf

  • attachment VBox.log added.

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

08/07/07 10:57:13 changed by larsf

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).

09/01/07 16:30:51 changed by sandervl73

  • priority changed from major to critical.
  • summary changed from host freezes on poweroff of a VM when running 4 VMs to Internal networking bug hangs host after closing.

03/10/08 04:38:29 changed by paulo.sousa.filho

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.

03/10/08 07:31:41 changed by frank

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

03/10/08 12:59:51 changed by paulo.sousa.filho

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

05/03/08 18:19:23 changed by yochenhsieh

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?

05/03/08 19:50:01 changed by sandervl73

  • version changed from VirtualBox 1.4.0 to VirtualBox 1.6.0.

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

05/05/08 08:00:45 changed by yochenhsieh

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?

05/05/08 09:43:07 changed by yochenhsieh

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.

05/05/08 10:13:05 changed by frank

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.

05/06/08 18:00:24 changed by frank

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.

05/07/08 02:11:43 changed by yochenhsieh

  • attachment VBox.log.alsa added.

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

05/07/08 02:13:10 changed by yochenhsieh

  • attachment VBox.log.oss added.

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

05/07/08 02:14:53 changed by yochenhsieh

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

05/07/08 08:28:50 changed by frank

Which guest are you using?

05/07/08 08:38:26 changed by yochenhsieh

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.

05/07/08 15:11:10 changed by frank

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

05/07/08 17:13:47 changed by yochenhsieh

Yes, the host kernel is 32bit.

05/23/08 08:43:30 changed by frank

  • summary changed from Internal networking bug hangs host after closing to shutdown of a VM with ALSA sound backend freezes host (Linux 2.6.11).

05/23/08 08:54:25 changed by frank

  • priority changed from critical to major.

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.

05/23/08 09:42:21 changed by yochenhsieh

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

07/07/08 16:56:06 changed by frank

  • host changed from other to Linux.

07/09/08 23:22:56 changed by frank

  • owner changed.
  • component changed from other to host support.

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy