Problem/Motivation

This is a test-only issue. Nothing here should be committed.

nocopy is a shared-memory cache extension for PHP 8.4+. It stores arrays and strings the way OPcache does (immutable, interned), so on php-fpm and mod_php a cache hit is a pointer into shared memory and nothing is unserialized. It ships an APCu polyfill (apcu_* and APCUIterator on top of nocopy) for code that calls APCu directly.

I'd like to run core's complete test suite with APCu replaced by nocopy plus the polyfill. That covers the places where core uses APCu: the fast layer in ChainedFastBackend (bootstrap, config and discovery bins), ApcuBackend, FileCache and the class loader. The goal is to find incompatibilities before recommending it to site owners.

Proposed resolution

The MR changes only .gitlab-ci/scripts/server-setup.sh. Before Apache starts, it:

  • builds nocopy 0.0.5 with PIE,
  • comments out extension="apcu.so" in php.ini and php-cli.ini,
  • loads the polyfill through auto_prepend_file,
  • gives the arena half of the free /dev/shm, at most 2G.

The test runner and Apache's workers both run as www-data and share one cache.

Expected differences, which are not bugs in core:

  • apcu_cache_info() and apcu_sma_info() are summaries without per-entry lists.
  • Tests that check extension_loaded('apcu') take their "no APCu" path, for example the status report.

Remaining tasks

  • Run the pipeline and compare the failures against a pipeline on the same base commit.
  • Report incompatibilities on the nocopy issue tracker.

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork drupal-3637099

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

chr.fritsch created an issue. See original summary.

chr.fritsch’s picture

Issue summary: View changes

quietone’s picture

Title: Title: [ignore] Run core tests with the nocopy extension instead of APCu » [ignore] Run core tests with the nocopy extension instead of APCu

Changing title per Special titles.