Ticket #11615 (closed defect: fixed)

Opened 9 years ago

Last modified 8 years ago

ALSA driver causes VERR_NO_MEMORY => Fixed in SVN

Reported by: mduft Owned by:
Component: other Version: VirtualBox 4.2.10
Keywords: Cc:
Guest type: other Host type: other


Hey! I just "discovered" the possibility to switch my linux hosted windows 7 VM to use the ALSA driver instead of the PulseAudio one. This causes the VM to crash with a Guru Meditation during loading of Windows. See attached log.

Host has 12 Gigs, 1 Gig used when i start the VM :)


VBox.log.1.bz2 Download (31.7 KB) - added by mduft 9 years ago.
Log with ALSA driver
VBox.log.bz2 Download (13.7 KB) - added by mduft 9 years ago.
Log of currently running VM /without/ ALSA (using PulseAudio -> no sound for me)

Change History

Changed 9 years ago by mduft

Log with ALSA driver

comment:1 Changed 9 years ago by frank

  • Status changed from new to closed
  • Resolution set to invalid

Your host is 32-bit and there is no PAE kernel installed. Your log shows that your host can only address 3964MB of RAM, the remaining memory is not used. Your guest has 2GB assigned while there are only 1900MB available.

I strongly suggest you to switch to a 64-bit Linux distribution. This will fix your memory problems.

comment:2 Changed 9 years ago by mduft

not true.

mduft@s01en22 / $ cat /boot/config | grep PAE

and i /am/ using all my 12gb by running a whole lot of processes that don't take more than 4gb.

please reopen. even if the /whole/ system would only be able to use 4GB, shouldn't a 2GB vm fit if only 500MB are used?!

comment:3 Changed 9 years ago by mduft

  • Status changed from closed to reopened
  • Resolution invalid deleted

comment:4 Changed 9 years ago by mduft

from the attached VBox Log:

538 00:00:00.912561 Host paging mode: PAE+PGE

comment:5 Changed 9 years ago by mduft


 624 00:00:01.142788 PAE - Physical Address Extension       = 0 (1)

guest (host)

comment:6 Changed 9 years ago by mduft

actually, i doubt that the output of the log is correct. i have the machine running now with 2GB assigned, and the current log shows similar numbers (which can't be true, as otherwise the machine wouldn't fit). either the number shows the available RAM /after/ reserving RAM for the VM, or the number is wrong (see upcoming attachment)

Changed 9 years ago by mduft

Log of currently running VM /without/ ALSA (using PulseAudio -> no sound for me)

comment:7 Changed 9 years ago by mduft

just for testing: i increased the memory to 3500MB, and the machine still boots fine. task manager in windows also shows 3499MB, so i guess it's ok. need a log of this too?

the line stating the available RAM in this log is:

00:00:00.875846 Host RAM: 3964MB total, 3103MB available

the vm works great. it only doesn't as soon as i switch to ALSA. and don't get me wrong, but suggesting to replace the host even though it is supported and working, except for one component which causes a guru meditation, causes somehow unprofessional impression...

comment:8 Changed 9 years ago by frank

First, it has almost zero information that you can successfully boot a VM with 3500MB guest RAM assigned. VirtualBox does lazy allocation of the guest RAM so as long as the guest does not touch into the (virtual) RAM, the VM process will not allocate it. So try to start some memory-intensive task in the guest and you will most likely observe that your VM will abort sooner or later. Well, actually it should not abort but pause, but that's another bug not related to your problem.

Second, you are right, the host paging mode is PAE and the amount of host RAM is wrong. That's truly a bug in VirtualBox which must be fixed. The values are obviously wrong for PAE hosts (sysinfo() seems to fail here).

But using the ALSA backend is most likely not the reason for your memory problems. I still suggest you to switch to a 64-bit host for the amount of memory you intend to assign to your guest. The reason is that the VM guest memory has to be mapped to the VM process. For 32-bit hosts, VirtualBox starts 'swapping' of maps if the guest RAM exceeds 1GB AFAIR. This will reduce the performance of your VM if your guest uses its RAM heavily. So better use 64-bit address spaces if possible.

comment:9 Changed 9 years ago by mduft

I tried to fill up the 2G RAM that i have regularly assigned to the VM, and no negative things start to happen until the VM starts swapping, so that should be ok.

Even when reducing the VM memory to 1GB, switching to the ALSA driver causes out of memory right before the animated windows boot logo appears ("starting windows" is there already).

I cannot easily switch to a 64bit host, as i'm not using this machine for fun. Its my work-workstation, where i really depend on the current setup of the system.

can i collect more information that would be useful? the same problem also happens for a windows 8 vm for me, right after the boot animation started. it does not happen if i enable sound on one of my XP boxes - but that may be because it simply has no driver for the intel hd audio? also if i switch the controller from intel hd audio to ICH AC97 the windows 8 and 7 VMs boot again with no other settings changed.

