streamlit: Illegal Instruction in streamlit versions newer than 0.84.2

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

On my system hardware any attempt to run streamlit newer than 0.84.2 results in “Illegal instruction”, even when just running streamlit --version

Reproducible Code Example

No code needed, fails with streamlit hello or even streamlit --version

Steps To Reproduce

Install streamlit 0.85 or newer on older hardware and run streamlit --version or streamlit hello

Expected Behavior

Streamlit is the only application I can not run. I have compiled and installed current versions of the Apache web server, Python 3.11, OpenSSL 1.1.1s, and other modern applications successfully.

Current Behavior

Any attempt to run streamlit newer than 0.84.2 produces an “Illegal instruction”.

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 0.85.0 or newer
  • Python version: 3.9.16 and 3.11
  • Operating System: OpenSuSE Linux
  • Browser: N/A, all
  • Virtual environment: N/A

Additional Information

CPU info: vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel® Xeon® CPU 5160 @ 3.00GHz stepping : 6 microcode : 0xd2 cpu MHz : 3000.116 cache size : 4096 KB 4 CPUs with 2 cores each

Linux static1 3.16.7-48-desktop #1 SMP PREEMPT Wed Oct 26 18:09:22 UTC 2016 (8c027f6) x86_64 GNU/Linux

glibc-2.18-4.44.1.x86_64

gcc version 7.1.1 20170607 [gcc-7-branch revision 248970] (SUSE Linux)

Are you willing to submit a PR?

  • Yes, I am willing to submit a PR!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 30

Most upvoted comments

@kajarenc just chiming in here from arrow to clarify. The problem is that arrow requires the popcnt instruction which was introduced ~2008. It seems some CPUs without this are still in use which then run into the Illegal Instruction exception. The possible fix is tracked here https://github.com/apache/arrow/issues/23013

On Tue, July 2, 2024 11:38 am, rvschaffer wrote:

Hey @abcbarryn , thanks for the help! I’ll give this another shot and try to build a venv similar to yours. Which python version are you using? 3.10?

Python 3.9.16 The wheel files I built are also for 3.9, maybe that’s why the prebuilt wheel wouldn’t load for you.

PS: rvschaffer You ONLY spent two days on this? 😃 I have spent a LOT more on this rabbit hole.

I remember an issue I also had with Numpy. I am using version 1.23.5. I think I ran into a conflict when I tried to run a newer version. What version of streamlit are you trying to use? I am running 1.19.0.

Here is my python module version list:

