opened
mcnilz
username_0
Yesterday we experienced many apache/php errors after upgrading to the newest image. The logs showed memory errors like ``mmap() failed``. We found out that turning off pcre jit with ``pcre.jit=0`` in ``php.ini`` is a workaround.
php:7.0-apache pcre jit possibly broken 
issue
created
zherczeg
username_1
Usually this happens on Security Enhanced Linux if you use the basic executable allocator.
comment
created
FireLizard
username_2
Same issue on MacOS ...

Mac: MacOS Sierra 10.12.5
Docker: Version 17.06.0-ce-mac19 (18663)

Found the workaround on [stackoverflow](https://stackoverflow.com/questions/35889130/apache-crashes-with-munmap-chunk-invalid-pointer-after-update-to-php7-on-jess#39535288), too.
comment
closed
tianon
username_3
issue
created
tianon
username_3
Sorry for the delay!

As of https://github.com/docker-library/php/pull/526, we're back to using PHP's bundled copy of `libpcre` in the default PHP-provided configuration (except on s390x, where JIT is not supported at all).

Given that, I'm inclined to consider this an upstream bug, and would suggest coming up with a reasonably simple reproducer, and filing an issue with upstream.  Sorry!

In the meantime, it sounds like the simple workaround for folks affected by this is to simply add `pcre.jit=0` in `php.ini`, as noted above. :+1:
comment