So from my observation, only settings Intel HD Audio /and/ ALSA Host Driver will cause this problem (on a 32bit PAE Linux Host with a 64 bit Windows 7/8 guest).

comment:10 Changed 9 years ago by mduft

oh - my windows 7 VM has no driver for the AC97 controller installed :D so no sound again. and maybe the reason for not crashing?

comment:11 Changed 9 years ago by frank

At least the bug with the available memory was easy to fix, see r45099.

Regarding your ALSA issue: I cannot reproduce this problem. I have tested this on Debian / Squeeze with a 32-bit PAE kernel and a Windows 7 guest. I was able to assign 2GB to the guest and it booted fine with Intel HD Audio and ALSA. I somehow suspect the ALSA support on your system.

comment:12 follow-up: ↓ 13 Changed 9 years ago by mduft

well, could be possible, yes. i'm running a gentoo system, maybe something in the alsa config is different. any useful information i could provide?

comment:13 in reply to: ↑ 12 Changed 9 years ago by frank

Replying to mduft:

Any useful information i could provide?

To be honest I have no idea. I would suggest you to disable sound for these VMs. Perhaps use the NULL audio backend or remove the audio card from the VM settings. Looking at the code one can see that a mapping fails. My suspicion is that the ALSA stuff on your system is allocating a bigger part of the VM address space which is then missing for mapping the VM memory. I don't think we can work around this problem. See above my remarks about the dense address space in 32-bit hosts.

comment:14 Changed 9 years ago by mduft

hm, so no sound then :(

comment:15 Changed 9 years ago by frank

What about PulseAudio?

comment:16 Changed 9 years ago by mduft

it boots fine, hardware is detected, but not a single beep will come out of the speakers. skype fex. can play sounds over PulseAudio but they are really silent. i have no idea whats the problem there.

comment:17 Changed 9 years ago by mduft

i now verified that banshee plays over pulseaudio, so actually on my system its working, but not for virtualbox

comment:18 Changed 9 years ago by frank

Maybe you just didn't set the correct volume control. PulseAudio has separate controls for every client and PulseAudio usually works.

comment:19 Changed 9 years ago by frank

I would like to ask you to perform one additional test: Could you check where the is located on your system and then do

objdump -T /usr/lib/x86_64-linux-gnu/ |grep snd_

(in case the location of that library is /usr/lib/x86_64-linux-gnu, otherwise adapt the path) and post the output of this command? Thanks!

comment:20 Changed 9 years ago by mduft

sure :)

$ ll /usr/lib/ 
lrwxrwxrwx 1 root root 20 Jul 30  2012 /usr/lib/ ->
$ ll /usr/lib/ 
-rwxr-xr-x 1 root root 345544 Jul 30  2012 /usr/lib/
$ objdump -T /usr/lib/ | grep snd_
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_hw_params_any
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_close
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_sw_params_sizeof
00000000      DF *UND*	00000000  ALSA_0.9.0rc4 snd_pcm_hw_params_set_period_size_near
00000000      DF *UND*	00000000  ALSA_0.9.0rc4 snd_pcm_hw_params_get_period_size
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_drain
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_hw_params
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_sw_params_set_avail_min
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_hw_params_sizeof
00000000      DF *UND*	00000000  ALSA_0.9.0rc4 snd_pcm_hw_params_set_periods_near
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_open
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_sw_params
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_recover
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_writei
00000000      DF *UND*	00000000  ALSA_0.9    snd_strerror
00000000      DF *UND*	00000000  ALSA_0.9.0rc4 snd_pcm_hw_params_get_periods
00000000      DF *UND*	00000000  ALSA_0.9.0rc4 snd_pcm_hw_params_get_buffer_size
00000000      DF *UND*	00000000  ALSA_0.9.0rc4 snd_pcm_hw_params_set_rate_near
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_hw_params_set_access
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_hw_params_set_channels
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_hw_params_copy
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_nonblock
00000000      DF *UND*	00000000  ALSA_0.9.0rc4 snd_pcm_hw_params_set_buffer_size_near
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_hw_params_set_format
00000000      DF *UND*	00000000  ALSA_0.9.0rc4 snd_pcm_hw_params_get_channels
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_sw_params_current
00000000      DF *UND*	00000000  ALSA_0.9    snd_pcm_sw_params_set_start_threshold

comment:21 Changed 9 years ago by frank

  • Summary changed from ALSA driver causes VERR_NO_MEMORY to ALSA driver causes VERR_NO_MEMORY => Fixed in SVN

Actually I think we found the problem. The problem was a invalid symbol resolution to libasound2 in the generic .run package. Same problem with ! btw.

Could you check if  this test build fixes your ALSA problems? Users who need the 64-bit package can download it  here.

Thank you!

comment:22 Changed 8 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed

Fixed in VBox 4.2.12.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use