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 #99894Descriptiontest_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
Activityvstinner commented on Nov 30, 2022 pablogsal commented on Nov 30, 2022 vstinner commented on Nov 30, 2022 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). pablogsal commented on Nov 30, 2022 vstinner commented on Nov 30, 2022 LoooooooL, I think that I understood the issue 😄 Funny one. vstinner commented on Nov 30, 2022 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
added a commit that references this issue on Dec 1, 2022gh-99894: Ensure the local names don't collide with the test file in … vstinner commented on Dec 1, 2022
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|