Apache crashes with munmap_chunk(): invalid pointer after update to php7 on Jessie Apache crashes with munmap_chunk(): invalid pointer after update to php7 on Jessie apache apache

Apache crashes with munmap_chunk(): invalid pointer after update to php7 on Jessie


That's now the second time we have been hit hard by the very same issue.

It happens when running PHP 7.0 on a up to date debian.This will break any type of website system which heavily uses regular expression.We have seen it iwth Neos (neos.io) or Typo3 (starting with 6.2).

In case it's not possible to use the testing version of the libpcre3.Someone can disable the just in time compiling within the php.ini

  1. Edit your php.ini add pcre.jit=0 anywhere you like
  2. Restart your apache
  3. Be happy


I have the same version and solved by upgrading libpcre3 like @Kevin Fischer write.

I was upgrade libpcre3 package form 2:8.35-3.3+deb8u4 (stable) to 2:8.38-3.1 (testing) version.

Step by step:

  1. Add line deb http://ftp.us.debian.org/debian testing main contrib non-free to /etc/apt/sources.list
  2. Create file /etc/apt/apt.conf.d/99default-release with content: APT::Default-Release "stable";
  3. Run command apt-get update from root
  4. Run command apt-get -t testing install libpcre3 to install testing version of libpcre3 package
  5. Restart your server and check logs, error should be disappears.

For more info to install testing package see this question.

Warning! Testing packages can works incorrectly! Update in your own risk or wait new release.


We've just had a similiar situation, where one of our framework's components would fail us with:

*** Error in `php': munmap_chunk(): invalid pointer: 0x00007fdce5550060 ***

I can't tell you anything about the bug itself, but the cause of it was a broken libpcre3 version, namely 8.35-3.3+deb8u4. We we're running a custom build, because PHP7 requires JIT support from libpcre3, which isn't included in the default one our Ubuntu version comes with (Ubuntu 14.04 LTS, 8.31-2ubuntu2.3). Upgrading the libpcre3 version solved the problem for us.