1
votes

I'm running a CentOS 7 on a physical server, and I found a warning about JIT out of memory. The problem appears on a WordPress 4.9.8 installation when migrating to PHP 7.3RC2. PHP 7.3 update to the PCRE2 version of the library.

Log saves lots of warnings, in every preg_match and preg_replace, and it is always the same: JIT compilation failed. No more memory. As far as I could debug the function results were correct. If I try to debug a simple preg_match call on a small PHP file, the problem does not appear, but on another big PHP site like phpMyAdmin, it happens again.

I couldn't find anything on the web, and I think it is a very particular problem of either the implementation of the PCRE2 library in the Remi Repo or the PHP7.3RC2 + PCRE2 combination because I can't reproduce the problem in a VM.

Update 1: I couldn't find a good how-to guide to increase the stack size of the library.

Update 2: physical server has SELinux enabled. I will investigate this way. For the time being, the PHP version was downgraded to 7.2.

If somebody has the same problem or any idea, please let me know.

i think you need to increase the PCRE JIT stack size limitsietse85
this could be of help externals.io/message/87245 its an old article but has the same issue with the same PHP versionsietse85
By default pcre.jit=0 (in package from my repo) as it raise SElinux issues.Remi Collet
I can reproduce this building PHP from source on my Mac. I can confirm that disabling pcre.jit avoids these errors. What that does to performance I'll be testingTim