Skip to content

fix: disable PHP's OPcache JIT; 33.0.8 → 33.0.8.1 - #155

Closed
MattDHill wants to merge 1 commit into
0351/33.0.8from
fix/0351-disable-opcache-jit
Closed

MattDHill wants to merge 1 commit into
0351/33.0.8from
fix/0351-disable-opcache-jit

Conversation

@MattDHill

Copy link
Copy Markdown
Member

Summary

Nextcloud on StartOS 0.3.5~1 goes down with 502s after any app install or update on aarch64 and stays down until the service is restarted — reported in the dev room, matches nextcloud/docker#2576 and linuxserver/docker-nextcloud#514 exactly.

The upstream image enables PHP's tracing JIT on every architecture (opcache.jit=1255). On aarch64 it segfaults every php-fpm worker once an app install/update replaces files it has already compiled; respawned workers die too, so every request 502s until a restart flushes OPcache. The image maintainers consider it a PHP bug and won't change the default.

  • 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:33.0.8-fpm with the file mounted: php -i reports both as 0.
  • manifest.yaml: 33.0.8 → 33.0.8.1, release note added.
  • scripts/services/migrations.ts: current bumped, no-op 33.0.8.1 entry, same as prior wrapper revisions.

Disabled on every architecture rather than gated on aarch64: Nextcloud gains little from the JIT, and the same tracing JIT has open segfault reports on x86-64 (php/php-src#22084, #22558).

@Dominion5254 — this needs to go out to the 0.3.5~1 registry; CI doesn't build PRs against this branch, so it needs a manual build + publish. The same fix for 0.4 is in the companion PR against master.

🤖 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 php-fpm
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
this package on StartOS 0.3.5~1 and reproduced upstream (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:33.0.8-fpm with the file
mounted, php -i reports both as 0. Disabled on every architecture rather
than gated on aarch64: Nextcloud gains little from the JIT, and the same
tracing JIT has open segfault reports on x86-64 (php/php-src#22084, #22558).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@MattDHill

Copy link
Copy Markdown
Member Author

Closing — a service restart clears the crash and the app install itself succeeds, so this isn't worth a 0.3.5~1 release for the handful of arm64 servers still on it. The fix ships with the 0.4 package (#156).

@MattDHill MattDHill closed this Sep 20, 2026
@MattDHill
MattDHill deleted the fix/0351-disable-opcache-jit branch September 20, 2026 18:12
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