Skip to content

[Bug]: Bus error in font_manager when using Matplotlib on GitHub's new free tier of hosted Apple Silicon runners for GitHub Actions #27724

Closed
@lpsinger

Description

@lpsinger

Bug summary

I am encountering a bus error in addfont when I am running unit tests for a package that uses matplotlib (healpy) under cibuildwheel on GitHub's new free Apple Silicon runners. I don't have a straightforward way of reproducing this outside of GitHub Actions.

Code for reproduction

See healpy/healpy#896

Actual outcome

Font loading fails without crashing.

Expected outcome

The most relevant part of the log output (https://github.com/healpy/healpy/actions/runs/7721358991/job/21047787718?pr=896) is:

Fatal Python error: Bus error
  Thread 0x000000016ea4f000 (most recent call first):
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 316 in wait
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 581 in wait
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 1304 in run
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 980 in _bootstrap_inner
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 937 in _bootstrap
  Current thread 0x00000001e4229000 (most recent call first):
    File "/private/var/folders/1k/qq3pcbf12vb6vyblh81736p40000gn/T/cibw-run-krc4imxq/cp39-macosx_arm64/venv-test/lib/python3.9/site-packages/matplotlib/font_manager.py", line 1076 in addfont
    File "/private/var/folders/1k/qq3pcbf12vb6vyblh81736p40000gn/T/cibw-run-krc4imxq/cp39-macosx_arm64/venv-test/lib/python3.9/site-packages/matplotlib/font_manager.py", line 1043 in __init__
    File "/private/var/folders/1k/qq3pcbf12vb6vyblh81736p40000gn/T/cibw-run-krc4imxq/cp39-macosx_arm64/venv-test/lib/python3.9/site-packages/matplotlib/font_manager.py", line 1576 in _load_fontmanager
    File "/private/var/folders/1k/qq3pcbf12vb6vyblh81736p40000gn/T/cibw-run-krc4imxq/cp39-macosx_arm64/venv-test/lib/python3.9/site-packages/matplotlib/font_manager.py", line 1582 in <module>

Additional information

No response

Operating system

macOS

Matplotlib Version

3.8.2

Matplotlib Backend

No response

Python version

3.9

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions