python / python/cpython

possible race-condition with python-doc

Open
#130,979 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the documented openSUSE build loop with -j1 and -j14, then compare the extracted usr/ trees and the reported audit-hook IDs. Use the linked PR gh-136165 and the reproducible-build diff as context; done means repeated documentation builds produce identical HTML regardless of parallelism.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.