fix: disable PHP's OPcache JIT; 34.0.4:4 → 34.0.4:5 - #156
Merged
Merged
Conversation
The upstream image turns the tracing JIT on for every architecture (opcache.jit=1255, 8M buffer). On aarch64 it segfaults every Apache worker once an app install or update replaces files it has already compiled, and the workers keep dying on respawn, so every request 502s until the service is restarted and OPcache is flushed. Reported against our package on 0.3.5~1 and reproduced upstream on both the fpm and the apache variants (nextcloud/docker#2576, linuxserver/docker-nextcloud#514); the image maintainers consider it a PHP bug and won't change the default. A startos-opcache-jit.ini in conf.d sets opcache.jit=0 and opcache.jit_buffer_size=0. conf.d loads alphabetically, so it lands after opcache-recommended.ini; verified in nextcloud:34.0.3-apache with the file mounted, php -i reports both as 0. Disabled on every architecture rather than gated on aarch64: PHP 8.5, which this image runs, has open tracing-JIT segfaults on x86-64 too (php/php-src#22084, #22558), and Nextcloud gains little from it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The upstream image enables PHP's tracing JIT on every architecture (
opcache.jit=1255); on aarch64 it segfaults every Apache worker once an app install or update replaces files it has already compiled, and every request 502s until the service restarts. Reported against 0.3.5~1 in the dev room; the apache/mod_php variant this package runs is confirmed affected upstream too (nextcloud/docker#2576, comment of Aug 20:34.0.3-apache, aarch64, PHP 8.5.9). The image maintainers consider it a PHP bug and won't change the default.nextcloud.Dockerfile: writesstartos-opcache-jit.iniinto$PHP_INI_DIR/conf.dwithopcache.jit=0andopcache.jit_buffer_size=0. conf.d loads alphabetically, so it lands after upstream'sopcache-recommended.ini— verified innextcloud:34.0.3-apachewith the file mounted:php -ireports both as0.startos/versions/current.ts:34.0.4:4→34.0.4:5, release notes in all five locales.README.md: documents the setting alongside the other image tweaks.Disabled on every architecture rather than gated on aarch64: this image runs PHP 8.5, which has open tracing-JIT segfaults on x86-64 as well (php/php-src#22084, #22558), and Nextcloud gains little from it.
🤖 Generated with Claude Code