Skip to content

fix: disable PHP's OPcache JIT; 34.0.4:4 → 34.0.4:5 - #156

Merged
MattDHill merged 1 commit into
masterfrom
fix/disable-opcache-jit
Sep 24, 2026
Merged

MattDHill merged 1 commit into
masterfrom
fix/disable-opcache-jit

Conversation

@MattDHill

@MattDHill MattDHill commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

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: writes startos-opcache-jit.ini into $PHP_INI_DIR/conf.d with opcache.jit=0 and opcache.jit_buffer_size=0. conf.d loads alphabetically, so it lands after upstream's opcache-recommended.ini — verified in nextcloud:34.0.3-apache with the file mounted: php -i reports both as 0.
  • 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

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>
@MattDHill
MattDHill merged commit 0a1df5e into master Sep 24, 2026
3 checks passed
@MattDHill
MattDHill deleted the fix/disable-opcache-jit branch September 24, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant