VirtualBox

12 年 前 建立

12 年 前 結束

#11615 closed defect (fixed)

ALSA driver causes VERR_NO_MEMORY => Fixed in SVN

回報者: Markus Duft 負責人:
元件: other 版本: VirtualBox 4.2.10
關鍵字: 副本:
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 :)

附加檔案 (2)

VBox.log.1.bz2 (31.7 KB ) - 12 年 前, 由 Markus Duft 新增
Log with ALSA driver
VBox.log.bz2 (13.7 KB ) - 12 年 前, 由 Markus Duft 新增
Log of currently running VM /without/ ALSA (using PulseAudio -> no sound for me)

下載所有附檔: .zip

更動歷史 (24)

12 年 前Markus Duft 編輯

附檔: 新增 VBox.log.1.bz2

Log with ALSA driver

comment:1 12 年 前Frank Mehnert 編輯

狀態: newclosed
處理結果: 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 12 年 前Markus Duft 編輯

not true.

mduft@s01en22 / $ cat /boot/config | grep PAE
CONFIG_X86_PAE=y

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 12 年 前Markus Duft 編輯

狀態: closedreopened
處理結果: invalid

comment:4 12 年 前Markus Duft 編輯

from the attached VBox Log:

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

comment:5 12 年 前Markus Duft 編輯

and

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

guest (host)

comment:6 12 年 前Markus Duft 編輯

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)

12 年 前Markus Duft 編輯

附檔: 新增 VBox.log.bz2

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

comment:7 12 年 前Markus Duft 編輯

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 12 年 前Frank Mehnert 編輯

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 12 年 前Markus Duft 編輯

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 12 年 前Markus Duft 編輯

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 12 年 前Frank Mehnert 編輯

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 12 年 前Markus Duft 編輯

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?

回覆:  12 comment:13 12 年 前Frank Mehnert 編輯

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 12 年 前Markus Duft 編輯

hm, so no sound then :(

comment:15 12 年 前Frank Mehnert 編輯

What about PulseAudio?

comment:16 12 年 前Markus Duft 編輯

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 12 年 前Markus Duft 編輯

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

comment:18 12 年 前Frank Mehnert 編輯

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

comment:19 12 年 前Frank Mehnert 編輯

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

objdump -T /usr/lib/x86_64-linux-gnu/libSDL.so |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 12 年 前Markus Duft 編輯

sure :)

$ ll /usr/lib/libSDL.so 
lrwxrwxrwx 1 root root 20 Jul 30  2012 /usr/lib/libSDL.so -> libSDL-1.2.so.0.11.4
$ ll /usr/lib/libSDL-1.2.so.0.11.4 
-rwxr-xr-x 1 root root 345544 Jul 30  2012 /usr/lib/libSDL-1.2.so.0.11.4
$ objdump -T /usr/lib/libSDL-1.2.so.0.11.4 | 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 12 年 前Frank Mehnert 編輯

摘要: ALSA driver causes VERR_NO_MEMORYALSA 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 !libpulse.so 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 12 年 前Frank Mehnert 編輯

狀態: reopenedclosed
處理結果: fixed

Fixed in VBox 4.2.12.

注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette