MemoryError after exceeding OpenMP/OpenBLAS thread limit
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reading _find_modules_with_dl_iterate_phdr in threadpoolctl.py, where the traceback reaches the MemoryError, and inspect how it discovers loaded native modules. Reproduce the failure after exceeding an OpenMP or OpenBLAS thread limit, then check whether the reported error can be recovered without rebooting. Done means the example in the issue runs successfully after recovery.
由索引模型根据 Issue 内容生成。
描述
Hello. I use threadpoolctl 2.2.0 which runs very well most of the time. However, after exceeding the OpenMP or OpenBLAS thread limit, threadpoolctl seems to have broken down. It does not recover even after the thread-limit-exceeding processes have been killed, or quite some time after that. The full error message of a simple example is shown below. Is there any way to reset threadpoolctl so it continues to function without having to reboot the computer?
Python 3.9.5 (default, Jun 4 2021, 12:28:51)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.24.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from threadpoolctl import threadpool_limits
...: with threadpool_limits(limits=1):
...: a=1
...:
---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
<ipython-input-1-2121fc2c928d> in <module>
1 from threadpoolctl import threadpool_limits
----> 2 with threadpool_limits(limits=1):
3 a=1
4
~/.local/lib/python3.9/site-packages/threadpoolctl.py in __init__(self, limits, user_api)
169 self._check_params(limits, user_api)
170
--> 171 self._original_info = self._set_threadpool_limits()
172
173 def __enter__(self):
~/.local/lib/python3.9/site-packages/threadpoolctl.py in _set_threadpool_limits(self)
266 return None
267
--> 268 modules = _ThreadpoolInfo(prefixes=self._prefixes,
269 user_api=self._user_api)
270 for module in modules:
~/.local/lib/python3.9/site-packages/threadpoolctl.py in __init__(self, user_api, prefixes, modules)
338
339 self.modules = []
--> 340 self._load_modules()
341 self._warn_if_incompatible_openmp()
342 else:
~/.local/lib/python3.9/site-packages/threadpoolctl.py in _load_modules(self)
373 self._find_modules_with_enum_process_module_ex()
374 else:
--> 375 self._find_modules_with_dl_iterate_phdr()
376
377 def _find_modules_with_dl_iterate_phdr(self):
~/.local/lib/python3.9/site-packages/threadpoolctl.py in _find_modules_with_dl_iterate_phdr(self)
404 ctypes.c_int, # Return type
405 ctypes.POINTER(_dl_phdr_info), ctypes.c_size_t, ctypes.c_char_p)
--> 406 c_match_module_callback = c_func_signature(match_module_callback)
407
408 data = ctypes.c_char_p(b"")
MemoryError:
- 主要语言
- Python
- 星标
- 434
- 派生
- 38
- 平均合并
- 2 天 14 小时
- 30 天内合并 PR
- 8
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
joblib/threadpoolctl 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
joblib/threadpoolctl#274 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
joblib/threadpoolctl#271 ·
维护者通常 1 天内回复
-
Make it possible to inspect active/spin wait behavior of LLVM/Intel OpenMP via `kmp_get_blocktime`未关闭
难度 3/5 1-2 天 新手友好度 42/100
joblib/threadpoolctl#270 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 22/100
joblib/threadpoolctl#261 · 3 条评论 ·
维护者通常 1 天内回复
-
Opt-in API that has a cached `ThreadpoolController`可能已有人在做 @itamarst 于 28 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
joblib/threadpoolctl#254 · 3 条评论 ·
维护者通常 1 天内回复
查看 joblib/threadpoolctl 的全部 Issue
相似的 Issue
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 78/100
yunaremaia/proto-drift#22 ·
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 82/100
yunaremaia/memwatch#96 ·
-
bug good first issue
难度 1/5 1 小时以内 新手友好度 91/100
yunaremaia/ci-gate-watch#34 ·
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 85/100
yunaremaia/agent-capability-attestation#64 ·
维护者通常 1 天内回复
-
bug good first issue
难度 1/5 1 小时以内 新手友好度 86/100
yunaremaia/agent-call-graph#43 ·
维护者通常 1 天内回复