[SERVER-59482] Illegal instruction on Debian 11 Created: 20/Aug/21 Updated: 27/Oct/23 Resolved: 24/Aug/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 5.0.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Koichi MATSUMOTO | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
OS: Debian 11.0 (bullseye) gcc (Debian 10.2.1-6) 10.2.1 20210110 Python 3.9.6 |
||
| Issue Links: |
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: |
|
||||||||||||
| Sprint: | Dev Platform 2021-08-23, Dev Platform 2021-09-06 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
I tried to build mongod on master branch, but mongod crashed at starting. Mongod only prints Illegal instruction.
Could anyone tell me what’s wrong?
|
| Comments |
| Comment by Andrew Morrow (Inactive) [ 24/Aug/21 ] |
|
koichi@matsumoto.me - Glad to hear that worked for you. I'm going to close out this ticket. |
| Comment by Koichi MATSUMOTO [ 24/Aug/21 ] |
|
I built mongodb with `CCFLAGS=-march=westmere` then mongod started successfully. Thanks! |
| Comment by Andrew Morrow (Inactive) [ 23/Aug/21 ] |
|
zone@phantasea.net - Thanks for trying that out, and I'm glad it resolved your issue. Thanks as well for confirming back to us - we will make some documentation changes to highlight the need to disable hyper-v when using VirtualBox on Windows. |
| Comment by Dustin Brockert [ 23/Aug/21 ] |
|
As soon as I turned off my Hyper-V service (Hyper-V Host Compute Service) then the mongo and mongod functioned as expected. Thanks! |
| Comment by Andrew Morrow (Inactive) [ 23/Aug/21 ] |
|
As of v5.0, prebuilt MongoDB binaries require a processor that supports AVX instructions (for more details, see https://docs.mongodb.com/manual/administration/production-notes/#x86_64). If you are building from source, you can downgrade this requirement by adding CCFLAGS=-march=<target> to your SCons invocation, where <target> is your desired target microarchitecture as defined by https://gcc.gnu.org/onlinedocs/gcc-8.5.0/gcc/x86-Options.html#x86-Options. If you are sticking with the prebuilt v5.0 binaries, it is important to ensure that both your physical hardware offers AVX instructions, and that any virtualization solution that is in play exposes that support for AVX to the guest.
|
| Comment by Dustin Brockert [ 21/Aug/21 ] |
|
Running into the same issue with Ubuntu 20.04 with both the premade binaries and compiling like above. It is running under a virtual machine in VirtualBox for reference. Also works with the latest 4.4 release. CPU Info: |