Skip to content

Apple M4 Pro: Unit tests fail with Fatal Python error: Illegal instruction #561

Description

@dmitriyrepin

To reproduce, build the docked file shown below on Mac (Apple M4 Pro Sequoia 15.5) and PC

  • On PC the tests succeed
  • On Mack they die with the following error message:

tests/integration/test_numpy_ingest.py ..... [ 3%]
tests/integration/test_segy_import_export.py Fatal Python error: Illegal instruction

Thread 0x0000ffff46fdf180 (most recent call first):
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 90 in _worker
File "/usr/local/lib/python3.13/threading.py", line 994 in run
File "/usr/local/lib/python3.13/threading.py", line 1043 in _bootstrap_inner
File "/usr/local/lib/python3.13/threading.py", line 1014 in _bootstrap

NOTE: The mdio CLI works in a container on Mac.

# HOW TO BUILD AND RUN THIS DOCKERFILE
#    docker build -t mdio-nox2 -f .devcontainer/Dockerfile.nox2 . 
#    docker run -it --rm mdio-nox2 --list
#    docker run -it --rm mdio-nox2 -s tests-3.13
#
FROM python:"3.13"-"bookworm"
RUN groupadd --gid 1000 python && useradd --uid 1000 --gid 1000 -m python 
USER python

# Add path to the user-installed packages
ENV PYTHONUSERBASE=/home/python/.localvs
ENV PATH="$PYTHONUSERBASE/bin:$PATH"

COPY --chown=python:python ./ /home/python/mdio-pytho

WORKDIR /home/python/mdio-python
RUN pip install .

# Install UV dependency manager and Nox test automator
RUN python3 -m pip install uv=="0.6.11" nox=="2025.2.9"

ENTRYPOINT ["nox"]
CMD ["--list"]

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

dependenciesPull requests that update a dependency file

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions