GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ``test_frame`` fails when running with `-R 3:3` argument · Issue #116098 · python/cpython

test_frame fails when running with -R 3:3 argument #116098

New issue
Copy link
New issue
Copy link
Closed
Closed
test_frame fails when running with -R 3:3 argument#116098
Copy link
Labels
3.13only security fixesonly security fixestestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@Eclips4
Eclips4
opened on Feb 29, 2024
Issue body actions

Bug report

Bug description:

./python.exe -m test -R 3:3 test_frame
Using random seed: 617081239
0:00:00 load avg: 38.69 Run 1 test sequentially
0:00:00 load avg: 38.69 [1/1] test_frame
beginning 6 repetitions. Showing number of leaks (. for 0 or less, X for 10 or more)
123:456
Xtest test_frame failed -- Traceback (most recent call last):
  File "/Users/admin/Projects/cpython/Lib/test/test_frame.py", line 353, in test_sneaky_frame_object
    self.assertIs(g.gi_frame, sneaky_frame_object)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: <frame at 0x1063d5020, file '/Users/admin/Projects/cpython/Lib/test/test_frame.py', line 318, code f> is not <frame at 0x10637b9b0, file '/Users/admin/Projects/cpython/Lib/test/test_frame.py', line 353, code test_sneaky_frame_object>

test_frame failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_frame

Total duration: 146 ms
Total tests: run=21 failures=1
Total test files: run=1/1 failed=1
Result: FAILURE

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

  • gh-116098: Revert "gh-107674: Improve performance of sys.settrace (GH-114986)" #116178
  • gh-116098: Clean up frame allocation code and remove the invalid sneaky frame test #116687

Activity

  1. Eclips4
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    testsTests in the Lib/test dirTests in the Lib/test dir
    3.13only security fixesonly security fixes
    on Feb 29, 2024
  2. Eclips4 commented on Feb 29, 2024

    @Eclips4
    Eclips4
    on Feb 29, 2024
    MemberAuthor
    More actions

    Bisected to 0a61e23
    cc @gaogaotiantian

  3. gaogaotiantian commented on Feb 29, 2024

    @gaogaotiantian
    gaogaotiantian
    on Feb 29, 2024
    Member
    More actions

    Okay it took me a while, but I don't believe this is a "bug" the commit brings - more like a very deligate(fragile) test is broken because it depends on some undocumented(undefined) behavior.

    I believe @brandtbucher is the author for the test. If I understand it correctly, the test requires a gc triggers in trace function - which is not guaranteed. Normally RESUME and INSTRUMENTED_RESUME triggers the gc, but RESUME_CHECK does not. I think it's intentional @markshannon ? The commit mentioned (correctly?) converts the RESUME instruction for trace to RESUME_CHECK which is not able to trigger gc anymore, thus fails the test.

    So we need to confirm a couple of things before fixing this:

    1. Should we fix the test, or the code?
    2. Is it reasonable for the test to require a gc in trace?
    3. Is it intentional that RESUME_CHECK does not trigger gc? Is that okay?
    4. Is it valid to have RESUME_CHECK for trace instead of RESUME or INSTRUMENTED_RESUME?
  4. gaogaotiantian commented on Feb 29, 2024

    @gaogaotiantian
    gaogaotiantian
    on Feb 29, 2024
    Member
    More actions

    If we need further discussion for this and can't come up with a fix today, I'll revert this commit by the end of today and wait for the final decision.

  5. encukou
    added a commit that references this issue on Mar 1, 2024

    gh-116098: Revert "gh-107674: Improve performance of `sys.settrace` (G…

    7895a61
  6. encukou commented on Mar 1, 2024

    @encukou
    encukou
    on Mar 1, 2024
    Member
    More actions

    Thank you for the revert.
    Sorry that it's your commit that got caught here. Reverting is a way to get the buildbots green so they can catch more issues, not a judgement of your work.

    Reacted by Carl Meyer
  7. gaogaotiantian commented on Mar 1, 2024

    @gaogaotiantian
    gaogaotiantian
    on Mar 1, 2024
    Member
    More actions

    I understand - it's important to keep the test clean otherwise the test lost its meaning. I'll work on the fix and hopefully we can come up with something and check it back in.

  8. woodruffw
    added a commit that references this issue on Mar 4, 2024

    pythongh-116098: Revert "pythongh-107674: Improve performance of `sys…

    7c194b9
  9. sthagen
    added a commit that references this issue on Mar 12, 2024

    pythonGH-116098: Remove dead frame object creation code (pythonGH-116687

    a53cc3f
  10. vstinner
    added a commit that references this issue on Mar 20, 2024

    pythonGH-116098: Remove dead frame object creation code (pythonGH-116687

    ccd58bf
  11. adorilson
    added 2 commits that reference this issue on Mar 25, 2024

    pythongh-116098: Revert "pythongh-107674: Improve performance of `sys…

    aabeaa5

    pythonGH-116098: Remove dead frame object creation code (pythonGH-116687

    5267e90
  12. diegorusso
    added 2 commits that reference this issue on Apr 17, 2024

    pythongh-116098: Revert "pythongh-107674: Improve performance of `sys…

    25aa06c

    pythonGH-116098: Remove dead frame object creation code (pythonGH-116687

    6be31cb
  13. Eclips4 commented on May 8, 2024

    @Eclips4
    Eclips4
    on May 8, 2024
    MemberAuthor
    More actions

    @gaogaotiantian can it be closed now?

  14. gaogaotiantian commented on May 8, 2024

    @gaogaotiantian
    gaogaotiantian
    on May 8, 2024
    Member
    More actions

    Yes. The root cause was that the test is not valid anymore and we removed the test.

    Reacted by Kirill Podoprigora
  15. Eclips4
    closed this as completedon May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13only security fixesonly security fixestestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.