-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A bug occurred in Swoole-v5.1.2, please report it #5324
Comments
RUN install-php-extensions pcntl sockets swoole pdo_mysql this command i installed swoole |
Do you have the xdebug extension? If so, try not using it and see. |
no, i dont use xdebug |
it's error only in 5.1.2, 5.1.1 works fine |
Same here, using Laravel, Octane, Swoole Image built using the following Dockerfile:
Trying to access the project with Octane & Swoole:
Additional info:
Can confirm it's working on v5.1.1 (previous build) |
@modrink I can not reproduce it, Is this a consistently reproducible scenario? |
We have Cloudflare & Traefik V3 in front, but I'll test more when I get the chance. I was not able to reproduce this locally (only on server with the proxy). But Swoole v5.1.1 works and OpenSwoole latest works as well. With Traefik the occurring errors are HTTP 499 and 502 |
Hi all, I'm afraid we have not yet had the time to fully make a reproducible case without sharing sensitive details, but I can confirm the issue is present in Swoole 5.1.2 and that reverting back to 5.1.1 solves the issue. We have tested setting up a clean Laravel project with Octane using Swoole 5.1.2 inside a docker image running from The NGINX config inside the image looks like this:
The problem actually occurs when we are running the requests through the Kubernetes Ingress Controller which is also using NGINX behind the scenes. After the first request is made through the Kubernetes Ingress Controller the Swoole service shuts down, after this we are also unable to reach the Swoole endpoint directly within the environment as well. I can concur with @modrink that the issue is that the client closes the connection (HTTP 499), so there seems to be something wrong with the implementation in the HTTP server that was introduced in 5.1.2 and that it's triggered mostly when using HTTP Proxies like NGNIX (with certain settings), Traefik and Cloudflare. As mentioned we have not yet been able to reproduce this in a way to share yet. |
@robinnydahl @modrink Perhaps some commits led to this issue.I'll take some time to test it. |
This happens to me as well. swoole 5.1.2 + xdebug 3.3.2 sandbox-sb.34i5g-swoole8.1 | [2024-05-17 13:07:00 #1.0] WARNING Server::check_worker_exit_status(): worker(pid=154, id=9) abnormal exit, status=0, signal=11 |
@linuxd3v Can you provide a simple script for reproducing the error? |
@linuxd3v I found that the max_nesting_level parameter of xdebug is set to 512. If a certain loop exceeds 512 times, a PHP Fatal error will be thrown, terminating the process. |
@NathanFreeman I've tried setting max_nesting_level to 50000 - but still seeing the same issue. |
@linuxd3v I don't have a good solution for xdebug. There are too many configurations for xdebug, unless you can find out through the logs which specific configuration is causing PHP to throw a fatal error. |
@error1001es @robinnydahl @modrink I can not reproduce it. |
@robinnydahl described the exact problem that we are facing with Swoole v5.1.2. I took some time to get the data you requested. Call stack:
It's worth noting that the trace doesn't always include frame 0. Sometimes it stops at It's also worth noting that instead of PHP 8.2, we're using the Our Dockerfile is based on this example Dockerfile: https://github.com/swoole/docker-swoole/blob/master/dockerfiles/5.1.2/php8.3/alpine/Dockerfile |
Same problem here. OS: Ubuntu Context description: I'm using the hyperf application binary to launch my server application, but the worker die when receiving a request from the browser. Apparently when I use an HTTP client it works normally After make a request in browser (The request seems to go into a loop and the logs show me this error message) The same request being done in HTTP Client (or curl) work fine |
@HallexCosta @lv2u @error1001es @robinnydahl @modrink |
@NathanFreeman confirmed the issue has been resolved with v5.1.3 btw the Swoole was serving the request fine directly but failed behind an LB or Nginx |
What error messages did you get? @salkhwlani |
@NathanFreeman |
Are you using xdebug, or can you check the stack output using valgrind? @salkhwlani |
No, I don't use Xdebug; the issue is resolved once I update the swoole from 5.1.2 to version v5.1.3 |
Confirming Swoole v5.1.3 fixes the issues described in this report. |
confirming swoole-5.1.3 fixes it! |
Sorry for taking so long to answer. Confirming swoole-5.1.3 fixes it! |
Please answer these questions before submitting your issue.
update swoole in docker php ext
all working
doesnt response laravel octane with swoole
php --ri swoole
)?it says 5.1.2
uname -a
&php -v
&gcc -v
) ?Linux 1baab60a7013 5.15.146.1-microsoft-standard-WSL2 编译出错 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 Linux
PHP 8.3.7 (cli) (built: May 10 2024 21:59:17) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.7, Copyright (c) Zend Technologies
/app $ gcc -v
/bin/sh: gcc: not found
[2024-05-12 09:13:10 #19.0] WARNING Server::check_worker_exit_status(): worker(pid=30, id=2) abnormal exit, status=0, signal=11
A bug occurred in Swoole-v5.1.2, please report it.
The Swoole developers probably don't know about it,
and unless you report it, chances are it won't be fixed.
You can read How to report a bug doc before submitting any bug reports:
OS: Linux 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64
GCC_VERSION: 13.2.1 20231014
OPENSSL_VERSION: OpenSSL 3.1.4 24 Oct 2023
PHP_VERSION : 8.3.7
The text was updated successfully, but these errors were encountered: