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_traceback: test_import_from_error_bad_suggestions_do_not_trigger_for_small_names() fails randomly on "wasm32-emscripten node (dynamic linking)" buildbot · Issue #99894 · python/cpython

test_traceback: test_import_from_error_bad_suggestions_do_not_trigger_for_small_names() fails randomly on "wasm32-emscripten node (dynamic linking)" buildbot #99894

New issue
Copy link
New issue
Copy link
Closed
Closed
test_traceback: test_import_from_error_bad_suggestions_do_not_trigger_for_small_names() fails randomly on "wasm32-emscripten node (dynamic linking)" buildbot#99894
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@vstinner
vstinner
opened on Nov 30, 2022
Issue body actions

test_traceback: test_import_from_error_bad_suggestions_do_not_trigger_for_small_names() fails randomly on the "wasm32-emscripten node (dynamic linking)" buildbot worker.

Example: https://buildbot.python.org/all/#/builders/1056/builds/928

FAIL: test_import_from_error_bad_suggestions_do_not_trigger_for_small_names (test.test_traceback.CPythonSuggestionFormattingTests.test_import_from_error_bad_suggestions_do_not_trigger_for_small_names) (name='b')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/buildbot/bcannon-wasm/3.x.bcannon-wasm.emscripten-node-dl/build/Lib/test/test_traceback.py", line 3173, in test_import_from_error_bad_suggestions_do_not_trigger_for_small_names
    self.assertNotIn("mom", actual)
AssertionError: 'mom' unexpectedly found in "ImportError: cannot import name 'b' from 'IMwPxQRPpcEcmomu' (/tmp/tmpanzezi5a/IMwPxQRPpcEcmomu.py)"

cc @brettcannon @tiran @pablogsal

Linked PRs

  • gh-99894: Ensure the local names don't collide with the test file in traceback suggestion error checking #99895

Activity

  1. vstinner
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Nov 30, 2022
  2. vstinner commented on Nov 30, 2022

    @vstinner
    vstinner
    on Nov 30, 2022
    MemberAuthor
    More actions

    Other failures:

    • 6 days ago: s390x RHEL7 LTO 3.x: https://buildbot.python.org/all/#/builders/402/builds/3434
    • 6 days ago: wasm32-wasi 3.x: https://buildbot.python.org/all/#builders/1046/builds/954
    • 16 days ago: PPC64LE Fedora Stable 3.x: https://buildbot.python.org/all/#/builders/90/builds/2415
    • 1 month ago: wasm32-emscripten node (pthreads) 3.x: https://buildbot.python.org/all/#builders/1050/builds/720
  3. pablogsal commented on Nov 30, 2022

    @pablogsal
    pablogsal
    on Nov 30, 2022
    Member
    More actions

    On it

  4. pablogsal
    added a commit that references this issue on Nov 30, 2022

    pythongh-99894: Ensure the local names don't collide with the test fi…

    5612e56
  5. vstinner commented on Nov 30, 2022

    @vstinner
    vstinner
    on Nov 30, 2022
    MemberAuthor
    More actions

    I'm able to reproduce the issue on my x86-64 Fedora 37:

    $ ./python -m test test_traceback -j20 -F -m test_import_from_error_bad_suggestions_do_not_trigger_for_small_names -v
    (...)
    0:00:08 load avg: 22.67 [ 56/1] test_traceback failed (1 failure)
    test_import_from_error_bad_suggestions_do_not_trigger_for_small_names (test.test_traceback.CPythonSuggestionFormattingTests.test_import_from_error_bad_suggestions_do_not_trigger_for_small_names) ... 
      test_import_from_error_bad_suggestions_do_not_trigger_for_small_names (test.test_traceback.CPythonSuggestionFormattingTests.test_import_from_error_bad_suggestions_do_not_trigger_for_small_names) (name='py') ... FAIL
    test_import_from_error_bad_suggestions_do_not_trigger_for_small_names (test.test_traceback.PurePythonSuggestionFormattingTests.test_import_from_error_bad_suggestions_do_not_trigger_for_small_names) ... ok
    
    ======================================================================
    FAIL: test_import_from_error_bad_suggestions_do_not_trigger_for_small_names (test.test_traceback.CPythonSuggestionFormattingTests.test_import_from_error_bad_suggestions_do_not_trigger_for_small_names) (name='py')
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/vstinner/python/main/Lib/test/test_traceback.py", line 3173, in test_import_from_error_bad_suggestions_do_not_trigger_for_small_names
        self.assertNotIn("mom", actual)
    AssertionError: 'mom' unexpectedly found in "ImportError: cannot import name 'py' from 'bGamirGQRkOmsncE' (/tmp/test_python_f0fe4pnw/tmpzmomru6k/bGamirGQRkOmsncE.py)"
    
    ----------------------------------------------------------------------
    Ran 2 tests in 0.273s
    (...)
    Total duration: 9.0 sec
    Tests result: FAILURE
    

    EDIT: Oh I forgot that to trigger the bug, I had to stress my machine by running ./python -m test -j4 -F in a different terminal. My laptop has 6 CPU cores (12 threads).

  6. pablogsal commented on Nov 30, 2022

    @pablogsal
    pablogsal
    on Nov 30, 2022
    Member
    More actions

    I made a PR for this

  7. vstinner commented on Nov 30, 2022

    @vstinner
    vstinner
    on Nov 30, 2022
    MemberAuthor
    More actions

    LoooooooL, I think that I understood the issue 😄 Funny one.

  8. vstinner commented on Nov 30, 2022

    @vstinner
    vstinner
    on Nov 30, 2022
    MemberAuthor
    More actions

    On main, I can reproduce the issue quickly with commands that I gave in a previous comment:

    • 9 seconds: 'mom' unexpectedly found
    • 24 seconds: 'vvv' unexpectedly found
    • 10 seconds: 'vvv' unexpectedly found
    • 1 min 17 sec: 'mom' unexpectedly found
  9. pablogsal
    added a commit that references this issue on Nov 30, 2022

    fixup! pythongh-99894: Ensure the local names don't collide with the …

    d159ac5
  10. vstinner
    added a commit that references this issue on Dec 1, 2022

    gh-99894: Ensure the local names don't collide with the test file in …

    0563be2
  11. vstinner commented on Dec 1, 2022

    @vstinner
    vstinner
    on Dec 1, 2022
    MemberAuthor
    More actions

    Fixed by 0563be2

  12. vstinner
    closed this as completedon Dec 1, 2022
  13. carljm
    added a commit that references this issue on Dec 1, 2022

    Merge branch 'main' into fixinspect

    12f7659
  14. sobolevn
    added a commit that references this issue on Dec 28, 2022

    Revert "pythongh-99894: Ensure the local names don't collide with the…

    ce557be
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

    type-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 01402503 — 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.