FS#64799 - [pcre2] --enable-jit-sealloc causes crashes in forking applications, including php scripts
Attached to Project:
Arch Linux
Opened by xnor (xnor) - Tuesday, 10 December 2019, 20:08 GMT
Last edited by Pierre Schmitz (Pierre) - Wednesday, 18 December 2019, 19:27 GMT
Opened by xnor (xnor) - Tuesday, 10 December 2019, 20:08 GMT
Last edited by Pierre Schmitz (Pierre) - Wednesday, 18 December 2019, 19:27 GMT
|
Details
Description:
pcre2 PKDBUILD was recently changed to include --enable-jit-sealloc. Not only is this experimental, it's incompatible with fork. Various php scripts use pcre2 with jit enabled by default and fork, such as the tiny tiny rss update daemon. Here is the upstream bug report: https://bugs.php.net/bug.php?id=78927 The title for the recent pcre2 PKGBUILD change is "Fix pcre-jit errors in PHP 7.4 due to MemoryDenyWriteExecute in system unit". This is not the correct solution. php-fpm 7.4 ships with MemoryDenyWriteExecute=true in it's service file. If a user wants to use pcre2 jit then he has to disable this (MemoryDenyWriteExecute=false) in the service file. If you want to work this by default then you should either patch php.ini to default to pcre.jit=0 or patch php-fpm.service to MemoryDenyWriteExecute=falsen |
This task depends upon
Comment by Pierre Schmitz (Pierre) -
Wednesday, 18 December 2019, 12:53 GMT
Comment by Pierre Schmitz (Pierre) -
Wednesday, 18 December 2019, 14:55 GMT
Comment by xnor (xnor) - Wednesday,
18 December 2019, 18:51 GMT
- Task assigned to Florian Pritz (bluewind), Felix Yan (felixonmars)
PHP 7.4.1 no longer ships with MemoryDenyWriteExecute (and other
problematic defaults). I suggest to disable this flag in pcre as
PHP crashes regulary atm.
I have put pcre2 10.34-3 into [testing] that fixes the problem for
me.
Thank you. Fyi, I've been running pcre2 recompiled without
--enable-jit-sealloc for the past week and haven't had a single
php crash since then.