Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal instruction (core dumped) #126

Closed
proxylivy opened this issue Sep 20, 2024 · 2 comments
Closed

Illegal instruction (core dumped) #126

proxylivy opened this issue Sep 20, 2024 · 2 comments

Comments

@proxylivy
Copy link

proxylivy commented Sep 20, 2024

Describe the bug
Getting "Illegal instruccion (core dumped)" when i try to start docker container

To Reproduce
Steps to reproduce the behavior:

  1. Deploy "docker-compose.yaml" in old cpu (x86-64-v1)
  2. See "container logs"

container logs

Container started
Illegal instruction (core dumped)
Illegal instruction (core dumped)
Container stopped
Container stopped
Container started
Illegal instruction (core dumped)
Container stopped

Expected behavior
Run without problems

Desktop:

  • OS: Archlinux
  • CPU: AMD Turion II Neo N40L (1.5Ghz) K625
  • PC: HP Microserver N40L Gen7
  • Docker tag image: latest
  • Docker tag version: 0.4.1-hotfix.2

Additional context

Possible Workarround
Intel CPU can be emulated using intel-sde
Mentioned in the followed bun issue


PD: bun need a cpu with AVX2 support(x86-64-v2), any cpu newer than 2013 fit this. I think is a good idea to take note in documentation. This will help people with older setups.

Edit: (PD2 problem is solved with v0.4.1-hotfix.1)
PD2: I tried in my laptop (x86-64-v3) and can work :D

@goniszewski
Copy link
Owner

Hello @DeathGabox! I guess I'm not great with these "big" releases. Always something that needs fixing right away!

Glad it started to work for you. https://github.com/goniszewski/grimoire/releases/tag/v0.4.1-hotfix.2 provides also some crucial fixes for the initial deploy of the app.

@proxylivy
Copy link
Author

proxylivy commented Sep 22, 2024

Edit: Interesting Info, still reading about this issue...

If i discover something interesting i would re-open this issue

Sunday i am going to make some experiments to see what happens


Original Answer:
I am going to close this issue as solved because is not a problem with grimoire but their integration with bun in old CPU
This maybe can be solved if bun use correct image to build in older system

If you encounter this in deploy, update your CPU to any with support to instruction x86-64-v3 (AVX / AVX2)

To view you cpu instructions
Linux

  1. Use grep avx2 /proc/cpuinfo
    This command extract the flag from "/proc/cpuinfo" in your cpu, if you get blank as output, you dont support avx2

Example: Success

❯ grep avx2 /proc/cpuinfo
flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities

Example: Failed

❯ grep avx2 /proc/cpuinfo
❯ [1]> 
  1. Use /usr/lib/ld-linux-x86-64.so.2 --help
    This command help to see if your libraries are detected

Example: Success

...
output ommited
...
Subdirectories of glibc-hwcaps directories, in priority order:
  x86-64-v4
  x86-64-v3 (supported, searched)
  x86-64-v2 (supported, searched)

Example: Failed

...
output ommited
...
Subdirectories of glibc-hwcaps directories, in priority order:
  x86-64-v4
  x86-64-v3
  x86-64-v2

Windows

  1. You can see your cpu instructions with cpu-z

Thanks goniszewski for this repo and hard work in open source and solve issues, its a awesome tool ^^
Happy Bookmark Everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants