MagicStack / MagicStack/uvloop
Memory leak in uvloop and tornado
还没有人认领这个 Issue。
- 主要语言
- Cython
- 星标
- 11.9k
- 派生
- 615
- PR 合并指标
- 30 天内没有已合并 PR
描述
- uvloop version: 0.11.1
- Python version: 3.6.4
- Platform: Ubuntu 16.04 x64
- Can you reproduce the bug with
PYTHONASYNCIODEBUGin env?: This no effect
I have a platform to which mobile devices will constantly connect via TCP, about 20k per instance. After a few hours of work, memory consumption rises to 2 GB. We use tornado 5.0.1 as TCP server and install uvloop for loop for asyncio. I conducted one experiment using tracemalloc, when the devices are disconnected and then the memory leak is again connected in this code line , the number of objects and the total expanding. Can you help find what these objects are and how to remove this leak?

贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 Tornado 的 tornado/platform/asyncio.py 第 148 行附近开始,然后重现长时间运行的 TCP 连接场景,并使用 tracemalloc 检查对象增长情况。比较设备断开并重新连接时的内存行为;当通过可复现的测试或明确的诊断结果隔离出泄漏时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- backend, networking
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100