python / python/cpython

possible race-condition with python-doc

未关闭
#130,979 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

docs type-bug
主要语言
Python
星标
77.2k
派生
35.9k
PR 合并指标
PR 指标待抓取

描述

Bug report

Bug description:

While working on reproducible builds for openSUSE, I found that our python314 (and python311) doc sub-packages produce different html on 1-core-VMs and 4-core-VMs. This suggests that there is some race going on about what the correct content should be.

https://rb.zq1.de/other/python314-doc-compare.out has a diff

The interesting bit of it is

-<p class="audit-hook" id="audit_event_cpython_run_stdin_1">
+<p class="audit-hook" id="audit_event_cpython_run_stdin_2">
How to Reproduce

To test on openSUSE or Debian, use

osc checkout openSUSE:Factory/python314 && cd $_
for N in 1 14 ; do
    osc build -M=doc --noservice --clean --vm-type=kvm -j$N --release=1.1 --keep-pkg=RPMS.$N standard
    (cd RPMS.$N && unrpm python314-doc-3*.x86_64.rpm)
done
diff -ru RPMS.{1,14}/usr/
Environment Information
OS: openSUSE Tumbleweed 20250302
Sphinx-8.1.3
Sphinx extensions

Additional context

This bug was found while working on reproducible builds for openSUSE.

This was originally filed in https://github.com/sphinx-doc/sphinx/issues/13419 but apparently the Sphinx people think this is an issue in cpython.

CPython versions tested on:

3.11, 3.14, 3.13, 3.12

Operating systems tested on:

Linux

Linked PRs
  • gh-136165

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先使用 -j1 和 -j14 运行有文档记录的 openSUSE 构建循环,然后比较提取出的 usr/ 树和报告的 audit-hook ID。将链接的 PR gh-136165 和可复现构建 diff 作为上下文;当无论并行度如何,重复的文档构建都生成完全相同的 HTML 时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
documentation
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。