[Bug 277888] lang/php83: segmentation fault on unloading modules on FreeBSD 13.2 and 13.3

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 22 Mar 2024 14:31:22 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277888

            Bug ID: 277888
           Summary: lang/php83: segmentation fault on unloading modules on
                    FreeBSD 13.2 and 13.3
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: bofh@freebsd.org
          Reporter: wolfgang@lyxys.ka.sub.org
          Assignee: bofh@freebsd.org
             Flags: maintainer-feedback?(bofh@freebsd.org)

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.