Apple Silicon crash when Kaleido is launched with `--disable-gpu` (macOS 15.4.1, M4 Max)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
調査の方向性
plotly_kaleido/src/lib.rs のフラグ構築から始め、提供された spec.json を使用して、報告された Kaleido 0.2.1 コマンドを macOS arm64 で再現します。--disable-gpu の有無でレンダリングを比較します。デフォルトのフラグセットで Apple Silicon 上のレンダリングが成功するか、正常に失敗すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Image generation fails on Apple Silicon when Kaleido is started with --disable-gpu (macOS 15.4.1, M4 Max)
Summary
Running the standalone Kaleido v0.2.1 binary on macOS 15.4.1 (Sequoia) with an Apple M4 Max fails to produce any image whenever the --disable-gpu flag is present (the default set that Plotly‑rs passes).
Kaleido returns error 525 ("error creating static canvas/context for image server") instead of the expected base64 payload.
Removing only that flag makes rendering work again.
Environment
| item | version / value |
|---|---|
| Kaleido binary | 0.2.1 (wheel installed via pip install kaleido) |
| macOS | 15.4.1 (23E214) |
| Chip | Apple M4 Max (arm64) |
| Python | 3.12.3 |
| Rust (for the original call) | 1.86.0 |
| Calling app | plotly‑rs 0.12 (plot.write_image) |
Reproduction steps
-
Save this Plotly spec to
spec.json:{"format":"png","width":800,"height":600,"scale":1.0,"data":{"config":{},"data":[{"name":"Surface","type":"surface","x":[1.0,2.0,3.0],"y":[4.0,5.0,6.0],"z":[[1.0,2.0,3.0],[4.0,5.0,6.0],[7.0,8.0,9.0]]}],"layout":{}}} -
Run Kaleido with the default flag set (notice
--disable-gpu):
cat spec.json | ./kaleido plotly \
--disable-gpu \
--allow-file-access-from-files \
--disable-breakpad \
--disable-dev-shm-usage \
--disable-software-rasterizer \
--single-process \
--no-sandbox \
> out.b64
Output:
[WARNING:resource_bundle.cc(431)] locale_file_path.empty() for locale en-US
{"code": 0, "message": "Success", "result": null, "version": "0.2.1"}
{"code":525,"message":"error creating static canvas/context for image server","pdfBgColor":null,"format":"png","result":null,"width":800,"height":600,"scale":1}
No image data is returned (result is null).
- Run again, this time without
--disable-gpu:
cat spec.json | ./kaleido plotly \
--allow-file-access-from-files \
--disable-breakpad \
--disable-dev-shm-usage \
--disable-software-rasterizer \
--single-process \
--no-sandbox \
> out.b64
jq -r '.result' out.b64 | base64 -d > out.png # PNG decodes correctly
Kaleido exits cleanly:
{"code": 0, "message": "Success", "result": null, "version": "0.2.1"}
Expected behaviour
Kaleido should render the plot (or at least fail gracefully) even when --disable-gpu is passed, matching behaviour on Intel Macs and Linux builds.
Actual behaviour
- With
--disable-gpu: Kaleido returns code 525 and no image. - Without
--disable-gpu: Kaleido returns the expected base64 PNG.
Notes & hypothesis
- Apple Silicon’s ANGLE‑Metal backend initialises fine; disabling the GPU appears to remove both hardware and software rasterisers, so Chrome cannot create the canvas.
- The flag combo is hard‑coded in plotly‑rs (
plotly_kaleido/src/lib.rs). Removing it there is an effective workaround. - The universal2 wheel of kaleido 1.0.0‑rc11 (Chromium 120) does not reproduce the issue, but Plotly‑rs has not migrated yet.
Workarounds
# simple wrapper to strip the flag
#!/usr/bin/env bash
exec /path/to/kaleido "${@/--disable-gpu/}"
or build/run Kaleido without passing the flag on macOS‑arm64.
Happy to provide additional logs or test patches.
— Joaquín
- 主要言語
- Python
- スター
- 504
- フォーク
- 65
- 平均マージ
- 6日 9時間
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
plotly/kaleido のほかの issue
-
Writing to an existing directory whose name has a dot fails with "Invalid format"対応中かも @RaphaelFakhri が 12 日前に担当しました。 オープンbug P3 size: 1
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
-
Deterministic Rendering Challenges再び着手できるかも @camdecoster が 67 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement feature P2 size: 5
-
[FEATURE]: Embed custom fonts into vector exports (no system install)対応中かも @camdecoster が 124 日前に担当しました。 オープンenhancement P3 size: 3
-
enhancement feature P3 size: 5
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
GlobalKaleidoServer is not thread-safe対応中かも @talleibman が 249 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
似ている issue
-
DBFS append mode silently overwrites existing files対応中かも @IlyaKhalafi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
fsspec/filesystem_spec#2429 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: Retrieval rerank fallback statistics stay zero after provider failure対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
volcengine/OpenViking#7014 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
fedora-copr/copr#4600 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ansys/pydpf-core#3620 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信