When php83 is installed together with certain extensions in a certain order, php scripts throw a segmenation fault at the end after finishing their task, apparently on unloading the dynamic libraries from the extensions. This does happen even when none of the installed extensions is actually used. I can reproduce it in two environments: Jail with userland from 13.2-10 running on a 13.9 host with 2024Q1 packages, and on a physical host running 13.3-STABLE stable/13-n257383-49e8190c76c1 with packages from the MAIN branch. I can NOT reproduce the problem on 14.0-RELEASE-p5 though How to reproduce: On a FreeBSD 13 installation without php run: pkg install php83 php83-bcmath php83-bz2 php83-calendar php83-composer php83-curl php83-deployer php83-exif php83-fileinfo php83-ftp php83-gd php83-gettext php83-gmp php83-iconv php83-imap php83-ldap php83-mbstring php83-mysqli php83-opcache php83-pcntl php83-pdo_mysql php83-pdo_pgsql php83-pdo_sqlite php83-pecl-APCu php83-pecl-gnupg php83-pecl-grpc php83-pecl-igbinary php83-pecl-imagick php83-pecl-redis php83-pecl-ssh2 php83-pecl-vips php83-posix php83-pspell php83-readline php83-simplexml After finishing that installation, run: php -r 'proc_open(["date"], [], $pipes);' On FreeBSD 13 I get: $ php -r 'proc_open(["date"], [], $pipes);' Fri Mar 22 15:26:24 CET 2024 Segmentation fault $ On FreeBSD 14 I get: $ php -r 'proc_open(["date"], [], $pipes);' Fri Mar 22 15:25:46 CET 2024 $ Please note that the test script does not use any of the extensions, it runs quite fine on php83 alone.
Currently I do no longer have any 13 boxes in production so cannot confirm this. However this might be an issue with some posix patches I removed before the quarterly and was again reintroduced which was not later merged into the quarterly. But let me know if you can find any order in which it does not break. In the ports framework we can load and unload the php modules in a specific order. This order has been a long outstanding issue hence we introduced this for manual intervention.
After linking php83-gd with graphics/gd that has the newly introduced THREADS option set, I can no longer reproduce the problem. So maybe this was the problem.