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

test_importlib and test_peg_generator fails on AMD64 Windows Server 2022 NoGIL 3.x #110359

Closed
vstinner opened this issue Oct 4, 2023 · 3 comments
Labels
tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

vstinner commented Oct 4, 2023

test_importlib and test_peg_generator are failing on AMD64 Windows Server 2022 NoGIL 3.x.

build: https://buildbot.python.org/all/#/builders/1241/builds/85

test_import error:

FAIL: test_tagged_suffix (test.test_importlib.test_windows.Source_WindowsExtensionSuffixTests.test_tagged_suffix)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_importlib\test_windows.py", line 122, in test_tagged_suffix
    self.assertIn(expected_tag, suffixes)
AssertionError: '_d.cp313-win32.pyd' not found in ['_d.cp313t-win_amd64.pyd', '_d.pyd']

test_peg_generator errors:

ERROR: test_advanced_left_recursive (test.test_peg_generator.test_c_parser.TestCParser.test_advanced_left_recursive)
ERROR: test_c_parser (test.test_peg_generator.test_c_parser.TestCParser.test_c_parser)
ERROR: test_cut (test.test_peg_generator.test_c_parser.TestCParser.test_cut)
ERROR: test_error_in_rules (test.test_peg_generator.test_c_parser.TestCParser.test_error_in_rules)
ERROR: test_forced (test.test_peg_generator.test_c_parser.TestCParser.test_forced)
ERROR: test_forced_with_group (test.test_peg_generator.test_c_parser.TestCParser.test_forced_with_group)
ERROR: test_gather (test.test_peg_generator.test_c_parser.TestCParser.test_gather)
ERROR: test_gather_action_ast (test.test_peg_generator.test_c_parser.TestCParser.test_gather_action_ast)
ERROR: test_if_stmt_action (test.test_peg_generator.test_c_parser.TestCParser.test_if_stmt_action)
ERROR: test_left_recursion (test.test_peg_generator.test_c_parser.TestCParser.test_left_recursion)
ERROR: test_lookahead (test.test_peg_generator.test_c_parser.TestCParser.test_lookahead)
ERROR: test_mutually_left_recursive (test.test_peg_generator.test_c_parser.TestCParser.test_mutually_left_recursive)
ERROR: test_nasty_mutually_left_recursive (test.test_peg_generator.test_c_parser.TestCParser.test_nasty_mutually_left_recursive)
ERROR: test_negative_lookahead (test.test_peg_generator.test_c_parser.TestCParser.test_negative_lookahead)
ERROR: test_pass_stmt_action (test.test_peg_generator.test_c_parser.TestCParser.test_pass_stmt_action)
ERROR: test_return_stmt_noexpr_action (test.test_peg_generator.test_c_parser.TestCParser.test_return_stmt_noexpr_action)
ERROR: test_same_name_different_types (test.test_peg_generator.test_c_parser.TestCParser.test_same_name_different_types)
ERROR: test_soft_keywords_lookahead (test.test_peg_generator.test_c_parser.TestCParser.test_soft_keywords_lookahead)
ERROR: test_soft_keywords_parse (test.test_peg_generator.test_c_parser.TestCParser.test_soft_keywords_parse)
ERROR: test_syntax_error_for_string (test.test_peg_generator.test_c_parser.TestCParser.test_syntax_error_for_string)
ERROR: test_ternary_operator (test.test_peg_generator.test_c_parser.TestCParser.test_ternary_operator)
ERROR: test_with_stmt_with_paren (test.test_peg_generator.test_c_parser.TestCParser.test_with_stmt_with_paren)

Example of test_peg_generator error:

ERROR: test_advanced_left_recursive (test.test_peg_generator.test_c_parser.TestCParser.test_advanced_left_recursive)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\build\test_python_6532�\tempcwd\venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 508, in link
    self.spawn([self.linker] + ld_args)
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\build\test_python_6532�\tempcwd\venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 517, in spawn
    return super().spawn(cmd, env=env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\build\test_python_6532�\tempcwd\venv\Lib\site-packages\setuptools\_distutils\ccompiler.py", line 1041, in spawn
    spawn(cmd, dry_run=self.dry_run, **kwargs)
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\build\test_python_6532�\tempcwd\venv\Lib\site-packages\setuptools\_distutils\spawn.py", line 70, in spawn
    raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x86\\link.exe' failed with exit code 1181

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_peg_generator\test_c_parser.py", line 257, in test_advanced_left_recursive
    self.run_test(grammar_source, test_source)
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_peg_generator\test_c_parser.py", line 136, in run_test
    self.build_extension(grammar_source)
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\test\test_peg_generator\test_c_parser.py", line 133, in build_extension
    generate_parser_c_extension(grammar, Path('.'), library_dir=self.library_dir)
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Tools\peg_generator\pegen\testutil.py", line 107, in generate_parser_c_extension
    compile_c_extension(
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\Tools\peg_generator\pegen\build.py", line 210, in compile_c_extension
    compiler.link_shared_object(
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\build\test_python_6532�\tempcwd\venv\Lib\site-packages\setuptools\_distutils\ccompiler.py", line 752, in link_shared_object
    self.link(
  File "C:\Users\Administrator\buildarea\3.x.itamaro-win64-srv-22-aws.x64.nogil\build\build\test_python_6532�\tempcwd\venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 510, in link
    raise LinkError(msg)
distutils.errors.LinkError: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x86\\link.exe' failed with exit code 1181
@vstinner vstinner added the tests Tests in the Lib/test dir label Oct 4, 2023
@vstinner
Copy link
Member Author

vstinner commented Oct 4, 2023

cc @itamaro @colesbury

Note: Today I also fixed the Refleaks builder: python/buildmaster-config#417

@colesbury
Copy link
Contributor

Thanks for fixing the refleaks builder. I think fixing the Windows nogil buildbot will depend on #110049 so that we have a way of identifying --disable-gil builds from Python on Windows via sysconfig.

@vstinner
Copy link
Member Author

test_importlib and test_peg_generator are failing on AMD64 Windows Server 2022 NoGIL 3.x.

Tests now pass on this builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

No branches or pull requests

2 participants