ipython / ipython/ipykernel

Exception on ipc file cleanup resulting in socket leak

未關閉
#730 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
734
分支
412
平均合併
1 天 5 小時
30 天內合併 PR
8

描述

Running an ipython kernel with `--transport=ipc` and stopping it (via sending an `quit` command though a jupyter-client), generates the following exception:

```
Traceback (most recent call last):
File "/home/amorenoz/.local/share/virtualenvs/insights-cmd-nQG3uYIv/lib/python3.9/site-packages/ipykernel/kernelapp.py", line 242, in cleanup_connection_file
self.cleanup_ipc_files()
File "/home/amorenoz/.local/share/virtualenvs/insights-cmd-nQG3uYIv/lib/python3.9/site-packages/jupyter_client/connect.py", line 426, in cleanup_ipc_files
for port in self.ports:
TypeError: %i format: a number is required, not str
```

The socket files are not cleaned up and leaked

貢獻指南

開啟貢獻指南

研究方向

Start in ipykernel/kernelapp.py at cleanup_connection_file and follow its call to cleanup_ipc_files in jupyter_client/connect.py. Reproduce an IPython kernel using --transport=ipc, stop it through jupyter-client, and inspect the port values involved. Done means shutdown completes without the TypeError and the IPC socket files are removed.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
backend
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。