Comments (3)
Could you please gather a stack trace by following these steps: https://frankenphp.dev/docs/contributing/#debugging-segmentation-faults-with-static-builds
Also:
- FrankenPHP must be started from the project root with the command
frankenphp php-server -r public/
, not directly from thepublic/
directory (https://laravel.com/docs/11.x/deployment#frankenphp) - if you use Docker, prefer using the official images we provide (that contains a standard build, not a static binary) for better performance and stability
Anyway, the program shouldn't crash and I'm curious to see what's in the stack trace.
Thanks.
from frankenphp.
root@1d91b40d5097:/app/public# gdb --args ./frankenphp-linux-x86_64-debug php-server
GNU gdb (Debian 13.1-3) 13.1
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-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/>.
--Type <RET> for more, q to quit, c to continue without paging--c
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./frankenphp-linux-x86_64-debug...
warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /app/public/frankenphp-linux-x86_64-debug.
Use `info auto-load python-scripts [REGEXP]' to list them.
(gdb) c
The program is not being run.
(gdb) running
Undefined command: "running". Try "help".
(gdb) help
List of classes of commands:
aliases -- User-defined aliases of other commands.
breakpoints -- Making program stop at certain points.
data -- Examining data.
files -- Specifying and examining files.
internals -- Maintenance commands.
obscure -- Obscure features.
running -- Running the program.
stack -- Examining the stack.
status -- Status inquiries.
support -- Support facilities.
text-user-interface -- TUI is the GDB text based interface.
--Type <RET> for more, q to quit, c to continue without paging--r
tracepoints -- Tracing of program execution without stopping the program.
user-defined -- User-defined commands.
Type "help" followed by a class name for a list of commands in that class.
Type "help all" for the list of all commands.
Type "help" followed by command name for full documentation.
Type "apropos word" to search for commands related to "word".
Type "apropos -v word" for full documentation of commands related to "word".
Command name abbreviations are allowed if unambiguous.
(gdb) r
Starting program: /app/public/frankenphp-linux-x86_64-debug php-server
warning: Error disabling address space randomization: Operation not permitted
[New LWP 3669]
[New LWP 3670]
[New LWP 3671]
[New LWP 3672]
[New LWP 3673]
[New LWP 3674]
[New LWP 3675]
[New LWP 3676]
[New LWP 3677]
[New LWP 3678]
[New LWP 3679]
[New LWP 3680]
[New LWP 3681]
[New LWP 3682]
[New LWP 3683]
2024/09/03 06:43:03.566 WARN admin root@1d91b40d5097:/app/public# gdb --args ./frankenphp-linux-x86_64-debug php-server
GNU gdb (Debian 13.1-3) 13.1
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-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/>.
--Type <RET> for more, q to quit, c to continue without paging--c
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./frankenphp-linux-x86_64-debug...
warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /app/public/frankenphp-linux-x86_64-debug.
Use `info auto-load python-scripts [REGEXP]' to list them.
(gdb) r
Starting program: /app/public/frankenphp-linux-x86_64-debug php-server
warning: Error disabling address space randomization: Operation not permitted
[New LWP 3716]
[New LWP 3717]
[New LWP 3718]
[New LWP 3719]
[New LWP 3720]
[New LWP 3721]
[New LWP 3722]
[New LWP 3723]
[New LWP 3724]
[New LWP 3725]
[New LWP 3726]
[New LWP 3727]
[New LWP 3728]
[New LWP 3729]
2024/09/03 06:46:17.888 WARN admin admin endpoint disabled
2024/09/03 06:46:17.888 WARN http.auto_https server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server {"server_name": "php", "http_port": 80}
2024/09/03 06:46:17.888 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc000322780"}
2024/09/03 06:46:17.888 INFO http.log server running {"name": "php", "protocols": ["h1", "h2", "h3"]}
[New LWP 3730]
2024/09/03 06:46:17.888 INFO FrankenPHP started 🐘 {"php_version": "8.3.10", "num_threads": 12}
2024/09/03 06:46:17.888 INFO Caddy serving PHP app on :80
2024/09/03 06:46:17.891 INFO tls storage cleaning happened too recently; skipping for now {"storage": "FileStorage:/root/.local/share/caddy", "instance": "13ef7e5f-44fa-4c86-b41f-90143f886c84", "try_again": "2024/09/04 06:46:17.891", "try_again_in": 86399.99999973}
2024/09/03 06:46:17.891 INFO tls finished cleaning storage units
[New LWP 3731]
[New LWP 3732]
[New LWP 3733]
[New LWP 3734]
[New LWP 3735]
[New LWP 3736]
[New LWP 3737]
[New LWP 3738]
[New LWP 3739]
[New LWP 3740]
[New LWP 3741]
[New LWP 3742]
[New LWP 3743]
[New LWP 3744]
Thread 23 "php-6" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 3737]
get_meta (p=p@entry=0x14ca4eb45ad0 "AES-256-CBC") at src/malloc/mallocng/meta.h:141
141 src/malloc/mallocng/meta.h: No such file or directory.
(gdb) bt
#0 get_meta (p=p@entry=0x14ca4eb45ad0 "AES-256-CBC") at src/malloc/mallocng/meta.h:141
#1 0x000014caa52ae680 in __libc_free (p=0x14ca4eb45ad0) at src/malloc/mallocng/free.c:105
#2 0x000014caa4044d98 in EVP_CIPHER_CTX_reset ()
#3 0x000014caa35a3f77 in php_openssl_decrypt (
data=0x14ca4e3263d8 "\214\375\203Y\356\312\233\215\260\250x\233\224C\\0\006\332\336u\022\212u/\341/\307\360\257\313\253\362\034I\201\037I\325\376\357\001\206\233\230\264\030\036&6\364.\251\026z\316\261~\016.\322~\231>!re\020\205-\357\253\253\261\335\256\025\026\372\2063\301", data_len=96, method=0x14ca4e31a2e8 "aes-256-cbc", method_len=11,
password=0x14ca4e253d38 "\036\001\033\035G\203\037AD\207\215=?\337@UqGB\004\316\244[\200\211\213q\3259dO\330", password_len=32, options=0,
iv=0x14ca4e3257c0 "&\034\200\342\025q\037~\327\\\350\312\363Fi\360", iv_len=16, tag=0x14ca4f600268 "", tag_len=0, aad=0x14caa5a7f095 "", aad_len=0)
at /go/src/app/dist/static-php-cli/source/php-src/ext/openssl/openssl.c:7801
#4 0x000014caa35a4160 in zif_openssl_decrypt (execute_data=0x14ca4e2136e0, return_value=0x14ca4e2136c0) at /go/src/app/dist/static-php-cli/source/php-src/ext/openssl/openssl.c:7824
#5 0x000014caa33be9e7 in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER () at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:1337
#6 execute_ex (ex=0x14ca4e212020) at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:57216
#7 0x000014caa33dbd6f in zend_execute (op_array=0x14ca4e26a000, return_value=0x0) at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend_vm_execute.h:61604
--Type <RET> for more, q to quit, c to continue without paging--c
quit
#8 0x000014caa3247a1e in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /go/src/app/dist/static-php-cli/source/php-src/Zend/zend.c:1891
#9 0x000014caa3187b0f in php_execute_script (primary_file=0x14ca4eef9640) at /go/src/app/dist/static-php-cli/source/php-src/main/main.c:2544
#10 0x000014caa30f3fb9 in frankenphp_execute_script (file_name=0x0) at frankenphp.c:889
#11 0x000014caa30f1026 in _cgo_c733554f78bd_Cfunc_frankenphp_execute_script (v=0xc000097d80) at /tmp/go-build/cgo-gcc-prolog:55
#12 0x000014caa1ca8141 in runtime.asmcgocall () at /goroot/src/runtime/asm_amd64.s:918
#13 0x000000c00037e380 in ?? ()
#14 0x000014ca4eef97c0 in ?? ()
#15 0x000014caa317f5ab in ts_resource_ex (id=5322, th_id=0x0) at /go/src/app/dist/static-php-cli/source/php-src/TSRM/TSRM.c:499
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)
from frankenphp.
Thanks, this a known issue with OpenSSL: https://frankenphp.dev/docs/known-issues/#buggy-php-extensions
The PHP team is working on it: php/php-src#13648
This bug only affects static builds (because musl), so switching to the standard Docker images (that uses glibc) will fix it.
Closing as this is documented and tracked upstream.
from frankenphp.
Related Issues (20)
- [QUESTION] Is frankenphp can be use to pipelines ? HOT 6
- Missing space on webpage HOT 2
- Intermittent File Write Failures with fwrite HOT 3
- Invalid post type. error when I click on "POSTS" in teh Wordpress admin menu HOT 12
- Why do I constantly getting slower results with FrankenPHP vs php:8.3-fpm HOT 15
- Cannot rebuild static binary HOT 11
- ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF HOT 2
- 1.2.5 Not expanding (some?) Caddy's variables HOT 1
- Segmentation fault with php-vips (buffer)
- frankenphp is exiting on SIGPIPE failure HOT 3
- thrown in /app/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php HOT 2
- "No Active Transaction" Error After Reconnecting Database in Worker Mode HOT 1
- Question: how to build a standalone frankenphp binary with Caddy cache-handler HOT 3
- curl.cainfo setting from php.ini is being ignored and thus certs aren't available to cURL HOT 20
- Allow a way to define scripts to be run regularly or as a service HOT 2
- Question: about task scheduling in laravel HOT 1
- Deploying on render.com
- XDebug toggling optimizations HOT 4
- Error after build process HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frankenphp.