shivammathur / setup-php

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

Home Page:https://setup-php.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash with PHP 8.3

dunglas opened this issue · comments

Describe the bug
The FrankenPHP test suite crashes when using libphp 8.3 ZTS provided by setup-php:

signal: aborted (core dumped)

https://github.com/dunglas/frankenphp/actions/runs/6879551912/job/18711722654?pr=304

This is recent (tests were green 5 days ago).

This doesn't look like a PHP bug because we also run the same tests in the official 8.3 PHP images and we don't have this error.

Version

  • I have checked releases, and the bug exists in the latest patch version of v1 or v2.
  • v2
  • v1

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems
Ubuntu.

PHP versions
8.3 ZTS

To Reproduce

Expected behavior

No crash.

Screenshots/Logs

signal: aborted (core dumped)

Additional context
n/a

Are you willing to submit a PR?

If I find the problem.

Here is a backtrace:

[New Thread 0x7fff67ffd640 (LWP 8036)]
free(): invalid pointer
free(): invalid pointer
free(): invalid pointer
free(): invalid pointer

Thread 9 "thpool-0" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff89163640 (LWP 8033)]
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140735493322304) at ./nptl/pthread_kill.c:44
44      ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140735493322304) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140735493322304) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140735493322304, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007ffff7642476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff76287f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff7689676 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff77dbb8c "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#6  0x00007ffff76a0cfc in malloc_printerr (str=str@entry=0x7ffff77d9764 "free(): invalid pointer") at ./malloc/malloc.c:5664
#7  0x00007ffff76a2a44 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at ./malloc/malloc.c:4439
#8  0x00007ffff76a5453 in __GI___libc_free (mem=<optimized out>) at ./malloc/malloc.c:3391
#9  0x00007ffff7c6cc3e in ?? () from /lib/libphp.so
#10 0x00007ffff7c279cf in ?? () from /lib/libphp.so
#11 0x00007ffff7d13315 in zend_deactivate_modules () from /lib/libphp.so
#12 0x00007ffff7c9b5cd in php_request_shutdown () from /lib/libphp.so
#13 0x000000000071df40 in frankenphp_request_shutdown ()
#14 0x000000000071c1ea in _cgo_3aaccee9b53c_Cfunc_frankenphp_request_shutdown ()
#15 0x000000000047a168 in runtime.asmcgocall.abi0 ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

This has been fixed upstream: php/php-src#12691 (comment)

Thanks.