tranport.get_extra_info('peername') occasionally returns None
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- python
- 領域
- networking
研究方向
首先在 Linux 上重現 uvloop 0.17.0、Python 3.11.4 的案例,並追蹤報告中所示的 accept/getpeername 行為。接著檢視連結的 libuv issue #3339;確認原因,並在採取可執行的修正或解決相依性後驗證 peername 行為,即視為完成。
由索引模型根據 Issue 內容生成。
描述
uvloop version: 0.17.0
Python version: 3.11.4
Platform: Linux
I believe the root cause of this issue is that:
- libuv doesn't retrieve peer address while calling
accept() getpeername()fails if the client disconnected already (which is unlikely, but possible)
Here's strace log:
561904 setsockopt(19, SOL_TCP, TCP_NODELAY, [1], 4) = 0
561904 accept4(18, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable)
561904 getsockname(19, {sa_family=AF_INET, sin_port=htons(32111), sin_addr=inet_addr("127.0.0.1")}, [128 => 16]) = 0
561904 getpeername(19, {sa_family=AF_INET, sin_port=htons(39898), sin_addr=inet_addr("127.0.0.1")}, [128 => 16]) = 0
561904 getpid() = 561904
Please note, that standard asyncio loop uses accept4() call to get the peer address:
564955 accept4(13, {sa_family=AF_INET, sin_port=htons(35516), sin_addr=inet_addr("127.0.0.1")}, [16], SOCK_CLOEXEC) = 16
564955 getsockname(16, {sa_family=AF_INET, sin_port=htons(32111), sin_addr=inet_addr("127.0.0.1")}, [128 => 16]) = 0
564955 ioctl(16, FIONBIO, [1]) = 0
Said that, there's an issue raised in libuv repo which should be addressed first, I suppose: https://github.com/libuv/libuv/issues/3339
- 主要語言
- Cython
- 星號
- 11.9k
- 分支
- 615
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
MagicStack/uvloop 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
MagicStack/uvloop#759 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
MagicStack/uvloop#741 · 2 個 reaction ·
-
難度 2/5 1-3 小時 新手友好度 68/100
MagicStack/uvloop#702 · 8 則留言 · 9 個 reaction ·
-
難度 4/5 3-5 天 新手友好度 25/100
MagicStack/uvloop#766 ·
-
難度 4/5 3-5 天 新手友好度 52/100
MagicStack/uvloop#765 ·
查看 MagicStack/uvloop 的全部 Issue
相似的 Issue
-
Nmap
難度 1/5 1 小時以內 新手友好度 85/100
-
good first issue
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
n0-computer/iroh#4550 ·
-
kind/bug Ubuntu 24
難度 2/5 1-3 小時 新手友好度 75/100
kubernetes-sigs/kubespray#13550 ·
-
難度 2/5 1-3 小時 新手友好度 70/100
bytecodealliance/rustix#1689 · 2 則留言 ·