Image generated by [ChatGPT](https://chatgpt.com/)

SystemExit Hangs asyncio.run_coroutine_threadsafe

Today, while debugging an issue with Ray, I encountered a problem because I did not notice the special behavior of Python’s asyncio.run_coroutine_threadsafe. The official documentation does not explicitly mention it; you have to look at the CPython source code to understand what is happening, which led to a long debugging session. I am documenting this issue here. According to the official documentation , this function is used to run a coroutine in an event loop on another thread, and it returns a Future object. ...

Posted on: 2025-03-05 · Edited on: 2025-03-18 · Chi-Sheng Liu
Photo by [Kent Pilcher](https://unsplash.com/@kent_pilcher?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash) on [Unsplash](https://unsplash.com/photos/black-instrument-cluster-panel-jW8hkB_Qmj8?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash)

How to Reproduce Kubernetes Node-pressure Eviction via K3d

Background A few days ago, while developing the KubeRay project, I learned about a Kubernetes behavior from the issue’s comment section . There are two types of Eviction: Node-pressure Eviction and API-initiated Eviction . API-initiated Eviction is done by directly calling the API or using commands like kubectl drain. Pods evicted this way will ultimately be deleted and usually recreated on another node. However, for Node-pressure Eviction, kubelet will only set the Pod’s Phase to Failed without deleting it. Therefore, if the controller does not handle it properly, the Pod will not be recreated on another node. ...

Posted on: 2024-07-05 · Edited on: 2024-08-31 · Chi-Sheng Liu