Mongod status returns core-dump after install - v6 on Ubuntu 22.04

I installed and re-installed three times MongoDB 6.0.3 on Ubuntu 22.04. I enabled and start mongod without a problem. When I run mongosh I get a ECONNREFUSED:

connect ECONNREFUSED 127.0.0.1:27.017

I ran systemctl status mongod and it showed core-dump. The portions of interest that I think are:

Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: core-dump) since Fri 2023-01-06 09:46:02 CST; 21 min ago
Process: 20472 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code-dumped, signal=ILL)

mongod.service: Main process exited, code=dumped, status=4/ILL
mongod.service: Failed with result ‘core-dump’.

On another discussion I found that I should run the following commands:

grep avx /proc/cpuinfo
grep avx2 /proc/cpuinfo

If neither command print anything to the console, my CPU doesn’t support v5 and I should install v4. I’m actually installing v6, not v5, and nothing is returning from these commands. Does that mean my CPU doesn’t support MongoDB v6?

My CPU is a 12th Gen Intel Core i9-12900, 2400 Mhz, 16 Cores and I have 96 GB RAM.

Any help is appreciated.

You get ECONNREFUSED because no server is listening at the given address and port.

You get SIGILL because your CPU is not supported.

This seems recent enough and not a low-cost/low-spec CPU. Indeed intel specifies this support avx2.

Is there any virtualisation involved? There may be setting to change on the hypervisor if there is.

If you are running directly on the hardware it possible that the extension/feature is disabled in the bios/uefi or kernel boot parameters(unlikely, but possible)

2 Likes

I’m running Ubuntu as guest on VirtualBox on a Windows host. On askubuntu.com I found that I should run on the Windows command line (C:\Program Files\oracle\VirtualBox):

VBoxManage setextradata “VMNAME” VBoxInternal/CPUM/IsaExts/AVX2 1

I did that and VirtualBox had both AVX and AVX2 parameters set:

Key: VBoxInternal/CPUM/IaExts/AVX, Value: 1
Key: VBoxInternal/CPUM/IaExts/AVX2, Value: 1

I started Ubuntu, checked, ran “cat /proc/cpuinfo” from the terminal and neither avx and avx2 flags were not listed.

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 pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 movbe popcnt aes rdrand
lahf_lm abm 3dnowprefetch invpcid_single ibrs_enhanced fsgsbase bmi1 bmi2 invpcid rdseed clflushopt md_clear flush_l1d arch_capabilities

I really don’t know what else I should do.

Well, here is where I’ll leave you. Hopefully you can resolve the VitualBox issue or use another Virtualization product if you need to be self hosted.

MongoDB Atlas is available and has a free tier to get you started.

There is a link in @Stennie_X’s reply to a similar issue relating to VirtualBox.

1 Like

Thank you. The link is what I needed. Now I have AVX2 and I also solved another problem I was having with Internet performance. My WIndows host had 1Gbps, but Ubuntu guest had only 30 Mbps. Now I get 900 Mbps on Ubuntu guest.

1 Like