Situation: I have android x86 accelerated emulator on Mac OS X. It starts normally (and shows HAX is working and emulator runs in fast virt mode
line) and I can run programs. After program being launched emulator works some time and freezes, so I cannot interact with it.
Example: if I call adb shell ls -l /sdcard/
(or many other adb commands) nothing is printed in console and I must press control+C to return control.
After emulator restart problem vanishes and after time it occurs again.
Works right on not-accelerated emulator. Works wrong only with HAXM turned on.
I have tried to
- Reinstall android SDK
- Create emulators with different properties
- Run on another mac machine
- Reboot emulator/computer
- Enable 64-bit Kernel and Extensions (was disabled)
I need to make emulator working all the time (not only first N minutes).
That's not a duplicate to this question because of:
- Mac OS X version is lower than 10.9 and I cannot use hotfix Intel provided
- No crash observed here
- Computer doesn't freeze (but emulator stops work)
- Freeze occurs after emulator has been working for time (up to 30 min)
Possibly relates to this question, but
- cannot analyze is it the same question
- no helpful answers there
System information:
Model Identifier:iMac10,1
Memory:8 GB
System Version:Mac OS X 10.6.8 (10K549)
Kernel Version:Darwin 10.8.0
HAXM release 1.0.6
It met Intel requirements
Supported Operating Systems:
Mac OS X* 10.6 Snow Leopard and 10.7 Lion (32/64-bit)
Making setup I followed instructions from developer.android. I allocated 2048 Mb during HAXM install and created emulator with 512 Mb RAM.
There are some messages in dmesg
in the meantime. History:
1) After emulator was started (it works)
Kext com.intel.kext.intelhaxm not found for unload request.
13
possible map ffffffffffffffff cpu_online_map 3
haxm_error: fc_msr haxm_error: fc_msr 5
5
haxm_error: vt_enablhaxm_error: vt_enable e 1
haxm_error: nx_enable 1
haxm_error: nx_enable 2048
2048
haxm_error: ---- HAXM release 1.0.6 --------
haxm_error: This log collects runnging status of HAXM driver.
haxm_error: set memlimit 0x80000000
2) After some time passed (it still works!)
23
possible map ffffffffffffffff cpu_online_map 3
haxm_error: fc_msr h5
axm_error: fc_msr h5
ahaxm_error: vt_enable xm_error: vt_enable 1
1
haxm_error: nx_haxm_error: nx_enable ena2048
ble 2048
haxm_error: ---- HAXM release 1.0.6 --------
haxm_error: This log collects runnging status of HAXM driver.
.......hax_vm_create_ui 0
cvcpu 0x1d803000 vmid 0 vcpu_id 0
minor id 1000before the crate node
setup hax tunnel request for already setup one
haxm_error: hax_vm_alloc_ram: size 0x20000000
haxm_error: !VM_STATE_FLAGS_MEM_ALLOC
haxm_error: Memory allocation, va:123787000, size:20000000
haxm_error: !VM_STATE_FLAGS_MEM_ALLOC: spare_ram 0x5800000
haxm_error: hax_vm_alloc_ram: size 0x20000
haxm_error: spare alloc: mem_limit 0x0, size 0x20000, spare_ram 0x5800000
haxm_error: VM_STATE_FLAGS_MEM_ALLOC: spare_ram 0x5800000
haxm_error: hax_vm_alloc_ram: size 0x20000
haxm_error: spare alloc: mem_limit 0x0, size 0x20000, spare_ram 0x5800000
haxm_error: VM_STATE_FLAGS_MEM_ALLOC: spare_ram 0x5800000
haxm_error:
...........hax_teardown_vm
.......hax_vm_create_ui 0
cvcpu 0x1d585800 vmid 0 vcpu_id 0
minor id 1000before the crate node
setup hax tunnel request for already setup one
haxm_error: hax_vm_alloc_ram: size 0x20000000
haxm_error: !VM_STATE_FLAGS_MEM_ALLOC
haxm_error: Memory allocation, va:123637000, size:20000000
haxm_error: !VM_STATE_FLAGS_MEM_ALLOC: spare_ram 0x5800000
haxm_error: hax_vm_alloc_ram: size 0x20000
haxm_error: spare alloc: mem_limit 0x0, size 0x20000, spare_ram 0x5800000
haxm_error: VM_STATE_FLAGS_MEM_ALLOC: spare_ram 0x5800000
haxm_error: hax_vm_alloc_ram: size 0x20000
haxm_error: spare alloc: mem_limit 0x0, size 0x20000, spare_ram 0x5800000
haxm_error: VM_STATE_FLAGS_MEM_ALLOC: spare_ram 0x5800000
haxm_error:
...........hax_teardown_vm
.......hax_vm_create_ui 0
cvcpu 0x1d7a8800 vmid 0 vcpu_id 0
minor id 1000before the crate node
setup hax tunnel request for already setup one
haxm_error: hax_vm_alloc_ram: size 0x20000000
haxm_error: !VM_STATE_FLAGS_MEM_ALLOC
haxm_error: Memory allocation, va:123637000, size:20000000
haxm_error: !VM_STATE_FLAGS_MEM_ALLOC: spare_ram 0x5800000
haxm_error: hax_vm_alloc_ram: size 0x20000
haxm_error: spare alloc: mem_limit 0x0, size 0x20000, spare_ram 0x5800000
haxm_error: VM_STATE_FLAGS_MEM_ALLOC: spare_ram 0x5800000
haxm_error: hax_vm_alloc_ram: size 0x20000
haxm_error: spare alloc: mem_limit 0x0, size 0x20000, spare_ram 0x5800000
haxm_error: VM_STATE_FLAGS_MEM_ALLOC: spare_ram 0x5800000
3) After emulator hung
.......hax_vm_create_ui 0
cvcpu 0xf5e5000 vmid 0 vcpu_id 0
minor id 1000before the crate node
setup hax tunnel request for already setup one
haxm_error: hax_vm_alloc_ram: size 0x20000000
haxm_error: !VM_STATE_FLAGS_MEM_ALLOC
haxm_error: Memory allocation, va:123641000, size:20000000
haxm_error: !VM_STATE_FLAGS_MEM_ALLOC: spare_ram 0x5800000
haxm_error: hax_vm_alloc_ram: size 0x20000
haxm_error: spare alloc: mem_limit 0x0, size 0x20000, spare_ram 0x5800000
haxm_error: VM_STATE_FLAGS_MEM_ALLOC: spare_ram 0x5800000
haxm_error: hax_vm_alloc_ram: size 0x20000
haxm_error: spare alloc: mem_limit 0x0, size 0x20000, spare_ram 0x5800000
haxm_error: VM_STATE_FLAGS_MEM_ALLOC: spare_ram 0x5800000
Please excuse me for all these similar logs but I do hope they can help in diagnostics. I didn't find other output facing with freezes.
Am I doing something wrong here? Can I somehow fix/workaround these freezes?
P.S.
$ top
PID COMMAND %CPU TIME #TH #WQ #POR #MREG RPRVT RSHRD RSIZE VPRVT VSIZE PGRP PPID STATE UID FAULTS COW MSGSENT MSGRECV SYSBSD SYSMACH CSW PAGEINS
35308 emulator64-x 99.9 93:35.44 2/1 1 67 114 13M 18M- 179M 297M 3459M 35303 35303 running 503 180922 477 134488 1390 604431027+ 1732 83769+ 7