Ubuntu 22.04 python3-grpcio causes some apps to use 100% of the CPU
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grpc (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Hi!
After the latest Ubuntu release 22.04, we've realized that the package python3-grpcio 1.30.2-3build6 causes [0] opensnitch to use 100% of the CPU [1].
This problem has never occurred before, it has worked fine on previous versions, even with python3-grpcio 1.30.2-3 from 21.04.
If I install grpcio via pip, it works fine, with latest version 1.44.x (>= 1.16.x and <= 1.44.0).
I've tried to debug it (GRPC_VERBOSITY
On a normal execution grpc.server.start() is executed and the app continues with other tasks, but on this case it never passes start().
In fact, the basic example from the grpcio website doesn't work either, it also consumes 100% of the CPU: http://
I'm running out of ideas on how to debug this problem. Can someone help to identify the reason of this problem?
[0] - https:/
[1] - https:/
--
lsb_release -rd:
Description: Ubuntu 22.04 LTS
Release: 22.04
apt-cache policy python3-grpcio:
Candidate: 1.30.2-3build6
Version table:
1.30.2-3build6 500
--
Steps to reproduce the problem:
0. sudo apt install python3-grpcio
1. clone grpcio basic example ( http://
$ git clone -b v1.45.0 --depth 1 --shallow-
2. $ cd grpc/examples/
3. on one terminal: $python3 route_guide_
Observe that the script is taking up 100% of the CPU
4. On another terminal launch the client and observe that it does nothing: $ python3 route_guide_
The workaround installing grpcio via pip:
$ sudo apt install python3-pip
$ pip3 install --ignore-installed grpcio
$ python3 route_guide_
(open another terminal)
$ python3 route_guide_
Observe that now the client is able to connect to the server and the CPU is not at 100%
I get similar behavior with Warpinator (https:/ /github. com/linuxmint/ warpinator/ issues/ 127).
In this particular case, it causes a complete lock of the program.
Same symptom - 100% on a core. Using the pip grpcio version also resolves the issue.