Skip to content

python_snapshot=true SIGBUSes when $PIE_HOME/py-runtime/ is absent #359

Description

@shsym

TL;DR. Hi! While putting together a slim Docker variant we noticed that when [server].python_snapshot = true and $PIE_HOME/py-runtime/ doesn't exist, pie serve crashes with SIGBUS (container exit 135) right after the driver logs aux IPC listening on .... Would be great to either surface a friendly error or fall back gracefully — sharing the repro in case it's quick to address.

Repro

  1. Run pie serve in an environment where $PIE_HOME/py-runtime/ is missing (e.g. a slim runtime image that doesn't copy the pie config init-populated directory across stages).
  2. Config has [server].python_snapshot = true (the pie config init default).
  3. Hit pie serve with any inferlet → engine dies a few seconds after model load, no model output ever reaches the client.

Observed

[pie-driver-portable] loaded qwen3 ...
[pie-driver-portable] forward engine ready (total_pages=256, ...)
[pie-driver-portable] aux IPC listening on /root/.cache/pie/standalone/1/g0/aux.sock
<process exits 135 — SIGBUS, no error in logs>

No log line surfaces the snapshot-related cause; we had to bisect by toggling python_snapshot to find it.

Workaround

Setting python_snapshot = false in the config makes pie serve happy again, at the cost of losing the snapshot optimization for Python inferlets.

Suggested fix (non-prescriptive)

When loading the snapshot path, stat the file first; if absent either (a) auto-disable snapshot with a tracing::warn! line, or (b) bail with bail!("python_snapshot=true but {path:?} not found; run \pie config init` or set python_snapshot=false")`. Either would have saved a couple hours here.

Environment

  • pie 0.3.0 (commit on main)
  • portable driver (default Cargo features), Qwen3-0.6B
  • Linux x86_64 inside Docker (Colima/aarch64 host, but the kernel signal is the same)

Happy to test a patch if helpful!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions