NotImplementedError raised on Linux AArch64 for multiprocessing qsize()
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- linux, python
调研方向
先检查 configure.ac 中对 sem_getvalue 的构建时检查以及 multiprocessing/queues.py 中 qsize 的实现,然后使用提供的脚本在 Linux AArch64 上复现该故障。追踪此构建引发 NotImplementedError 的原因,并验证对于受影响的 Python 构建,qsize() 会返回队列大小。
由索引模型根据 Issue 内容生成。
描述
Solution to issue cannot be found in the documentation.
- I checked the documentation.
Issue
As noted on https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Queue.qsize, sem_getvalue isn't implemented on certain platforms but should work on AArch64 Linux.
This is checked at build time here:
https://github.com/python/cpython/blob/0d582def34babca7417ece8a9e4e16cc2a752d44/configure.ac#L6178
Using the default Python interpreter on Ubuntu this error doesn't appear. There's an ancient fix here: https://bugs.launchpad.net/bugs/630511
Reproducer:
import multiprocessing
queue = multiprocessing.Queue()
print(queue.qsize())
With Ubuntu Python:
$ /usr/bin/python3.10 ~/repo.py
0
With conda-forge Python (tested with both 3.10 and 3.13):
$ /opt/conda/envs/py_3.13/bin/python ~/repo.py
Traceback (most recent call last):
File "/var/lib/jenkins/repo.py", line 5, in <module>
print(queue.qsize())
~~~~~~~~~~~^^
File "/opt/conda/envs/py_3.13/lib/python3.13/multiprocessing/queues.py", line 124, in qsize
return self._maxsize - self._sem._semlock._get_value()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
NotImplementedError
Installed packages
# packages in environment at /opt/conda/envs/py_3.13:
#
# Name Version Build Channel
_openmp_mutex 4.5 2_gnu
bzip2 1.0.8 h68df207_7
ca-certificates 2025.6.15 hbd8a1cb_0
ld_impl_linux-aarch64 2.43 h5e2c951_5
libexpat 2.7.0 h5ad3122_0
libffi 3.4.6 he21f813_1
libgcc 15.1.0 he277a41_2
libgcc-ng 15.1.0 he9431aa_2
libgomp 15.1.0 he277a41_2
liblzma 5.8.1 h86ecc28_2
libmpdec 4.0.0 h86ecc28_0
libsqlite 3.50.1 h5eb1b54_0
libuuid 2.38.1 hb4cce97_0
libzlib 1.3.1 h86ecc28_2
ncurses 6.5 ha32ae93_3
openssl 3.5.0 hd08dc88_1
pip 25.1.1 pyh145f28c_0
python 3.13.5 h2382df9_102_cp313
python_abi 3.13 7_cp313
readline 8.2 h8382b9d_2
tk 8.6.13 noxft_h5688188_102
tzdata 2025b h78e105d_0
Environment info
active environment : py_3.13
active env location : /opt/conda/envs/py_3.13
shell level : 2
user config file : /var/lib/jenkins/.condarc
populated config files : /opt/conda/.condarc
conda version : 25.3.0
conda-build version : not installed
python version : 3.12.10.final.0
solver : libmamba (default)
virtual packages : __archspec=1=aarch64
__conda=25.3.0=0
__glibc=2.35=0
__linux=6.8.0=0
__unix=0=0
base environment : /opt/conda (writable)
conda av data dir : /opt/conda/etc/conda
conda av metadata url : None
channel URLs : https://artifactory.arm.com/artifactory/api/conda/mirrors.conda-forge/linux-aarch64
https://artifactory.arm.com/artifactory/api/conda/mirrors.conda-forge/noarch
package cache : /opt/conda/pkgs
/var/lib/jenkins/.conda/pkgs
envs directories : /opt/conda/envs
/var/lib/jenkins/.conda/envs
platform : linux-aarch64
user-agent : conda/25.3.0 requests/2.32.3 CPython/3.12.10 Linux/6.8.0-50-generic ubuntu/22.04.5 glibc/2.35 solver/libmamba conda-libmamba-solver/25.3.0 libmambapy/2.1.1
UID:GID : 1000:1000
netrc file : None
offline mode : False
- 主要语言
- Shell
- 星标
- 47
- 派生
- 112
- 平均合并
- 1 天 37 分钟
- 30 天内合并 PR
- 15
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
conda-forge/python-feedstock 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 48/100
conda-forge/python-feedstock#929 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
conda-forge/python-feedstock#903 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
conda-forge/python-feedstock#880 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 58/100
conda-forge/python-feedstock#879 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 38/100
conda-forge/python-feedstock#867 · 4 条评论 ·
维护者通常 1 天内回复
查看 conda-forge/python-feedstock 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 67/100
-
难度 2/5 1-3 小时 新手友好度 72/100
pearu/agent-sandbox#156 ·
维护者通常 1 天内回复
-
area/documentation squad/marvin
难度 1/5 1 小时以内 新手友好度 90/100
rancher/stackstate-product-docs#443 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
getumbrel/umbrel-apps#6142 ·
维护者通常 2 天内回复
-
triage/confirmed
难度 2/5 1-3 小时 新手友好度 78/100
agentscope-ai/agentscope#3030 ·
维护者通常 1 天内回复