Skip to content

Conversation

@pierredup
Copy link
Member

GMP causes illegal instruction errors on older CPU archs, so we can't reliable bundle the gmp extension (brick/math uses gmp if it's available and falls back to bcmath, so for all instances we will be using bcmath).

Reference: php/frankenphp#1346

Fixes: #1736, #1648

gdb dump:

Thread 2.17 "php-0" received signal SIGILL, Illegal instruction.
[Switching to LWP 110]
0x00007fffed6dd10f in __gmpn_mul_1 ()
(gdb) bt
#0  0x00007fffed6dd10f in __gmpn_mul_1 ()
#1  0x00007fffed6d5851 in __gmpz_mul ()
#2  0x00007fffec5f1199 in gmp_zval_binary_ui_op (return_value=return_value@entry=0x7fff9f4130c0, a_arg=<optimized out>, b_arg=0x7fff9f413190, 
    gmp_op=gmp_op@entry=0x7fffed6d5717 <__gmpz_mul>, gmp_ui_op=gmp_ui_op@entry=0x7fffed6d5d46 <__gmpz_mul_ui>, check_b_zero=check_b_zero@entry=false, is_operator=false)
    at /go/src/app/frankenphp/dist/static-php-cli/source/php-src/ext/gmp/gmp.c:816
#3  0x00007fffec5f46fd in _gmp_binary_ui_op (return_value=0x7fff9f4130c0, gmp_op=0x7fffed6d5717 <__gmpz_mul>, gmp_ui_op=0x7fffed6d5d46 <__gmpz_mul_ui>, check_b_zero=0, 
    execute_data=<optimized out>) at /go/src/app/frankenphp/dist/static-php-cli/source/php-src/ext/gmp/gmp.c:885
#4  0x00007fffec4d351a in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER () at /go/src/app/frankenphp/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:1337
#5  execute_ex (ex=<optimized out>) at /go/src/app/frankenphp/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:57246
#6  0x00007fffec4dd4cc in zend_execute (op_array=0x7fff9f460100, return_value=0x0) at /go/src/app/frankenphp/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:61634
#7  0x00007fffec479067 in zend_execute_scripts (type=type@entry=8, retval=retval@entry=0x0, file_count=file_count@entry=3)
    at /go/src/app/frankenphp/dist/static-php-cli/source/php-src/Zend/zend.c:1895
#8  0x00007fffec42e157 in php_execute_script (primary_file=0x7fff9ffdd540) at /go/src/app/frankenphp/dist/static-php-cli/source/php-src/main/main.c:2545
#9  0x00007fffec3ab8d2 in frankenphp_execute_script (file_name=0xc000883630 "/root/.SolidInvoice/app_b6b7b58fd7b8dc5a81a725becc17b512/public/index.php") at frankenphp.c:987
#10 0x00007fffec3ab4a8 in php_thread (arg=0x0) at frankenphp.c:858
#11 0x00007fffec9d5306 in start (p=0x7fff9ffdd6f8) at src/thread/pthread_create.c:207
#12 0x00007fffec9d6a16 in __clone () at src/thread/x86_64/clone.s:22
Backtrace stopped: frame did not save the PC

@pierredup pierredup added this to the 2.3.6 milestone May 23, 2025
@pierredup pierredup self-assigned this May 23, 2025
@pierredup pierredup added the bug label May 23, 2025
@codecov
Copy link

codecov bot commented May 23, 2025

Bundle Report

Changes will decrease total bundle size by 407.05kB (-5.1%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
solidinvoice-webpack-bundle-array-push 7.57MB -407.05kB (-5.1%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: solidinvoice-webpack-bundle-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
app.*.css -555 bytes 1.36MB -0.04%
email.*.css -152.22kB 504.16kB -23.19%
pdf.*.css -152.22kB 445.21kB -25.48%
648.*.js (New) 376.53kB 376.53kB 100.0% 🚀
145.*.css (New) 297.58kB 297.58kB 100.0% 🚀
runtime.*.js -1 bytes 3.21kB -0.03%
core.*.js 53 bytes 3.1kB 1.74%
core.*.css 311 bytes 1.33kB 30.43% ⚠️
355.*.js (Deleted) -446.4kB 0 bytes -100.0% 🗑️
847.*.css (Deleted) -330.13kB 0 bytes -100.0% 🗑️

@codecov
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.47%. Comparing base (59b40cf) to head (8b72277).
Report is 1 commits behind head on 2.3.x.

Additional details and impacted files
@@            Coverage Diff            @@
##              2.3.x    #1737   +/-   ##
=========================================
  Coverage     49.47%   49.47%           
  Complexity     2694     2694           
=========================================
  Files           494      494           
  Lines          9751     9751           
=========================================
  Hits           4824     4824           
  Misses         4927     4927           
Flag Coverage Δ
unittests 49.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pierredup pierredup merged commit 8663ddc into 2.3.x May 23, 2025
39 of 42 checks passed
@pierredup pierredup deleted the fix-crash branch May 23, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants