CI failed on Windows

Open
#97 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
testing-qa

Research direction

Start with the failing tests in pyperf/tests/test_perf_cli.py and pyperf/tests/test_timeit.py, then reproduce the Windows CI failures. Trace the reported RSS and timeit subprocess errors in the stack traces. Done means the three tests pass on Windows without changing their expected behavior.

Written by the indexing model from the issue text.

Description

======================================================================
FAIL: test_command_track_memory (test_perf_cli.TestPerfCLI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\pyperf\pyperf\pyperf\tests\test_perf_cli.py", line 619, in test_command_track_memory
    self.run_command(*args)
  File "D:\a\pyperf\pyperf\pyperf\tests\test_perf_cli.py", line 35, in run_command
    self.assertEqual(proc.stderr, '')
AssertionError: 'Traceback (most recent call last):\n  Fil[2698 chars] 1\n' != ''
- Traceback (most recent call last):
-   File "c:\hostedtoolcache\windows\python\3.9.2\x64\lib\runpy.py", line 197, in _run_module_as_main
-     return _run_code(code, main_globals, None,
-   File "c:\hostedtoolcache\windows\python\3.9.2\x64\lib\runpy.py", line 87, in _run_code
-     exec(code, run_globals)
-   File "D:\a\pyperf\pyperf\pyperf\__main__.py", line 763, in <module>
-     main()
-   File "D:\a\pyperf\pyperf\pyperf\__main__.py", line 759, in main
-     func()
-   File "D:\a\pyperf\pyperf\pyperf\__main__.py", line 728, in cmd_bench_command
-     runner.bench_command(name, command)
-   File "D:\a\pyperf\pyperf\pyperf\_runner.py", line 622, in bench_command
-     return self._main(task)
-   File "D:\a\pyperf\pyperf\pyperf\_runner.py", line 427, in _main
-     bench = self._worker(task)
-   File "D:\a\pyperf\pyperf\pyperf\_runner.py", line 401, in _worker
-     run = task.create_run()
-   File "D:\a\pyperf\pyperf\pyperf\_worker.py", line 284, in create_run
-     self.compute()
-   File "D:\a\pyperf\pyperf\pyperf\_command.py", line 53, in compute
-     raise RuntimeError("failed to get the process RSS")
- RuntimeError: failed to get the process RSS
- Traceback (most recent call last):
-   File "c:\hostedtoolcache\windows\python\3.9.2\x64\lib\runpy.py", line 197, in _run_module_as_main
-     return _run_code(code, main_globals, None,
-   File "c:\hostedtoolcache\windows\python\3.9.2\x64\lib\runpy.py", line 87, in _run_code
-     exec(code, run_globals)
-   File "D:\a\pyperf\pyperf\pyperf\__main__.py", line 763, in <module>
-     main()
-   File "D:\a\pyperf\pyperf\pyperf\__main__.py", line 759, in main
-     func()
-   File "D:\a\pyperf\pyperf\pyperf\__main__.py", line 728, in cmd_bench_command
-     runner.bench_command(name, command)
-   File "D:\a\pyperf\pyperf\pyperf\_runner.py", line 622, in bench_command
-     return self._main(task)
-   File "D:\a\pyperf\pyperf\pyperf\_runner.py", line 432, in _main
-     bench = self._manager()
-   File "D:\a\pyperf\pyperf\pyperf\_runner.py", line 560, in _manager
-     bench = Manager(self).create_bench()
-   File "D:\a\pyperf\pyperf\pyperf\_manager.py", line 229, in create_bench
-     worker_bench, run = self.create_worker_bench()
-   File "D:\a\pyperf\pyperf\pyperf\_manager.py", line 128, in create_worker_bench
-     suite = self.create_suite()
-   File "D:\a\pyperf\pyperf\pyperf\_manager.py", line 122, in create_suite
-     suite = self.spawn_worker(0, 0)
-   File "D:\a\pyperf\pyperf\pyperf\_manager.py", line 104, in spawn_worker
-     raise RuntimeError("%s failed with exit code %s"
- RuntimeError: D:\a\pyperf\pyperf\.tox\py\Scripts\python.EXE failed with exit code 1


======================================================================
FAIL: test_python_option (test_timeit.TestTimeit)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\pyperf\pyperf\pyperf\tests\test_timeit.py", line 248, in test_python_option
    self.assertEqual(cmd.returncode, 0, repr(cmd.stdout + cmd.stderr))
AssertionError: 1 != 0 : 'Error when running timeit benchmark:\n\nStatement:\n\'time.sleep(1e-6)\'\n\nSetup:\n\'import time\'\n\nNo pyvenv.cfg file\nTraceback (most recent call last):\n  File "D:\\a\\pyperf\\pyperf\\pyperf\\_timeit.py", line 230, in bench_timeit\n    runner.bench_time_func(name, timer.time_func, **kwargs)\n  File "D:\\a\\pyperf\\pyperf\\pyperf\\_runner.py", line 462, in bench_time_func\n    return self._main(task)\n  File "D:\\a\\pyperf\\pyperf\\pyperf\\_runner.py", line 432, in _main\n    bench = self._manager()\n  File "D:\\a\\pyperf\\pyperf\\pyperf\\_runner.py", line 560, in _manager\n    bench = Manager(self).create_bench()\n  File "D:\\a\\pyperf\\pyperf\\pyperf\\_manager.py", line 229, in create_bench\n    worker_bench, run = self.create_worker_bench()\n  File "D:\\a\\pyperf\\pyperf\\pyperf\\_manager.py", line 128, in create_worker_bench\n    suite = self.create_suite()\n  File "D:\\a\\pyperf\\pyperf\\pyperf\\_manager.py", line 122, in create_suite\n    suite = self.spawn_worker(0, 0)\n  File "D:\\a\\pyperf\\pyperf\\pyperf\\_manager.py", line 104, in spawn_worker\n    raise RuntimeError("%s failed with exit code %s"\nRuntimeError: C:\\Users\\runneradmin\\AppData\\Local\\Temp\\tmpsstomtue failed with exit code 106\n'

======================================================================
FAIL: test_worker_verbose (test_timeit.TestTimeit)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\pyperf\pyperf\pyperf\tests\test_timeit.py", line 107, in test_worker_verbose
    self.assertIsNotNone(match, repr(cmd.stdout))
AssertionError: unexpectedly None : "Warmup 1: 337 us (loops: 1, raw: 337 us)\n\nValue 1: 1.86 ms\nValue 2: 853 us\n\nMetadata:\n- boot_time: 2021-03-16 06:40:42.876194\n- cpu_count: 2\n- date: 2021-03-16 06:46:56.876194\n- duration: 16.0 ms\n- hostname: fv-az68-167\n- loops: 1\n- mem_peak_pagefile_usage: 9988.0 kB\n- name: timeit\n- perf_version: 2.1.1\n- platform: Windows-10-10.0.17763-SP0\n- python_compiler: MSC v.1928 64 bit (AMD64)\n- python_executable: D:\\a\\pyperf\\pyperf\\.tox\\py\\Scripts\\python.EXE\n- python_hash_seed: 337\n- python_implementation: cpython\n- python_version: 3.9.2 (64-bit) revision 1a79785\n- timeit_setup: 'import time'\n- timeit_stmt: 'time.sleep(1e-3)'\n- timer: QueryPerformanceCounter(), resolution: 100 ns\n- unit: second\n- uptime: 6 min 14.0 sec\n\nMean +- std dev: 1.36 ms +- 0.71 ms\n"

----------------------------------------------------------------------
Ran 165 tests in 18.766s

FAILED (failures=3)
ERROR: InvocationError for command 'D:\a\pyperf\pyperf\.tox\py\Scripts\python.EXE' -bb -Wd -m unittest discover -s pyperf/tests/ -v (exited with code 1)
___________________________________ summary ___________________________________
ERROR:   py: commands failed
Dominant language
Python
Stars
967
Forks
112
Avg merge
5d 8h
Merged PRs (30d)
9

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from psf/pyperf

All issues in psf/pyperf

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.