Skip to content

Self-host M4: gen-2 native driver segfaults compiling full spine (bootstrap-loop-gen2-recompile-spine exit 139) #2930

Description

@PurHur

Milestone

M4 (bootstrap loop / gen-2→gen-3 spine) — parent #1492.

Problem

make bootstrap-loop-probe is blocked by a native segfault while the gen-2 AOT driver recompiles the full spine (test/selfhost/compiler_lib_spine_smoke/main.php). The crashing native binary produces no stdout/stderr; the wrapper only sees exit 139.

This is compiler/runtime correctness work on the self-host path: gen-2 must compile inventory-scale PHP without crashing.

Scope (start here)

  • Repro entry: test/selfhost/compiler_lib_spine_smoke/main.php
  • AOT emit/link pipeline: lib/AOT/* + runtime floor lib/AOT/runtime/*
  • LLVM lowering: lib/JIT.php, lib/JIT/*
  • Self-host AOT stubs (PHP_COMPILER_SELFHOST_AOT) that may be masking invalid IR/pointers on larger bundles

Repro (today on master)

Host preflight (do not run docker info inside the docker-exec container):

docker info >/dev/null
./script/docker-exec.sh -- bash -lc 'make bootstrap-loop-probe'

First red sub-step (direct repro):

docker info >/dev/null
./script/docker-exec.sh -- bash -lc 'bash -x ./script/bootstrap-loop-gen2-recompile-spine.sh'

Observed symptoms:

  • make bootstrap-loop-probe:
    • bootstrap-loop-gen2-recompile-spine: gen-2 native spine compile failed (exit 139)
  • bash -x shows the crashing command is:
/compiler/build/bin-compile-aot -o /compiler/build/bootstrap-loop-gen3-full-spine /compiler/test/selfhost/compiler_lib_spine_smoke/main.php

…and the captured output is empty (out="", code=139).

Done when

  • ./script/docker-exec.sh -- bash -lc 'make bootstrap-loop-probe' exits 0 on clean master
  • ./script/docker-exec.sh -- bash -lc './script/bootstrap-loop-gen2-recompile-spine.sh' exits 0 and prints an expected compile OK line
  • Root cause summarized and linked to the fixing PR

Suggested labels

If desired for filtering: self-host, bootstrap, IMPORTANT

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions