Since v1.1.5 frankenphp crash on laravel 11 project
What happened?
Hello,
Since version 1.1.5, FrankenPHP has been consistently crashing when used with a Laravel 11 project. The crash occurs immediately upon the first page load attempt.
See below the crash debug
Build Type
Official static build
Worker Mode
Yes
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
No specific php configuration
Relevant log output
PID: 979391 (frankenphp)
UID: 1011 (xxx)
GID: 1011 (xxx)
Signal: 4 (ILL)
Timestamp: Tue 2025-01-21 18:26:05 CET (1min 49s ago)
Command Line: frankenphp run Caddyfile
Executable: /usr/sbin/frankenphp
Control Group: /user.slice/user-1011.slice/session-226500.scope
Unit: session-226500.scope
Slice: user-1011.slice
Session: 226500
Owner UID: 1011 (xxx)
Boot ID: 97d108e50960432d84dd56ca1a597cbc
Machine ID: 9bba94b985ae4fbcb10432433d6434e5
Hostname: xxx
Storage: /var/lib/systemd/coredump/core.frankenphp.1011.97d108e50960432d84dd56ca1a597cbc.979391.1737480365000000.zst (present)
Size on Disk: 86.6M
Message: Process 979391 (frankenphp) of user 1011 dumped core.
Stack trace of thread 979419:
#0 0x00007fdb7b04b341 runtime.raise (/usr/sbin/frankenphp + 0x84b341)
#1 0x00007fdb7b01f66d runtime.raisebadsignal (/usr/sbin/frankenphp + 0x81f66d)
#2 0x00007fdb7b01fae7 runtime.badsignal (/usr/sbin/frankenphp + 0x81fae7)
#3 0x00007fdb7b01e65b runtime.sigtrampgo (/usr/sbin/frankenphp + 0x81e65b)
#4 0x00007fdb7b04b649 runtime.sigtramp (/usr/sbin/frankenphp + 0x84b649)
#5 0x00007fdb7e110a0a n/a (/usr/sbin/frankenphp + 0x3910a0a)
ELF object binary architecture: AMD x86-64
GNU gdb (Rocky Linux) 14.2-3.el9
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/frankenphp...
warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing
[New LWP 979419]
[New LWP 979395]
[New LWP 979394]
[New LWP 979393]
[New LWP 979392]
[New LWP 979391]
[New LWP 979396]
[New LWP 979422]
[New LWP 979418]
[New LWP 979404]
[New LWP 979411]
[New LWP 979399]
[New LWP 979398]
[New LWP 979410]
[New LWP 979415]
[New LWP 979414]
[New LWP 979412]
[New LWP 979400]
[New LWP 979420]
[New LWP 979413]
[New LWP 979416]
[New LWP 979401]
[New LWP 979402]
[New LWP 979417]
[New LWP 979405]
[New LWP 979397]
[New LWP 979403]
[New LWP 979409]
[New LWP 979421]
--Type <RET> for more, q to quit, c to continue without paging--
[New LWP 979406]
[New LWP 979408]
[New LWP 979407]
Core was generated by `frankenphp run Caddyfile'.
Program terminated with signal SIGILL, Illegal instruction.
#0 runtime.raise () at /usr/local/go/src/runtime/sys_linux_amd64.s:154
154 RET
[Current thread is 1 (LWP 979419)]
Loading Go Runtime support.
(gdb) bt full
#0 runtime.raise () at /usr/local/go/src/runtime/sys_linux_amd64.s:154
No locals.
#1 0x00007fdb7b01f66d in runtime.raisebadsignal (sig=4, c=0xc000725a50) at /usr/local/go/src/runtime/signal_unix.go:1030
handler = 0
flags = <optimized out>
#2 0x00007fdb7b01fae7 in runtime.badsignal (sig=4, c=0xc000725a50) at /usr/local/go/src/runtime/signal_unix.go:1139
No locals.
#3 0x00007fdb7b01e65b in runtime.sigtrampgo (sig=4, info=0xc000725bf0, ctx=0xc000725ac0) at /usr/local/go/src/runtime/signal_unix.go:468
c = <optimized out>
gp = 0xc000684e00
setStack = <optimized out>
gsignalStack = <optimized out>
#4 0x00007fdb7b04b649 in runtime.sigtramp () at /usr/local/go/src/runtime/sys_linux_amd64.s:352
No locals.
#5 <signal handler called>
No locals.
#6 0x00007fdb7ec894a0 in __gmpn_set_str ()
No symbol table info available.
#7 0x00007fdb7ec80f1a in __gmpz_set_str ()
No symbol table info available.
#8 0x00007fdb7d58aecc in convert_zstr_to_gmp (gmp_number=0x7fdb2fd802e0, val=0x7fdb17d8b2d0, base=0, arg_pos=1)
at /go/src/app/dist/static-php-cli/source/php-src/ext/gmp/gmp.c:673
num_str = 0x7fdb17d8b2e8 "173748036553432"
skip_lead = false
num_len = 15
gmp_ret = 32731
#9 0x00007fdb7d58af9f in convert_to_gmp (gmpnumber=0x7fdb2fd802e0, val=0x7fdb2e016250, base=0, arg_pos=1)
at /go/src/app/dist/static-php-cli/source/php-src/ext/gmp/gmp.c:695
No locals.
#10 0x00007fdb7d58d475 in zif_gmp_strval (execute_data=0x7fdb2e016200, return_value=0x7fdb2e0161f0)
at /go/src/app/dist/static-php-cli/source/php-src/ext/gmp/gmp.c:1143
gmpnumber_arg = 0x7fdb2e016250
base = 16
gmpnum = 0x7fdb2e016180
temp_a = {num = {{_mp_alloc = 2, _mp_size = 0, _mp_d = 0x7fdb2c41acb0}}, is_used = false}
#11 0x00007fdb7d280305 in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER () at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:1351
call = 0x7fdb2e016200
fbc = 0x7fdb332e9020
ret = 0x7fdb2e0161f0
retval = {value = {lval = 140578574565376, dval = 6.9455044234084328e-310, counted = 0x7fdb00000000, str = 0x7fdb00000000,
arr = 0x7fdb00000000, obj = 0x7fdb00000000, res = 0x7fdb00000000, ref = 0x7fdb00000000, ast = 0x7fdb00000000, zv = 0x7fdb00000000,
ptr = 0x7fdb00000000, ce = 0x7fdb00000000, func = 0x7fdb00000000, ww = {w1 = 0, w2 = 32731}}, u1 = {type_info = 3, v = {type = 3 '\003',
type_flags = 0 '\000', u = {extra = 0}}}, u2 = {next = 32731, cache_slot = 32731, opline_num = 32731, lineno = 32731, num_args = 32731,
fe_pos = 32731, fe_iter_idx = 32731, guard = 32731, constant_flags = 32731, extra = 32731}}
call_info = 0
--Type <RET> for more, q to quit, c to continue without paging--
#12 execute_ex (ex=0x7fdb2e014200) at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:58809
vm_stack_data = {
hybrid_jit_red_zone = "@\000\000.\333\177\000\000PU\t\000\000\000\000\000\200\235\005.\333\177\000\000\000D\330/\333\177\000\0008P\t.\333\177\000\000\000B\001.\333\177\000", orig_opline = 0x41d674a0, orig_execute_data = 0x7fdb2e0140a0}
#13 0x00007fdb7d14a292 in zend_call_function (fci=0x7fdb2fd84440, fci_cache=0x7fdb2fd84410)
at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend_execute_API.c:1000
orig_jit_trace_num = 0
i = 0
call = 0x7fdb2e014200
fci_cache_local = {function_handler = 0x41d674a0, calling_scope = 0x0, called_scope = 0x7fdb2fd84370,
object = 0x7fdb7cfd169b <go_frankenphp_worker_handle_request_start+111>, closure = 0x7fdb2fd84370}
func = 0x7fdb2e095038
call_info = 33685504
object_or_called_scope = 0x0
orig_fake_scope = 0x0
#14 0x00007fdb7cfd4845 in zif_frankenphp_handle_request (execute_data=0x7fdb2e0141a0, return_value=0x7fdb2e014170) at frankenphp.c:432
fci = {size = 64, function_name = {value = {lval = 140579346927616, dval = 6.9455425831733257e-310, counted = 0x7fdb2e095000,
str = 0x7fdb2e095000, arr = 0x7fdb2e095000, obj = 0x7fdb2e095000, res = 0x7fdb2e095000, ref = 0x7fdb2e095000, ast = 0x7fdb2e095000,
zv = 0x7fdb2e095000, ptr = 0x7fdb2e095000, ce = 0x7fdb2e095000, func = 0x7fdb2e095000, ww = {w1 = 772362240, w2 = 32731}}, u1 = {
type_info = 776, v = {type = 8 '\b', type_flags = 3 '\003', u = {extra = 0}}}, u2 = {next = 2127, cache_slot = 2127, opline_num = 2127,
lineno = 2127, num_args = 2127, fe_pos = 2127, fe_iter_idx = 2127, guard = 2127, constant_flags = 2127, extra = 2127}},
retval = 0x7fdb2fd84400, params = 0x0, object = 0x0, param_count = 0, named_params = 0x0}
fcc = {function_handler = 0x7fdb2e095038, calling_scope = 0x0, called_scope = 0x0, object = 0x0, closure = 0x7fdb2e095000}
ctx = 0x7fdb2e380c30
request = true
retval = {value = {lval = 0, dval = 0, counted = 0x0, str = 0x0, arr = 0x0, obj = 0x0, res = 0x0, ref = 0x0, ast = 0x0, zv = 0x0, ptr = 0x0,
ce = 0x0, func = 0x0, ww = {w1 = 0, w2 = 0}}, u1 = {type_info = 0, v = {type = 0 '\000', type_flags = 0 '\000', u = {extra = 0}}}, u2 = {
next = 0, cache_slot = 0, opline_num = 0, lineno = 0, num_args = 0, fe_pos = 0, fe_iter_idx = 0, guard = 0, constant_flags = 0, extra = 0}}
#15 0x00007fdb7d280305 in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER () at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:1351
call = 0x7fdb2e0141a0
fbc = 0x7fdb33339850
ret = 0x7fdb2e014170
retval = {value = {lval = 140578574565376, dval = 6.9455044234084328e-310, counted = 0x7fdb00000000, str = 0x7fdb00000000,
arr = 0x7fdb00000000, obj = 0x7fdb00000000, res = 0x7fdb00000000, ref = 0x7fdb00000000, ast = 0x7fdb00000000, zv = 0x7fdb00000000,
ptr = 0x7fdb00000000, ce = 0x7fdb00000000, func = 0x7fdb00000000, ww = {w1 = 0, w2 = 32731}}, u1 = {type_info = 3, v = {type = 3 '\003',
type_flags = 0 '\000', u = {extra = 0}}}, u2 = {next = 1, cache_slot = 1, opline_num = 1, lineno = 1, num_args = 1, fe_pos = 1,
fe_iter_idx = 1, guard = 1, constant_flags = 1, extra = 1}}
call_info = 0
#16 execute_ex (ex=0x7fdb2e014020) at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:58809
vm_stack_data = {
hybrid_jit_red_zone = "@\000\000.\333\177\000\000\020\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000@\000\000.\333\177\000\000Hq\005\000\000\000\000\000 y\006\000\000\000\000", orig_opline = 0x7fdb33910b30, orig_execute_data = 0x7fdb339104d0}
#17 0x00007fdb7d29e8b6 in zend_execute (op_array=0x7fdb2e06d000, return_value=0x0)
at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:64236
execute_data = 0x7fdb2e014020
--Type <RET> for more, q to quit, c to continue without paging--
object_or_called_scope = 0x0
call_info = 1245184
#18 0x00007fdb7d3837e4 in zend_execute_script (type=8, retval=0x0, file_handle=0x7fdb2fd8a540)
at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend.c:1934
op_array = 0x7fdb2e06d000
ret = SUCCESS
#19 0x00007fdb7d078249 in php_execute_script_ex (primary_file=0x7fdb2fd8a540, retval=0x0)
at /go/src/app/dist/static-php-cli/source/php-src/main/main.c:2591
realfile = "\000\000\000B\000\000\000\0000\000\000\000\001\000\000\000\006", '\000' <repeats 11 times>, "\001\000\000\000\001", '\000' <repeats 15 times>, "<z\022\201\333\177\000\000\300\236\330/\333\177\000\000Д\330/\333\177\000\000\230E\346.\333\177\000\000Pԓ\203\333\177\000\000\300\236\330/\333\177\000\000\343\236\330/\333\177\000\000\350\224\330/\333\177\000\0000", '\000' <repeats 15 times>, "\300\236\330/\333\177\000\000\345\236\330/\333\177\000\000Pԓ\203\333\177\000\000<z\022\201\333\177\000\000\000\225\330/\333\177\000\000(\237\330/\333\177\000\000\300\225\330/\333\177\000\000\277\263\362}\333\177\000\000(\000\000\000\000\000\000\000(\237\330"...
__orig_bailout = 0x7fdb2fd8a590
__bailout = {{__jb = {140579349990400, 140579377292528, 536576, 140579377293080, 140579439707344, 140579439708976, 140579377283568,
140580672208303}, __fl = 140580802311032, __ss = {88, 140579361408440, 140579355208560, 0, 140579377290944, 140579361408408,
140580740037608, 140580740037180, 140579377288448, 140579377290981, 140579377290944, 140579377288224, 140580687626298, 140580687670757,
0, 140579377290973}}}
prepend_file_p = 0x0
append_file_p = 0x0
prepend_file = {handle = {fp = 0x7fdb803ed32b, stream = {handle = 0x7fdb803ed32b, isatty = 802722496, reader = 0x5,
fsizer = 0x7fdb81127a3c <google_protobuf_FeatureSet__fields+60>, closer = 0x7fdb2fd892f0}},
filename = 0x7fdb7df2c3ce <_upb_MiniTableField_HasbitMask_dont_copy_me__upb_internal_use_only+24>, opened_path = 0x0, type = 60 '<',
primary_script = 122, in_list = 18, buf = 0x100000000 <error: Cannot access memory at address 0x100000000>, len = 69}
append_file = {handle = {fp = 0x7fdb2fd89320, stream = {handle = 0x7fdb2fd89320, isatty = 2113067879,
reader = 0x7fdb81127a3c <google_protobuf_FeatureSet__fields+60>, fsizer = 0x7fdb2ee64598, closer = 0x2000000000000007}}, filename = 0x8,
opened_path = 0x7fdb2fd894a0, type = 224 '\340', primary_script = 132, in_list = 244, buf = 0x7fdb2fd89500 "\001", len = 140580740037180}
old_cwd = 0x7fdb2fd881f0 "/home/sites/web/xxx"
use_heap = false
result = true
#20 0x00007fdb7d078453 in php_execute_script (primary_file=0x7fdb2fd8a540) at /go/src/app/dist/static-php-cli/source/php-src/main/main.c:2631
No locals.
#21 0x00007fdb7cfd63c8 in frankenphp_execute_script (file_name=0xc00063eb90 "/home/sites/web/xxx/public/frankenphp-worker.php")
at frankenphp.c:1024
__orig_bailout = 0x0
__bailout = {{__jb = {140579349990400, 140579377292896, 536576, 140579377293080, 140579439707344, 140579439708976, 140579377292576,
140580671546265}, __fl = 140579377292864, __ss = {0, 140579377292816, 140580671551192, 140579377293080, 0, 140579439708976, 0,
140579377292896, 140580671526152, 2, 1, 140579377292896, 0, 1, 824640269200, 140579377293080}}}
status = 0
file_handle = {handle = {fp = 0x7fdb2e0600e0, stream = {handle = 0x7fdb2e0600e0, isatty = 0, reader = 0x7fdb7d09cca4 <_php_stream_read>,
fsizer = 0x7fdb7d075e46 <php_zend_stream_fsizer>, closer = 0x7fdb7d075e26 <php_zend_stream_closer>}}, filename = 0x7fdb2e05d000,
opened_path = 0x7fdb2e05d0c0, type = 2 '\002', primary_script = false, in_list = true,
buf = 0x7fdb2e063000 "<?php\n\ndeclare(strict_types=1);\n// Set a default for the application base path and public path if they are missing...\n$_SERVER['APP_BASE_PATH'] = $_ENV['APP_BASE_PATH'] ?? $_SERVER['APP_BASE_PATH'] ??"..., len = 385}
#22 0x00007fdb7cfd601d in php_thread (arg=0x1) at frankenphp.c:898
--Type <RET> for more, q to quit, c to continue without paging--
thread_name = "php-1\000\000\000\000\000\000\000\000\000\000"
default_filter = 0x0
scriptName = 0xc00063eb90 "/home/sites/web/xxx/public/frankenphp-worker.php"
#23 0x00007fdb7e118676 in start (p=0x7fdb2fd8a6f8) at src/thread/pthread_create.c:207
args = 0x7fdb2fd8a6f8
state = <optimized out>
#24 0x00007fdb7e119e81 in __clone () at src/thread/x86_64/clone.s:22
No locals.
It appears that the crash is coming from the gmp extension
Does this only happen on 1.1.5 or also on the newest version (1.4.1) ? What is the original gmp call that causes the crashing? The extensions seems to work on a simple hello world for me, at least in the Debian Docker iamges echo gmp_strval("000100", 10);
Since 1.1.5, and happen only on my server, not on my local machine.
On my server, I just created a new Laravel 11 project. Frankenphp doesn't crash... so this means that it's the code loading in my project that's causing this crash... maybe a vendor... the search is going to be difficult..
Oooooh
If I add your code @AlliBalliBaba in "/" route (see in screenshot) franken crash..
And locally you're using Ubuntu, but the server is running on Rocky Linux? I'd usually expect the static binary to be compatible with all Linux x86_64 distributions, but that might not be the case? @dunglas
I think what you could also try is building the static binary directly on the server according to this instruction.
Locally I'm on Fedora. Okay, I'll try to do a static build from the server.
In theory this should be compatible with all servers but it's just theory...
The issue could be that your kernel is older on your server? A static build usually uses the "latest" syscall maps in libc, and on an older kernel, it may not support newer syscalls. A custom build on the machine itself will use the system's libc and compile in a real syscall table that is actually supported.
I'm not saying that is the issue, but seeing as that it is gmp which does some syscall and/or cpu extension stuff, it is possibly a kernel/cpu support issue.
@dunglas -- it might be a compile-time issue as well in the static builder. Generally ./configure will detect cpu-specific optimizations and it is possible that our CI has some specific cpu optimizations being compiled in. Generally, it would be compiled to be "generic" so it could work on any machine, at the expense of performance. It could be something silly in @XternalSoft's case, where his cpu is lacking SSE2, AVX2, BMI2, or something while it was compiled with those optimizations.
@withinboredom, Am I on RockyLinux9, the current kernel version is 5.14.0-503.21.1.el9_5.x86_64 And CPU : Intel(R) Xeon(R) CPU E5-1410 v2 @ 2.80GHz
So.... same result with static build on my server....
Currently building static without gmp extension... ⏳
Maybe @crazywhalecc will have an idea of what's going on?
Maybe should you also report his issue upstream (to PHP) because the problem doesn't look to be in FrankenPHP sources, but more in GMP.
I'm curious, what is your cpu flags on your server: cat /proc/cpuinfo? I also think if you turn on debug output when building, you can see the output of Configure during the build of gmp (the library, not the extension) to see if it is compiling in any cpu optimizations.
@withinboredom
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts vnmi md_clear flush_l1d
EXTRA_CFLAGS='-g -fstack-protector-strong -fpic -fpie -Os -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-ident -fPIE'
EXTRA_LDFLAGS_PROGRAM='-all-static -Wl,-O1 -pie'
Yeah, I don't see the BMI cpu extension, and I'd be willing to bet that your gmp library (the library, not the extension) you've statically compiled requires BMI. I only say that because gmp (the library) makes use of BMI for bit operations and you've given a binary string as an example that makes it crash.
Maybe should you also report his issue upstream (to PHP) because the problem doesn't look to be in FrankenPHP sources, but more in GMP.
The php extension is just a wrapper around the C gmp functions. This is possibly even a GMP bug where without the BMI extensions (which suggests this is an old cpu since it doesn't even support avx2, which came out in 2013 along with bmi) it causes a crash. The code running here is probably barely tested or not tested at all on such old hardware.
In all honesty, you are probably better off using linked libraries on this hardware instead of statically compiled libraries.
https://github.com/crazywhalecc/static-php-cli/blob/dd647c53ec26687f7ef3b9f832768fc48312d5df/src/SPC/builder/unix/library/gmp.php#L16C1-L29C6
@dunglas @XternalSoft Perhaps the --disable-assembly option should be added here when building static-php, but I am not sure whether this patch can solve this problem, and the unknown impact on the performance of the gmp extension itself.
I suspect --enable-fat is the option we are looking for @crazywhalecc?
https://gmplib.org/manual/Build-Options#index-Fat-binary
I got the similar issue but only on a specific machine. However it works without issues when a laravel application is deployed directly on apache stack. Maybe a cpu indepent gmp version could be bundled?
Thread 6 "php-7" received signal SIGILL, Illegal instruction.
[Switching to LWP 31567]
0x0000768c59c874a0 in __gmpn_mul_1 ()
(gdb) bt
#0 0x0000768c59c874a0 in __gmpn_mul_1 ()
#1 0x0000768c59c8cf1e in __gmpn_bc_set_str ()
#2 0x0000768c59c84c9a in __gmpz_set_str ()
#3 0x0000768c5858aecc in convert_zstr_to_gmp (gmp_number=0x768c088ad8c0, val=0x41673bb0, base=0, arg_pos=1)
at /go/src/app/dist/static-php-cli/source/php-src/ext/gmp/gmp.c:673
#4 0x0000768c5858c3b1 in gmp_initialize_number (gmp_number=0x768c088ad8c0, arg_str=0x41673bb0, arg_l=0,
base=0) at /go/src/app/dist/static-php-cli/source/php-src/ext/gmp/gmp.c:960
#5 0x0000768c5858c988 in zif_gmp_init (execute_data=0x768c0a817d60, return_value=0x768c0a817d50)
at /go/src/app/dist/static-php-cli/source/php-src/ext/gmp/gmp.c:987
#6 0x0000768c58281935 in ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER ()
at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:1686
#7 execute_ex (ex=0x768c0a815020)
at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:58839
#8 0x0000768c5829e8b6 in zend_execute (op_array=0x768c0a86f000, return_value=0x0)
at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:64236
#9 0x0000768c583837e4 in zend_execute_script (type=8, retval=0x0, file_handle=0x768c0b3e1540)
at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend.c:1934
#10 0x0000768c58078249 in php_execute_script_ex (primary_file=0x768c0b3e1540, retval=0x0)
at /go/src/app/dist/static-php-cli/source/php-src/main/main.c:2591
#11 0x0000768c58078453 in php_execute_script (primary_file=0x768c0b3e1540)
at /go/src/app/dist/static-php-cli/source/php-src/main/main.c:2631
#12 0x0000768c57fd63c8 in frankenphp_execute_script (
file_name=0xc000715140 "/home/user/linux-client-franken/proj1/public/index.php")
at frankenphp.c:1024
#13 0x0000768c57fd601d in php_thread (arg=0x7) at frankenphp.c:898
--Type <RET> for more, q to quit, c to continue without paging--
#14 0x0000768c5910f8f6 in start (p=0x768c0b3e16f8) at src/thread/pthread_create.c:207
#15 0x0000768c59111101 in __clone () at src/thread/x86_64/clone.s:22
CPU:
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good acc_power nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb bpext ptsc mwaitx cpb hw_pstate ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 xsaveopt arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic vgif overflow_recov
Same here on old and not so old CPUs without BMI2 instructions.
Backtrace:
(gdb) bt
#0 0x000063c7fda72b96 in __gmpn_mul_1 ()
#1 0x000063c7fda6cad9 in __gmpz_mul_ui ()
#2 0x000063c7fc0c7e31 in ?? ()
#3 0x000063c7fc787e92 in execute_ex ()
#4 0x000063c7fc77da43 in zend_execute ()
#5 0x000063c7fc7ef95e in zend_execute_script ()
#6 0x000063c7fc66d948 in php_execute_script_ex ()
#7 0x000063c7fbddf7c1 in frankenphp_execute_script ()
#8 0x000063c7fbddf8c5 in ?? ()
#9 0x000073c33a8a81f5 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#10 0x000073c33a92889c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Disassemble (its mulx in gmp extension):
I managed to build somehow GNU version without mulx in GMP (built on self-hosted old cpu runner): https://github.com/deemru/frankenphp/releases/tag/v1.9.0-oldcpu-2
No more SIGILL in this build.
But the building process is so complicated, i do not think i can keep it up.
So please, make some changes to the original build process to support wider cpu range out-of-the-box.