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_venv: test_multiprocessing() hangs randomly on x86 Windows7 3.x #81334

Closed
vstinner opened this issue Jun 4, 2019 · 4 comments
Closed

test_venv: test_multiprocessing() hangs randomly on x86 Windows7 3.x #81334

vstinner opened this issue Jun 4, 2019 · 4 comments
Labels
3.8 only security fixes tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

vstinner commented Jun 4, 2019

BPO 37153
Nosy @vstinner
PRs
  • bpo-37153: test_venv.test_mutiprocessing() calls pool.terminate() #13816
  • [3.7] bpo-37153: test_venv.test_mutiprocessing() calls pool.terminate() (GH-13816) #13819
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-06-04.19:07:40.931>
    created_at = <Date 2019-06-04.16:30:09.727>
    labels = ['3.8', 'tests']
    title = 'test_venv: test_multiprocessing() hangs randomly on x86 Windows7 3.x'
    updated_at = <Date 2019-06-04.19:07:40.930>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-06-04.19:07:40.930>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-06-04.19:07:40.931>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2019-06-04.16:30:09.727>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37153
    keywords = ['patch']
    message_count = 4.0
    messages = ['344600', '344606', '344627', '344628']
    nosy_count = 1.0
    nosy_names = ['vstinner']
    pr_nums = ['13816', '13819']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue37153'
    versions = ['Python 3.8']

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 4, 2019

    x86 Windows7 3.x:
    https://buildbot.python.org/all/#/builders/58/builds/2573

    0:42:21 load avg: 4.40 [283/423/1] test_venv crashed (Exit code 1)
    Timeout (0:35:00)!
    Thread 0x000000c0 (most recent call first):
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1332 in _readerthread
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 865 in run
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 923 in _bootstrap_inner
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 885 in _bootstrap

    Thread 0x00000c6c (most recent call first):
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1332 in _readerthread
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 865 in run
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 923 in _bootstrap_inner
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 885 in _bootstrap

    Thread 0x00000350 (most recent call first):
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 1015 in _wait_for_tstate_lock
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 999 in join
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1361 in _communicate
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 999 in communicate
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", line 40 in check_output
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", line 327 in test_multiprocessing
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 628 in _callTestMethod
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 671 in run
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 731 in __call__
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 122 in run
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 122 in run
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 122 in run
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\suite.py", line 84 in __call__
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\runner.py", line 176 in run
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\init.py", line 1984 in _run_suite
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\init.py", line 2080 in run_unittest
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 203 in _test_module
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 228 in _runtest_inner2
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 264 in _runtest_inner
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 135 in _runtest
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest.py", line 187 in runtest
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\runtest_mp.py", line 66 in run_tests_worker
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 611 in _main
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 588 in main
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 663 in main
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\regrtest.py", line 46 in _main
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\regrtest.py", line 50 in <module>
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\runpy.py", line 85 in _run_code
    File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\runpy.py", line 192 in _run_module_as_main

    (...)

    Re-running failed tests in verbose mode
    Re-running test_venv in verbose mode
    test_defaults (test.test_venv.BasicTest) ... ok
    test_executable (test.test_venv.BasicTest) ... ok
    test_executable_symlinks (test.test_venv.BasicTest) ... skipped 'Needs symlinks'
    test_isolation (test.test_venv.BasicTest) ... ok
    test_multiprocessing (test.test_venv.BasicTest) ... ok
    test_overwrite_existing (test.test_venv.BasicTest) ... ok
    test_prefixes (test.test_venv.BasicTest) ... ok
    test_prompt (test.test_venv.BasicTest) ... ok
    test_symlinking (test.test_venv.BasicTest) ... skipped 'Needs symlinks'
    test_unicode_in_batch_file (test.test_venv.BasicTest) ... ok
    test_unoverwritable_fails (test.test_venv.BasicTest) ... ok
    test_upgrade (test.test_venv.BasicTest) ... ok
    test_devnull (test.test_venv.EnsurePipTest) ... ok
    test_explicit_no_pip (test.test_venv.EnsurePipTest) ... ok
    test_no_pip_by_default (test.test_venv.EnsurePipTest) ... ok
    test_with_pip (test.test_venv.EnsurePipTest) ... ok

    ----------------------------------------------------------------------

    Ran 16 tests in 59.907s

    OK (skipped=2)

    == Tests result: FAILURE then SUCCESS ==

    (...)

    1 re-run test:
    test_venv

    Total duration: 1 hour 6 min
    Tests result: FAILURE then SUCCESS
    Traceback (most recent call last):
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 1006, in temp_dir
        yield path
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 1058, in temp_cwd
        yield cwd_dir
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 588, in main
        self._main(tests, kwargs)
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 658, in _main
        sys.exit(0)
    SystemExit: 0
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 329, in _force_run
        return func(*args)
    PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\cygwin\\home\\db3l\\buildarea\\3.x.bolen-windows7\\build\\build\\test_python_3040\\worker_3236'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\runpy.py", line 192, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\__main__.py", line 2, in <module>
        main()
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 663, in main
        Regrtest().main(tests=tests, **kwargs)
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\libregrtest\main.py", line 588, in main
        self._main(tests, kwargs)
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 1058, in temp_cwd
        yield cwd_dir
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 1011, in temp_dir
        rmtree(path)
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 451, in rmtree
        _rmtree(path)
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 392, in _rmtree
        _waitfor(_rmtree_inner, path, waitall=True)
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 340, in _waitfor
        func(pathname)
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 389, in _rmtree_inner
        _force_run(fullname, os.rmdir, fullname)
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\support\__init__.py", line 335, in _force_run
        return func(*args)
    PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\cygwin\\home\\db3l\\buildarea\\3.x.bolen-windows7\\build\\build\\test_python_3040\\worker_3236'

    @vstinner vstinner added 3.8 only security fixes tests Tests in the Lib/test dir labels Jun 4, 2019
    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 4, 2019

    New changeset bc6469f by Victor Stinner in branch 'master':
    bpo-37153: test_venv.test_mutiprocessing() calls pool.terminate() (GH-13816)
    bc6469f

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 4, 2019

    New changeset 5f8443e by Victor Stinner (Miss Islington (bot)) in branch '3.7':
    bpo-37153: test_venv.test_mutiprocessing() calls pool.terminate() (GH-13816) (GH-13819)
    5f8443e

    @vstinner
    Copy link
    Member Author

    vstinner commented Jun 4, 2019

    I hope that my change will prevent the random failure.

    @vstinner vstinner closed this as completed Jun 4, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant