Skip to content

Troubleshooting

Overview

Issues

[SOLVED] Illegal instruction

Context:

Happened when conflict instruction of package dependencies with the current OS.

What error message means is that the execute has some CPU instructions that the CPU that runs it doesn't understand.

Related:

  • Package Dependencies

  • OS system

Current meet:

  • The OS in the deployment OS is Centos7 maybe related to non-updated CPU

  • The upgrade version of polars greater than 0.19.0

  • When execute script has related to polars

python3 component/vendor/quote_trading.py -v
# Illegal Instruction

There are various the same issue but at different of package. E.g:

Checkpoint:

  • [1] Make sure you has the permission of execute script
# For recursive at the deployment folder
chmod R 0777 working-directory/

# Or at the file script level
chmod 0777 working-directory/component/vendor/filename.py
  • [2] Define your area of error by run line-by-line of the script from the top-to-bottom in the interactive mode.

  • [3] Then check at the version related level

# Syntax:
# $ python -vc "import <packge>"
python -vc "import polars as pl"
  • [4] Check your OS CPU
lscpu
# Architecture:          x86_64
# CPU op-mode(s):        32-bit, 64-bit
# Byte Order:            Little Endian
# CPU(s):                16
# On-line CPU(s) list:   0-15
# Thread(s) per core:    1
# Core(s) per socket:    1
# Socket(s):             16
# NUMA node(s):          2
# Vendor ID:             GenuineIntel
# CPU family:            6
# Model:                 45
# Model name:            Intel(R) Xeon(R) CPU E5-2665 0 @ 2.40GHz
# Stepping:              7
# CPU MHz:               2400.000
# BogoMIPS:              4800.00
# Hypervisor vendor:     VMware
# Virtualization type:   full
# L1d cache:             32K
# L1i cache:             32K
# L2 cache:              256K
# L3 cache:              20480K
# NUMA node0 CPU(s):     0-7
# NUMA node1 CPU(s):     8-15
# Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm ssbd ibrs ibpb stibp tsc_adjust arat spec_ctrl intel_stibp flush_l1d arch_capabilities
  • [5] Find the related model that suitable for that OS.

In this case, download polars-lts-cpu instead, follow the comment Polars Issues #2922

requirement.txt
polars-lts-cpu==0.19.8

Other reference:

[SOLVED] Check version of a target package

Detect exist in requirement

cat requirements.txt | grep polars
# 0.19.5

Check in the background versions

python3 -c "import polars; print(polars.__version__)"
# 0.19.5