AVX on VirtualBox Linux Guest is missing
During the installation of Splunk on a Linux guest I encountered an error where mongod was not able to start. But first an overview of the environment:
- Host OS: Windows 10 Build 19045
- Host CPU: Intel Core i7-6700
- Virtualization software: Oracle VirtualBox 7.1.4
- Guest OS: Red Hat Enterprise Linux 8.1
After the startup of Splunk I could see the following error messages in the splunk logfile:
12-29-2024 17:35:04.217 +0100 ERROR SidecarThread [33800 MainThread] - reading standard input
12-29-2024 17:35:04.219 +0100 ERROR SidecarThread [33800 MainThread] - 2024/12/29 17:35:04 Supervisor logs printed at : /opt/splunk/var/log/splunk
12-29-2024 17:35:04.369 +0100 ERROR MongodRunner [34134 MongodLogThread] - mongod exited abnormally (exit code 4, status: PID 34135 killed by signal 4: Illegal instruction) - look at mongod.log to investigate.
12-29-2024 17:35:04.369 +0100 ERROR KVStoreBulletinBoardManager [34134 MongodLogThread] - KV Store process terminated abnormally (exit code 4, status PID 34135 killed by signal 4: Illegal instruction). See mongod.log and splunkd.log for details.
12-29-2024 17:35:04.369 +0100 WARN KVStoreConfigurationProvider [34134 MongodLogThread] - Action scheduled, but event loop is not ready yet
12-29-2024 17:35:04.369 +0100 ERROR KVStoreBulletinBoardManager [34134 MongodLogThread] - KV Store changed status to failed. KVStore process terminated..
The important bit is:
mongod exited abnormally (exit code 4, status: PID 34135 killed by signal 4: Illegal instruction)
Also starting mongod as root failed (core dumped). After some investigation it looked like the linux guest was missing AVX (can be checked by looking at the flags under cat /proc/cpuinfo) which is needed by mongod.
The solution was to disable Hyper-V as described here:
- in Windows start a Command Prompt with Administrator privileges
- Disable Hypervisor Launch:
bcdedit /set hypervisorlaunchtype off
- Disable Microsoft Hyper-V:
DISM /Online /Disable-Feature:Microsoft-Hyper-V
The last point required a reboot of Windows. After restarting Windows and the Linux guest AVX was available and mongod started successfully:
[root@lin ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 94
model name : Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
stepping : 3
cpu MHz : 3407.996
cache size : 8192 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 avx2 bmi2 invpcid rdseed adx clflushopt arat md_clear flush_l1d arch_capabilities
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds mmio_stale_data retbleed gds bhi
bogomips : 6815.99
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
[root@lin ~]# /opt/splunk/bin/mongod --version
db version v7.0.14
Build Info: {
"version": "7.0.14",
"gitVersion": "ce59cfc6a3c5e5c067dca0d30697edd68d4f5188",
"openSSLVersion": "OpenSSL 1.0.1e-fips 11 Feb 2013",
"modules": [
"enterprise"
],
"allocator": "tcmalloc",
"environment": {
"distmod": "rhel70",
"distarch": "x86_64",
"target_arch": "x86_64"
}
}
[root@lin ~]#
Leave a Reply