Feng-Wuhui opened a new issue, #9721: URL: https://github.com/apache/skywalking/issues/9721
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues. ### Apache SkyWalking Component Python Agent (apache/skywalking-python) ### What happened When I start flask with gunicorn in a simple Demo,it has some error reponse from gRpc. sw-python -d run gunicorn -c gunicorn.conf wsgi:app -t 6000 the server reponse: grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "Bad file descriptor" debug_error_string = "UNKNOWN:Error received from peer ipv4:127.0.0.1:11800 {grpc_message:"Bad file descriptor", grpc_status:14, created_time:"2022-09-30T09:33:14.720434216+08:00"}" > skywalking [Thread-10] [DEBUG] grpc channel connectivity changed, [ChannelConnectivity.READY -> ChannelConnectivity.READY] skywalking [HeartbeatThread] [DEBUG] service heart beats, [Python Service Name], [d9ec6c84405f11ed9596525400140a66] skywalking [ReportThread] [ERROR] <_InactiveRpcError of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "Bad file descriptor" debug_error_string = "UNKNOWN:Error received from peer ipv4:127.0.0.1:11800 {grpc_message:"Bad file descriptor", grpc_status:14, created_time:"2022-09-30T09:33:14.720434216+08:00"}" > [mutex.cc : 2378] RAW: Check w->waitp->cv_word == nullptr failed: Mutex::Fer with pending CondVar queueing [2022-09-30 09:33:14 +0800] [3523147] [WARNING] Worker with pid 3523195 was terminated due to signal 6 skywalking [MainThread] [WARNING] fork() not currently supported with grpc protocol skywalking [HeartbeatThread] [DEBUG] service heart beats, [Python Service Name], [d9ec6c84405f11ed9596525400140a66] skywalking [QueryProfileCommandThread] [DEBUG] query profile commands Traceback (most recent call last): File "/apps/pyProject/venv/lib/python3.7/site-packages/apache_skywalking-0.8.0-py3.7.egg/skywalking/agent/protocol/grpc.py", line 82, in heartbeat self.service_management.send_heart_beat() File "/apps/pyProject/venv/lib/python3.7/site-packages/apache_skywalking-0.8.0-py3.7.egg/skywalking/client/grpc.py", line 65, in send_heart_beat serviceInstance=config.service_instance, File "/apps/pyProject/venv/lib/python3.7/site-packages/grpc/_channel.py", line 946, in __call__ return _end_unary_response_blocking(state, call, False, None) File "/apps/pyProject/venv/lib/python3.7/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking raise _InactiveRpcError(state) grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.INTERNAL details = "Received RST_STREAM with error code 5" debug_error_string = "UNKNOWN:Error received from peer ipv4:127.0.0.1:11800 {grpc_message:"Received RST_STREAM with error code 5", grpc_status:13, created_time:"2022-09-30T09:33:14.804700985+08:00"}" > skywalking [Thread-10] [DEBUG] grpc channel connectivity changed, [ChannelConnectivity.READY -> ChannelConnectivity.READY] [2022-09-30 09:33:14 +0800] [3523200] [INFO] Booting worker with pid: 3523200 skywalking [HeartbeatThread] [ERROR] <_InactiveRpcError of RPC that terminated with: status = StatusCode.INTERNAL details = "Received RST_STREAM with error code 5" debug_error_string = "UNKNOWN:Error received from peer ipv4:127.0.0.1:11800 {grpc_message:"Received RST_STREAM with error code 5", grpc_status:13, created_time:"2022-09-30T09:33:14.804700985+08:00"}" > and it sometimes can not collect the metrics to server, looks like some worker or thread push trace to server failed ### What you expected to happen I think the server will collect all the trace data and do not reponse grpc error ### How to reproduce create a simple project with flask + gunicorn,and start with sw-python, as : sw-python -d run gunicorn -c gunicorn.conf wsgi:app -t 6000 my gunicorn.conf data is: workers = 4 threads = 2 bind = '0.0.0.0:5050' proc_name = 'flaskSw' pidfile = '/apps/pyProject/flaskSwDemo/var/app.pid' limit_request_field_size = 0 limit_request_line = 0 ### Anything else when my linux server env is the same, the python agent sw-python can collect trace sometimes,but it also return a grpc error ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
