Reproducibility: fastparquet and numexpr build two different .so files on 3.15 linux-x86_64

Aperta
#51 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker, github-actions, linux, python, shell

Direzione di ricerca

Start by reproducing one pair locally: run scripts/container_build.sh twice for fastparquet or numexpr on 3.15 linux-x86_64 and compare the two .so files with diffoscope, readelf -n and objdump -d. Then read run_build() and build_env() in scripts/gap_wheels.py, which set SOURCE_DATE_EPOCH and PYTHONHASHSEED. Done when the differing section and bytes are written in the issue, and a fix in build_env() is covered by a test in tests/test_gap_wheels.py.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug help wanted

A wheel is published only if two separate builds of it are byte-identical. In the batch of 2026-11-20 (run 44831141560), two packages failed that on one target only:

| fastparquet | 2026.9.0 | 3.15 linux-x86_64 | the two builds differ, in `fastparquet-2026.9.0.dist-info/RECORD`, `fastparquet/speedups.cpython-315-x86_64-linux-gnu.so` |
| numexpr | 2.14.2 | 3.15 linux-x86_64 | the two builds differ, in `numexpr-2.14.2.dist-info/RECORD`, `numexpr/interpreter.cpython-315-x86_64-linux-gnu.so` |

The same two packages verified on 3.15 win-amd64 in the same batch (and fastparquet on 3.14 win-arm64). RECORD differs only because it holds the .so's hash. So in each case exactly one compiled file differs, on Linux, on Python 3.15. Eight other compiled packages matched on the same target in the same batch: zstandard, thrift, tree-sitter, lz4, orjson, pyclipper, clickhouse-driver and scikit-image. scikit-image builds against NumPy's headers too, so NumPy alone doesn't explain it.

Both builds use the same pinned image, the same locked build tools, a fixed unpack path and SOURCE_DATE_EPOCH, so what's left is something inside the compile or link: an embedded path or timestamp, the order of objects on the link line (a parallel build), a random symbol or section name, a build ID computed over something unstable, or generated Cython/C++ code that differs between runs.

Until this is found, neither package can have a Linux 3.15 wheel here, and any package with the same cause fails the same way.

Where

  • scripts/gap_wheels.py: run_build() (the build), build_env() (the environment: SOURCE_DATE_EPOCH, PYTHONHASHSEED=0), verify() and differing() (the comparison).
  • scripts/container_build.sh and .github/workflows/gap-wheel-build.yml: how a pair is built in the image.

What to do

  • First step: find what differs. Build one of the two twice (run gap-wheel-build.yml in your fork for the pair, or run the pinned image locally with scripts/container_build.sh), keep both wheels, and compare the two .so files: diffoscope a.so b.so, or by hand with readelf -S, readelf -n (the build ID), objdump -d on the section that differs, and strings. Post what you find in this issue before changing anything: which section, and what the differing bytes are.
  • Check whether it's one cause for both packages. If it's two, say so here and a maintainer will split the issue.
  • Then propose the smallest fix in the pipeline, not in the package: an environment variable in build_env() (for example a fixed -ffile-prefix-map/-frandom-seed through CFLAGS, MAKEFLAGS=-j1, a fixed CYTHON_CACHE_DIR), or a fixed linker flag. A variable added there applies to every build, so say what else it changes. If the cause is in the package's own build (a timestamp it writes into a generated file), the fix belongs upstream: open an issue there, link it here, and leave the pair unpublished.
  • Add the cause to the README's threat-model or "How a wheel gets here" text only if the fix changes what the pipeline pins.

Done when:

  • The differing bytes are identified and written down in this issue.
  • If a pipeline fix is right: with it, two builds of both pairs in a fork give equal sha256s (the PR links the four runs), and a pair that verified before (say zstandard on the same target) still gives the sha256 it has in data/gap-wheels.json, or the PR says why it changed.
  • A test in tests/test_gap_wheels.py pins any new variable in build_env().
  • uvx --python 3.14 [email protected] passes, offline.
Lingua principale
Python
Stelle
0
Fork
1
Merge medio
5h 59m
PR unite (30g)
19

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wheelgap/wheels

Tutte le issue di wheelgap/wheels

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.