Package                       Version
----------------------------- -----------
aiohttp                       3.8.4
aiosignal                     1.3.1
alabaster                     0.7.13
altair                        4.2.2
anyio                         3.6.2
appdirs                       1.4.4
astor                         0.8.1
asttokens                     2.2.1
async-timeout                 4.0.2
asyncer                       0.0.2
attrs                         22.2.0
auditwheel                    0.0.0
Babel                         2.11.0
backcall                      0.2.0
base58                        2.1.1
bleach                        6.0.0
blinker                       1.7.0
boto3                         1.26.60
botocore                      1.29.60
bottle                        0.12.25
cachetools                    5.3.0
certifi                       2022.12.7
cffi                          1.15.1
charset-normalizer            3.0.1
chart-studio                  1.1.0
click                         8.1.3
colorama                      0.4.6
coloredlogs                   15.0.1
comm                          0.1.2
contourpy                     1.0.7
cryptography                  39.0.1
cycler                        0.11.0
Cython                        0.29.33
debugpy                       1.6.6
decorator                     5.1.1
docopt                        0.6.2
docutils                      0.19
entrypoints                   0.4
enum-compat                   0.0.3
executing                     1.2.0
fastapi                       0.87.0
filetype                      1.2.0
Flask                         3.0.0
flatbuffers                   23.1.21
fonttools                     4.39.0
freegames                     2.5.3
frozenlist                    1.3.3
gitdb                         4.0.10
GitPython                     3.1.31
graphics.py                   5.0.1.post1
greenlet                      2.0.2
grip                          4.6.2
h11                           0.14.0
htmlmin                       0.1.12
humanfriendly                 10.0
idna                          3.4
ImageHash                     4.3.1
imageio                       2.25.1
imagesize                     1.4.1
importlib-metadata            6.0.0
importlib-resources           5.12.0
ipykernel                     6.21.0
ipython                       8.9.0
ipywidgets                    8.0.4
itsdangerous                  2.1.2
jaraco.classes                3.2.3
jedi                          0.18.2
jeepney                       0.8.0
Jinja2                        3.1.2
jmespath                      1.0.1
joblib                        1.2.0
jsonschema                    4.17.3
jupyter_client                8.0.2
jupyter_core                  5.2.0
jupyterlab-widgets            3.0.5
keyring                       23.13.1
kiwisolver                    1.4.4
llvmlite                      0.39.1
Markdown                      3.5.1
Markdown-Editor               1.0.7
markdown-it-py                2.2.0
MarkupSafe                    2.1.2
matplotlib                    3.6.3
matplotlib-inline             0.1.6
mdurl                         0.1.2
meson                         0.54.2
more-itertools                9.0.0
mpmath                        1.2.1
multidict                     6.0.4
multimethod                   1.9.1
mysql-connector-python        8.0.32
netsnmp-python                1.0a1
networkx                      3.0
ninja                         1.11.1
numba                         0.56.4
numpy                         1.23.5
oauthlib                      3.2.2
onnxruntime                   1.13.1
opencv-python                 4.7.0.68
opencv-python-headless        4.6.0.66
packaging                     23.0
pandas                        1.5.3
parso                         0.8.3
path-and-address              2.0.1
patsy                         0.5.3
pexpect                       4.8.0
phik                          0.12.3
pickleshare                   0.7.5
Pillow                        9.3.0
pip                           23.3.1
pkginfo                       1.9.6
platformdirs                  2.6.2
plotly                        5.13.1
ply                           3.11
pooch                         1.6.0
prompt-toolkit                3.0.36
protobuf                      3.20.3
psutil                        5.9.4
psycopg2                      2.9.5
psycopg2-binary               2.9.5
ptyprocess                    0.7.0
pure-eval                     0.2.2
pyarrow                       9.0.0
pycairo                       1.23.0
pycparser                     2.21
pydantic                      1.10.5
pydeck                        0.8.0
pyelftools                    0.29
pygame                        2.3.0
Pygments                      2.14.0
PyMatting                     1.1.8
pymdown-extensions            7.1
Pympler                       1.0.1
PyMySQL                       1.0.2
pyodbc                        4.0.35
pyparsing                     3.0.9
pyrsistent                    0.19.3
python-dateutil               2.8.2
python-decouple               3.7
python-multipart              0.0.5
pytz                          2022.7.1
pytz-deprecation-shim         0.1.0.post0
PyWavelets                    1.4.1
PyYAML                        6.0
pyzmq                         25.0.0
readline                      6.2.4.1
readme-renderer               37.3
rembg                         2.0.30
requests                      2.28.2
requests-oauthlib             1.3.1
requests-toolbelt             0.10.1
retrying                      1.3.4
rfc3986                       2.0.0
rich                          13.3.1
s3transfer                    0.6.0
scikit-image                  0.19.3
scipy                         1.9.3
SecretStorage                 3.3.3
semver                        2.13.0
setuptools                    67.0.0
six                           1.16.0
smmap                         5.0.0
sniffio                       1.3.0
snowballstemmer               2.2.0
Sphinx                        6.1.3
sphinxcontrib-applehelp       1.0.4
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.1
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
SQLAlchemy                    2.0.6
stack-data                    0.6.2
starlette                     0.21.0
statsmodels                   0.13.5
streamlit                     1.19.0
sympy                         1.11.1
tangled-up-in-unicode         0.2.0
tenacity                      8.2.2
threadpoolctl                 3.1.0
tifffile                      2023.2.3
tk                            0.1.0
toml                          0.10.2
toolz                         0.12.0
tornado                       6.2
tqdm                          4.64.1
traitlets                     5.9.0
tweepy                        4.13.0
twine                         4.0.2
typeguard                     2.13.3
typing_extensions             4.5.0
tzdata                        2022.7
tzlocal                       4.2
urllib3                       1.26.14
uvicorn                       0.20.0
validators                    0.20.0
visions                       0.7.5
watchdog                      2.1.9
wcwidth                       0.2.6
webencodings                  0.5.1
Werkzeug                      3.0.1
wheel                         0.38.4
widgetsnbextension            4.0.5
yarl                          1.8.2
ydata-profiling               4.1.0
zipp                          3.14.0

My source SHOULD have shell scripts that help automate the build with the settings I used. It’s been a while…

I got Arrow 9 to build on my system a while ago after managing to update my GCC to 11.2.1. Boy was THAT a pain, I had to update a TON on other packages. Here is the link to the Pyarrow 9.0.0 source and wheel files. https://star2.abcm.com/download/pyarrow-9.0.0/