Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR check "Check if generated files are up to date" failing intermittently #91302

Closed
ericsnowcurrently opened this issue Mar 28, 2022 · 13 comments
Assignees
Labels
3.11 only security fixes build The build process and cross-build

Comments

@ericsnowcurrently
Copy link
Member

BPO 47146
Nosy @tiran, @markshannon, @ericsnowcurrently, @brandtbucher
PRs
  • bpo-47146: Eliminate a Race Between make regen-deepfreeze and make regen-global-objects #32162
  • bpo-47146: Avoid Using make Recursively #32206
  • bpo-47146: Stop Depending On regen-deepfreeze For regen-global-objects #32218
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/ericsnowcurrently'
    closed_at = <Date 2022-04-01.15:37:10.755>
    created_at = <Date 2022-03-28.16:50:08.590>
    labels = ['build', '3.11']
    title = 'PR check "Check if generated files are up to date" failing intermittently'
    updated_at = <Date 2022-04-01.15:37:10.755>
    user = 'https://github.com/ericsnowcurrently'

    bugs.python.org fields:

    activity = <Date 2022-04-01.15:37:10.755>
    actor = 'eric.snow'
    assignee = 'eric.snow'
    closed = True
    closed_date = <Date 2022-04-01.15:37:10.755>
    closer = 'eric.snow'
    components = ['Build']
    creation = <Date 2022-03-28.16:50:08.590>
    creator = 'eric.snow'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 47146
    keywords = ['patch']
    message_count = 13.0
    messages = ['416193', '416201', '416211', '416214', '416379', '416396', '416410', '416443', '416444', '416454', '416456', '416457', '416496']
    nosy_count = 4.0
    nosy_names = ['christian.heimes', 'Mark.Shannon', 'eric.snow', 'brandtbucher']
    pr_nums = ['32162', '32206', '32218']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue47146'
    versions = ['Python 3.11']

    @ericsnowcurrently
    Copy link
    Member Author

    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 #76242.

    @ericsnowcurrently ericsnowcurrently added the 3.11 only security fixes label Mar 28, 2022
    @ericsnowcurrently ericsnowcurrently self-assigned this Mar 28, 2022
    @ericsnowcurrently ericsnowcurrently added build The build process and cross-build 3.11 only security fixes labels Mar 28, 2022
    @ericsnowcurrently ericsnowcurrently self-assigned this Mar 28, 2022
    @ericsnowcurrently ericsnowcurrently added the build The build process and cross-build label Mar 28, 2022
    @ericsnowcurrently
    Copy link
    Member Author

    There's probably something racy with make.

    See: https://github.com/python/cpython/runs/5712538599?check_suite_focus=true#step:10:1147

    @ericsnowcurrently
    Copy link
    Member Author

    New changeset 4c116f7 by Eric Snow in branch 'main':
    bpo-47146: Eliminate a race between make regen-deepfreeze and make regen-global-objects. (gh-32162)
    4c116f7

    @ericsnowcurrently
    Copy link
    Member Author

    Looks like that fixed it, per #32134.

    @ericsnowcurrently
    Copy link
    Member Author

    Looks like this is still an intermittent problem:

    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

    @tiran
    Copy link
    Member

    tiran commented Mar 30, 2022

    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.

    @ericsnowcurrently
    Copy link
    Member Author

    New changeset db4dada by Eric Snow in branch 'main':
    bpo-47146: Avoid Using make Recursively (gh-32206)
    db4dada

    @ericsnowcurrently
    Copy link
    Member Author

    Brandt pointed out this is consistently reproducible locally:

    make clean regen-all -j

    I'll get this sorted out today.

    @ericsnowcurrently
    Copy link
    Member Author

    New changeset e7bb7c2 by Eric Snow in branch 'main':
    bpo-47146: Stop Depending On regen-deepfreeze For regen-global-objects (gh-32218)
    e7bb7c2

    @ericsnowcurrently
    Copy link
    Member Author

    I'll keep an eye on PRs for the next day or so.

    @ericsnowcurrently
    Copy link
    Member Author

    @ericsnowcurrently
    Copy link
    Member Author

    Looks like #76399 worked.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes build The build process and cross-build
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants