This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PR check "Check if generated files are up to date" failing intermittently
Type: Stage: resolved
Components: Build Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.snow Nosy List: Mark.Shannon, brandtbucher, christian.heimes, eric.snow
Priority: normal Keywords: patch

Created on 2022-03-28 16:50 by eric.snow, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 32162 merged eric.snow, 2022-03-28 20:27
PR 32206 merged eric.snow, 2022-03-31 00:26
PR 32218 merged eric.snow, 2022-03-31 18:17
Messages (13)
msg416193 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2022-03-28 16:50
The "Check if generated files are up to date" GitHub check for PRs has been failing recently.  It may also impact local usage of "make regen-all".

Example: https://github.com/python/cpython/runs/5719012664

This may be related to gh-32061.
msg416201 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2022-03-28 18:32
There's probably something racy with make.

See: https://github.com/python/cpython/runs/5712538599?check_suite_focus=true#step:10:1147
msg416211 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2022-03-28 20:56
New changeset 4c116f716bd1c174d6530b9a7a5ed3863927a109 by Eric Snow in branch 'main':
bpo-47146: Eliminate a race between make regen-deepfreeze and make regen-global-objects. (gh-32162)
https://github.com/python/cpython/commit/4c116f716bd1c174d6530b9a7a5ed3863927a109
msg416214 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2022-03-28 21:05
Looks like that fixed it, per https://github.com/python/cpython/pull/32134.
msg416379 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2022-03-30 16:11
Looks like this is still an intermittent problem:

* https://github.com/python/cpython/pull/32195
  + failed: https://github.com/python/cpython/runs/5756616733
  + failed: https://github.com/python/cpython/runs/5753267869
  + failed: https://github.com/python/cpython/runs/5757169625
* https://github.com/python/cpython/pull/32114
  + failed: https://github.com/python/cpython/runs/5756616733
  + passed: https://github.com/python/cpython/runs/5757213346
* https://github.com/python/cpython/pull/32186
  + failed: ...
  + passed: https://github.com/python/cpython/runs/5757178754


Per Mark Shannon (on discord):

The "Check if generated files are up to date" is still failing consistently. It looks like the makefile is missing a dependency on the ./Programs/_freeze_module for targets that require /Programs/_freeze_module
msg416396 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2022-03-30 20:00
The problem is likely a recursive make call "$(MAKE)" in combination with parallel execution. As far as I understand it, GNU make cannot track dependencies properly, which can lead to partial or invalid dependency graphs. One make process can modify a file while another uses the file. The permission error or ETXTBSY error are manifestation of one process creating an executable while another process is attempting to execve() it.

The paper https://accu.org/journals/overload/14/71/miller_2004/ explains the issues with recursion in great detail.
msg416410 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2022-03-31 01:24
New changeset db4dada5108dd49ebca23e4559a53630a2df8447 by Eric Snow in branch 'main':
bpo-47146: Avoid Using make Recursively (gh-32206)
https://github.com/python/cpython/commit/db4dada5108dd49ebca23e4559a53630a2df8447
msg416443 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2022-03-31 15:56
I re-ran jobs that had failed before I merged that gh-32206.  Several passed, but the following are still failing:

* https://github.com/python/cpython/pull/32188
   + https://github.com/python/cpython/runs/5773938424
* https://github.com/python/cpython/pull/32132
   + https://github.com/python/cpython/runs/5774054192
* https://github.com/python/cpython/pull/32177
   + https://github.com/python/cpython/runs/5773949869

Back to the drawing board...
msg416444 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2022-03-31 15:57
Brandt pointed out this is consistently reproducible locally:

   make clean regen-all -j

I'll get this sorted out today.
msg416454 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2022-03-31 20:30
New changeset e7bb7c2f047b4f97e4426c42ae209c969808069d by Eric Snow in branch 'main':
bpo-47146: Stop Depending On regen-deepfreeze For regen-global-objects (gh-32218)
https://github.com/python/cpython/commit/e7bb7c2f047b4f97e4426c42ae209c969808069d
msg416456 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2022-03-31 20:43
I'll keep an eye on PRs for the next day or so.
msg416457 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2022-03-31 20:44
Specifically: https://github.com/python/cpython/actions/workflows/build.yml.
msg416496 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2022-04-01 15:37
Looks like gh-32218 worked.
History
Date User Action Args
2022-04-11 14:59:57adminsetgithub: 91302
2022-04-01 15:37:10eric.snowsetstatus: open -> closed

messages: + msg416496
2022-03-31 20:44:39eric.snowsetstatus: pending -> open

messages: + msg416457
2022-03-31 20:43:51eric.snowsetstatus: open -> pending
resolution: fixed
messages: + msg416456

stage: patch review -> resolved
2022-03-31 20:30:01eric.snowsetmessages: + msg416454
2022-03-31 18:17:08eric.snowsetstage: needs patch -> patch review
pull_requests: + pull_request30294
2022-03-31 15:57:17eric.snowsetmessages: + msg416444
2022-03-31 15:56:20eric.snowsetmessages: + msg416443
stage: patch review -> needs patch
2022-03-31 01:24:14eric.snowsetmessages: + msg416410
2022-03-31 00:26:08eric.snowsetstage: needs patch -> patch review
pull_requests: + pull_request30281
2022-03-30 20:00:23christian.heimessetnosy: + christian.heimes
messages: + msg416396
2022-03-30 16:11:27eric.snowsetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg416379

stage: resolved -> needs patch
2022-03-28 21:05:59eric.snowsetstatus: open -> closed
resolution: fixed
messages: + msg416214

stage: patch review -> resolved
2022-03-28 20:56:15eric.snowsetmessages: + msg416211
2022-03-28 20:27:07eric.snowsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request30240
2022-03-28 18:32:44eric.snowsetmessages: + msg416201
2022-03-28 16:50:08eric.snowcreate