This issue is highly intermittent, occurs only very rarely, and extremely hard to reproduce consistently.
To get to the point of being able to trace a stuck process, I had to wait several hours after starting a service on a busy production server.
Even though it has the saving grace of releasing the GIL, any package which is susceptible to getting unpredictably trapped inside a C function call is a concern, especially due to the increasing uptake of asyncio, and the 'achilles heel' of asyncio event loops being vulnerable to blocking C calls.
On rare occasions, I'm seeing calls to
Channel.query()
blocking indefinitely, never returning.pycares version
4.2.1
.A partial py-spy trace which illustrates this is:
This issue is highly intermittent, occurs only very rarely, and extremely hard to reproduce consistently.
To get to the point of being able to trace a stuck process, I had to wait several hours after starting a service on a busy production server.
Even though it has the saving grace of releasing the GIL, any package which is susceptible to getting unpredictably trapped inside a C function call is a concern, especially due to the increasing uptake of asyncio, and the 'achilles heel' of asyncio event loops being vulnerable to blocking C calls.
Any advice here would be most welcome.