linux-noah / noah

Bash on Ubuntu on macOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash on launch

yobson opened this issue · comments

Whenever noah tries to do anything other than display the help and version text, it crashes:

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000010
Exception Note: EXC_CORPSE_NOTIFY

@yobson

Hi, thank you for your reporting the issue.
Could you tell us your testing environment (and how you built the binary)?

Sure. I'm using an iMac late 2007 (core duo, 4gb ram etc). I built using the brew. I have XCode installed along with QT so it could have used GCC or clang (i could find out if you want). No VMs or anything. Any other info you need?

I should add, El Capitan

Could you paste the result of sysctl -a | grep machdep.cpu?
I'm not sure if your machine supports hardware virtualization, which is necessary to run noah.

P.S. sysctl -a | grep machdep.cpu.features seems suffice.

I think sysctl kern.hv_support is exactly what is needed.
Apple Hypervisor Framework, which we are using for Noah, needs EPT support accroding to Apple (https://developer.apple.com/reference/hypervisor). Core Duo does not seem to support it, so cash may be caused by that. It seems that it's better to implement some environment check.

$ sysctl -a | grep machdep.cpu.features
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 DTES64 MON DSCPL VMX EST TM2 SSSE3 CX16 TPR PDCM

Uh, we are sorry, it turned out that it does not provide enough information. Could you try sysctl kern.hv_support instead?

kern.hv_support: 0

I see.. OK, it seems that your Mac does not meet the hardware requirements for Apple Hypervisor Framework and Noah. The result should be 1 if the hardware requirements are satisfied. We will add some hardware requirements check later..
Thank you for your reporting and taking an interest in Noah, please try with newer Mac if possible!

Do you happen to know which processors to avoid? There is no way I will be able to get a new mac!

Oh, that's too bad.. According to Apple Hypervisor Framework reference(https://developer.apple.com/reference/hypervisor), it needs VT-x, EPT, and Unrestricted Mode support. I don't know well about the details of Intel CPU, but Wikipedia says Westmere is the oldest CPU that supports those features. Westmere is released in 2010, so I think you can choose CPU released in after 2010.