OlafenwaMoses / ImageAI

A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
https://www.genxr.co/#products
MIT License
8.6k stars 2.19k forks source link

Illegal instruction (core dumped) #623

Open sumonst21 opened 3 years ago

sumonst21 commented 3 years ago

I followed all the instruction but getting message: Illegal instruction (core dumped)

OlafenwaMoses commented 3 years ago

Can you post the code you ran and the full log of the error?

7c commented 3 years ago

code i run single line:

from imageai.Detection import ObjectDetection

memory:

              total        used        free      shared  buff/cache   available
Mem:           1.9G        438M        294M        844K        1.2G        1.3G
Swap:          9.0G         96M        8.9G

ltrace:

memcpy(0x7f6929ebee88, "/usr/lib/python3/dist-packages/a"..., 70)                                                                          = 0x7f6929ebee88
strlen("/usr/lib/python3/dist-packages/a"...)                                                                                              = 70
strlen("/usr/lib/python3/dist-packages/a"...)                                                                                              = 70
__xstat64(1, "/usr/lib/python3/dist-packages/a"..., 0x7ffd01fd0d50)                                                                        = 0
memset(0x7f692b405510, '\0', 152)                                                                                                          = 0x7f692b405510
memset(0x7f6929ecde30, '\0', 12)                                                                                                           = 0x7f6929ecde30
memset(0x7f6929ecde30, '\0', 12)                                                                                                           = 0x7f6929ecde30
memset(0x7f6929ecde30, '\0', 12)                                                                                                           = 0x7f6929ecde30
memset(0x7f6929e6fb60, '\0', 16)                                                                                                           = 0x7f6929e6fb60
memset(0x7f6929e75080, '\0', 32)                                                                                                           = 0x7f6929e75080
memcpy(0x7ffd01fd1078, "\370=\346)i\177\0\0X5\354)i\177\0\0", 16)                                                                          = 0x7ffd01fd1078
memset(0x7f6929ecda58, '\0', 40)                                                                                                           = 0x7f6929ecda58
memset(0x7f6929e6fb60, '\0', 16)                                                                                                           = 0x7f6929e6fb60
memset(0x7f6929e75400, '\0', 32)                                                                                                           = 0x7f6929e75400
memcpy(0x7ffd01fd0d58, "\370=\346)i\177\0\0\200P\347)i\177\0\0", 16)                                                                       = 0x7ffd01fd0d58
memset(0x7f6929e6fd60, '\0', 16)                                                                                                           = 0x7f6929e6fd60
memset(0x7f6929e65a80, '\0', 80)                                                                                                           = 0x7f6929e65a80
memset(0x7f6929e74060, '\0', 24)                                                                                                           = 0x7f6929e74060
memcpy(0x7ffd01fd1bb8, "\200C\235\0\0\0\0\0\200C\235\0\0\0\0\0\200C\235\0\0\0\0\0", 24)                                                    = 0x7ffd01fd1bb8
pthread_self(0x7f692b5874f8, 0, 0, 0)                                                                                                      = 0x7f692b5d4740
sem_post(0x28872a0, 0, 0x7f692b5d4740, 0)                                                                                                  = 0
memset(0x7f6929e6fb60, '\0', 16)                                                                                                           = 0x7f6929e6fb60
memset(0x7f6929e6fb60, '\0', 16)                                                                                                           = 0x7f6929e6fb60
memset(0x7f692b3f1370, '\0', 8)                                                                                                            = 0x7f692b3f1370
strlen("name")                                                                                                                             = 4
memcpy(0x7f692b461840, "name", 4)                                                                                                          = 0x7f692b461840
memcmp(0x7f692b5d2bc0, 0x7f692b461840, 4, 8191)                                                                                            = 0
strlen("origin")                                                                                                                           = 6
memcpy(0x7f692b461840, "origin", 6)                                                                                                        = 0x7f692b461840
memcmp(0x7f692b573d80, 0x7f692b461840, 6, 8191)                                                                                            = 0
memset(0x7f6929e6fb60, '\0', 16)                                                                                                           = 0x7f6929e6fb60
strlen("name")                                                                                                                             = 4
memcpy(0x7f692b461840, "name", 4)                                                                                                          = 0x7f692b461840
memcmp(0x7f692b5d2bc0, 0x7f692b461840, 4, 8191)                                                                                            = 0
memcpy(0x7f6929ecde10, "apt_pkg", 7)                                                                                                       = 0x7f6929ecde10
memset(0x7f6929e6fb60, '\0', 16)                                                                                                           = 0x7f6929e6fb60
memchr("apt_pkg", '-', 7)                                                                                                                  = 0
strlen("origin")                                                                                                                           = 6
memcpy(0x7f692b461840, "origin", 6)                                                                                                        = 0x7f692b461840
memcmp(0x7f692b573d80, 0x7f692b461840, 6, 8191)                                                                                            = 0
memcpy(0x7f6929ebee88, "/usr/lib/python3/dist-packages/a"..., 70)                                                                          = 0x7f6929ebee88
strchr("/usr/lib/python3/dist-packages/a"..., '/')                                                                                         = "/usr/lib/python3/dist-packages/a"...
__vsnprintf_chk(0x7ffd01fd1500, 258, 1, -1)                                                                                                = 14
dlopen("/usr/lib/python3/dist-packages/a"..., 2 <unfinished ...>
free(0)                                                                                                                                    = <void>
free(0)                                                                                                                                    = <void>
free(0)                                                                                                                                    = <void>
free(0)                                                                                                                                    = <void>
free(0)                                                                                                                                    = <void>
free(0)                                                                                                                                    = <void>
free(0)                                                                                                                                    = <void>
free(0)                                                                                                                                    = <void>
free(0)                                                                                                                                    = <void>
free(0)                                                                                                                                    = <void>
free(0)                                                                                                                                    = <void>
free(0)                                                                                                                                    = <void>
free(0)                                                                                                                                    = <void>
python3: Relink `/lib/x86_64-linux-gnu/libsystemd.so.0' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime'
python3: Relink `/lib/x86_64-linux-gnu/libudev.so.1' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime'
free(0x295ea60)                                                                                                                            = <void>
free(0x2949b10)                                                                                                                            = <void>
malloc(37)                                                                                                                                 = 0x28c3750
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

packages:

Package                Version
---------------------- -------------------
absl-py                0.11.0
acme                   0.31.0
asn1crypto             0.24.0
astor                  0.8.1
astunparse             1.6.3
attrs                  17.4.0
Automat                0.6.0
blinker                1.4
cached-property        1.5.2
cachetools             4.2.0
certbot                0.27.0
certifi                2020.12.5
chardet                3.0.4
click                  6.7
cloud-init             20.4
colorama               0.3.7
command-not-found      0.3
ConfigArgParse         0.11.0
configobj              5.0.6
constantly             15.1.0
cryptography           2.1.4
cycler                 0.10.0
distro-info            0.18ubuntu0.18.04.1
flatbuffers            1.12
future                 0.15.2
gast                   0.3.3
google-auth            1.24.0
google-auth-oauthlib   0.4.2
google-pasta           0.2.0
grpcio                 1.32.0
h5py                   2.10.0
hibagent               1.0.1
httplib2               0.9.2
hyperlink              17.3.1
idna                   2.6
imageai                2.1.6
importlib-metadata     3.4.0
incremental            16.10.1
Jinja2                 2.10
josepy                 1.1.0
jsonpatch              1.16
jsonpointer            1.10
jsonschema             2.6.0
Keras                  2.4.3
Keras-Applications     1.0.8
Keras-Preprocessing    1.1.2
keras-resnet           0.2.0
keyring                10.6.0
keyrings.alt           3.0
kiwisolver             1.3.1
language-selector      0.1
Markdown               3.3.3
MarkupSafe             1.0
matplotlib             3.3.2
mock                   2.0.0
netifaces              0.10.4
numpy                  1.19.3
oauthlib               3.1.0
opencv-python          4.5.1.48
opt-einsum             3.3.0
PAM                    0.4.2
parsedatetime          2.4
pbr                    3.1.1
Pillow                 7.0.0
pip                    20.3.3
protobuf               3.14.0
pyasn1                 0.4.2
pyasn1-modules         0.2.1
pycrypto               2.6.1
pygobject              3.26.1
PyJWT                  1.5.3
pyOpenSSL              17.5.0
pyparsing              2.4.7
pyRFC3339              1.0
pyserial               3.4
python-apt             1.6.5+ubuntu0.5
python-dateutil        2.8.1
python-debian          0.1.32
pytz                   2018.3
pyxdg                  0.25
PyYAML                 3.12
requests               2.25.1
requests-oauthlib      1.3.0
requests-toolbelt      0.8.0
requests-unixsocket    0.1.5
rsa                    4.7
scipy                  1.4.1
SecretStorage          2.3.1
service-identity       16.0.0
setuptools             51.3.3
six                    1.15.0
ssh-import-id          5.7
systemd-python         234
tensorboard            2.4.1
tensorboard-plugin-wit 1.8.0
tensorflow             2.4.0
tensorflow-estimator   2.4.0
termcolor              1.1.0
Twisted                17.9.0
typing-extensions      3.7.4.3
ufw                    0.36
unattended-upgrades    0.1
urllib3                1.22
Werkzeug               1.0.1
wheel                  0.36.2
wrapt                  1.12.1
zipp                   3.4.0
zope.component         4.3.0
zope.event             4.2.0
zope.hookable          4.0.4
zope.interface         4.3.2

Python 3.6.9 pip 20.3.3 Ubuntu 18.04.5 LTS

same issues applies to another ubuntu server too.

jrbastien commented 3 years ago

I had illegal instructions errors before when trying to run Tensorflow 2.x with an old cpu not support AVX2 instructions. If that is it the case, you will need to compile Tensorflow yourself to resolve the problem.

You can easily verify that your installation of Tensorflow works by running this:

python3 -c 'import tensorflow as tf; print(tf.version)'

If it returns the version number, it is fine. If not, you will get an illegal operations error.