Skip to content

symfony-app dev: first boot segfaults in DeepClone::getHydrator (non-object receiver dispatched to RedisClusterNodeProxy::__call) #290

Closed

Description

@blacktrs

Summary

With the fix for #287/#288 applied (branch repro/reflection-param-defaults, cc15d276), examples/symfony-app in APP_ENV=dev still dies on its first boot with SIGSEGV (exit 139, nothing on stderr). It boots fine when var/ already exists from an earlier run. prod is unaffected.

Reproduce

cp -R examples/symfony-app /tmp/app && cd /tmp/app
composer install --no-interaction --no-progress --no-scripts
manticore build
rm -rf var
APP_ENV=dev PORT=8995 WORKERS=1 ./bin/app; echo rc=$?     # rc=139, deterministic (3/3)
APP_ENV=dev PORT=8995 WORKERS=1 ./bin/app                  # now boots (var/cache/dev, var/build/dev exist), GET / -> 200

Native backtrace (lldb, EXC_BAD_ACCESS address=0x7e65fffffffffff8)

Symfony\Component\Cache\Traits\RedisClusterNodeProxy::__call      <- reads [x9-8], x9 = 0x7e66000000000000 (a tagged word, not an object)
__mir_vdisp_917
Symfony\Polyfill\DeepClone\DeepClone::getHydrator
DeepClone::reconstruct
DeepClone::deepclone_from_array
Symfony\Component\VarExporter\DeepCloner::clone / deepClone
FrameworkBundle\DependencyInjection\Compiler\ContainerBuilderDebugDumpPass::process
Compiler::compile -> ContainerBuilder::compile -> App\Kernel::initializeContainer -> Kernel::boot

getHydrator() takes the internal-class branch ($classReflector->isInternal() is true for prelude classes): foreach ($classReflector->getProperties() as $p) { $propertySetters[$p->name] = $p->setValue(...); }. A virtual dispatch on a non-object receiver lands in an unrelated class's __call.

Related

  • ReflectionProperty::setValue() on a property of a prelude class (Exception::$message, ::$code) throws "Cannot write property" #289: ReflectionProperty::setValue() on properties of prelude classes (Exception::$message) throws Cannot write property (the same hydration path). A small program that feeds Symfony\Polyfill\DeepClone\DeepClone::deepclone_to_array/deepclone_from_array an object graph holding new RuntimeException(), new ArrayObject([1]) and new DateTimeImmutable() fails with Uncaught ReflectionException: Cannot write property ts; Zend round-trips it.
  • Prelude Exception reports different properties than Zend (traceNames, traceLines, ...), ArrayObject and SplObjectStorage are not reflectable (Class "ArrayObject" does not exist via ReflectionClass).

Not reduced yet

No self-contained repro yet (the crash needs the polyfill and the container); the recipe above is deterministic. A first step would be to find which class getHydrator() is asked for at the crash (break in DeepClone::getHydrator, print the $class argument) and reproduce it with that class only.

Activity

  1. added
    bug
    crash
    on Oct 16, 2026
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

    bugcrash

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions