php83-fpm crash with CCRandomGenerateBytes on ElCapitano [solved]
Matthias
beta at admilon.net
Tue Aug 18 15:03:58 UTC 2026
Hello,
php-fpm finally running on ElCapitano with Wordpress and Laravel, yeah :-)
On 8 Aug 2026, at 15:08, Matthias via macports-users wrote:
> After MacPorts successfully updated postfix to 3.11, I thought I give this another try:
> I’m trying to get php83 up and running with Nginx on an old ElCapitano box.
> It nicely compiles with clang-18 but fpm is crashing immediately with zif_uniqid or zif_random_bytes both call in one ay or the other CCRandomGenerateBytes and then the dispatcher is crashing:
>
> 0 libdispatch.dylib 0x00007fff84d11661 _dispatch_queue_push_queue + 345
> 1 libdispatch.dylib 0x00007fff84d0fb06 _dispatch_queue_wakeup_with_qos_slow + 126
> 2 libcorecrypto.dylib 0x00007fff966beddc ccrng_CommonCrypto_generate + 309
> 3 libcommonCrypto.dylib 0x00007fff90ea148f CCRandomGenerateBytes + 28
> 4 php-fpm83 0x0000000104e7a4e7 php_random_bytes + 13
> 5 php-fpm83 0x0000000104e79a30 zif_random_bytes + 117
> 6 php-fpm83 0x000000010500ee64 ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER + 271
the obvious cause ↑:
PHP-FPM → fork → CommonCrypto RNG → old libdispatch → SIGSEGV
php itself is not forking and thus not crashing
Leaving commonCrypto out while compiling php-fpm with clang-18 works finally :-)
this is my mini-patch:
--- a/ext/random/csprng.c
+++ b/ext/random/csprng.c
@@ -50,8 +50,8 @@
# include <sys/random.h>
# endif
#endif
-
-#if HAVE_COMMONCRYPTO_COMMONRANDOM_H
+/*darwin cut commencrypto */
+#if 0
# include <CommonCrypto/CommonCryptoError.h>
# include <CommonCrypto/CommonRandom.h>
#endif
@@ -70,7 +70,8 @@
}
return FAILURE;
}
-#elif HAVE_COMMONCRYPTO_COMMONRANDOM_H
+/*darwin cut commencrypto */
+#elif 0
cheers
Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 858 bytes
Desc: OpenPGP digital signature
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20260818/1a56dfb6/attachment.sig>
More information about the macports-users
mailing list