qa: PermissionError in functional tests on Windows #28529

issue hebasto openend this issue on September 25, 2023
  1. hebasto commented at 12:18 pm on September 25, 2023: member

    Having an intermittent error in my local Windows:

     0> py -3 test\functional\test_runner.py --jobs 40 --timeout-factor=8
     1...
     2165/269 - feature_versionbits_warning.py failed, Duration: 59 s
     3
     4
     5stdout:
     62023-09-25T11:29:08.904000Z TestFramework (INFO): PRNG seed is: 6135880998339750841
     72023-09-25T11:29:09.019000Z TestFramework (INFO): Initializing test directory C:\Users\hebasto\AppData\Local\Temp\test_runner_₿_🏃_20230925_122333\feature_versionbits_warning_108
     82023-09-25T11:29:25.118000Z TestFramework (INFO): Check that there is no warning if previous VB_BLOCKS have <VB_THRESHOLD blocks with unknown versionbits version.
     92023-09-25T11:29:43.242000Z TestFramework (INFO): Check that there is a warning if previous VB_BLOCKS have >=VB_THRESHOLD blocks with unknown versionbits version.
    102023-09-25T11:29:50.044000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:12296 due to [WinError 10054] An existing connection was forcibly closed by the remote host
    112023-09-25T11:30:05.174000Z TestFramework (INFO): Stopping nodes
    122023-09-25T11:30:05.548000Z TestFramework (INFO): Cleaning up C:\Users\hebasto\AppData\Local\Temp\test_runner_₿_🏃_20230925_122333\feature_versionbits_warning_108 on exit
    132023-09-25T11:30:05.548000Z TestFramework (INFO): Tests successful
    14
    15
    16stderr:
    17Traceback (most recent call last):
    18  File "C:\Users\hebasto\bitcoin/test/functional/feature_versionbits_warning.py", line 103, in <module>
    19    VersionBitsWarningTest().main()
    20  File "C:\Users\hebasto\bitcoin\test\functional\test_framework\test_framework.py", line 154, in main
    21    exit_code = self.shutdown()
    22                ^^^^^^^^^^^^^^^
    23  File "C:\Users\hebasto\bitcoin\test\functional\test_framework\test_framework.py", line 361, in shutdown
    24    shutil.rmtree(self.options.tmpdir)
    25  File "C:\Python311\Lib\shutil.py", line 759, in rmtree
    26    return _rmtree_unsafe(path, onerror)
    27    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    28File "C:\Python311\Lib\shutil.py", line 617, in _rmtree_unsafe
    29    _rmtree_unsafe(fullname, onerror)
    30File "C:\Python311\Lib\shutil.py", line 617, in _rmtree_unsafe
    31    _rmtree_unsafe(fullname, onerror)
    32File "C:\Python311\Lib\shutil.py", line 622, in _rmtree_unsafe
    33    onerror(os.unlink, fullname, sys.exc_info())
    34File "C:\Python311\Lib\shutil.py", line 620, in _rmtree_unsafe
    35    os.unlink(fullname)
    36PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\hebasto\\AppData\\Local\\Temp\\test_runner_₿_🏃_20230925_122333\\feature_versionbits_warning_108\\node0\\regtest\\debug.log'
    37
    38
    39166/269 - feature_startupnotify.py passed, Duration: 30 s
    40...
    
  2. hebasto added the label Windows on Sep 25, 2023
  3. hebasto added the label Tests on Sep 25, 2023
  4. maflcko commented at 12:23 pm on September 25, 2023: member
    See also #28115
  5. hebasto commented at 9:38 pm on September 25, 2023: member
    0PermissionError: [WinError 32] The process cannot access the file because it is being used by another process...
    

    Trying to collect some details with Sysinternals handle64.exe makes the issue disappear :man_shrugging:

  6. hebasto commented at 2:29 pm on January 8, 2024: member

    https://github.com/bitcoin/bitcoin/actions/runs/7433919780/job/20227517742:

     02024-01-06T21:17:20.926000Z TestFramework (INFO): Tests successful
     1
     2
     3
     4stderr:
     5Traceback (most recent call last):
     6
     7  File "D:\a\bitcoin\bitcoin/test/functional/tool_utxo_to_sqlite.py", line 111, in <module>
     8
     9    UtxoToSqliteTest().main()
    10
    11  File "D:\a\bitcoin\bitcoin\test\functional\test_framework\test_framework.py", line 154, in main
    12
    13    exit_code = self.shutdown()
    14
    15                ^^^^^^^^^^^^^^^
    16
    17  File "D:\a\bitcoin\bitcoin\test\functional\test_framework\test_framework.py", line 363, in shutdown
    18
    19    shutil.rmtree(self.options.tmpdir)
    20
    21  File "C:\hostedtoolcache\windows\Python\3.12.1\x64\Lib\shutil.py", line 808, in rmtree
    22
    23    return _rmtree_unsafe(path, onexc)
    24
    25           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    26
    27  File "C:\hostedtoolcache\windows\Python\3.12.1\x64\Lib\shutil.py", line 636, in _rmtree_unsafe
    28
    29    onexc(os.unlink, fullname, err)
    30
    31  File "C:\hostedtoolcache\windows\Python\3.12.1\x64\Lib\shutil.py", line 634, in _rmtree_unsafe
    32
    33    os.unlink(fullname)
    34
    35PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\a\\_temp\\test_runner_₿_🏃_20240106_210717\\tool_utxo_to_sqlite_113\\utxos.sqlite'
    
  7. hebasto renamed this:
    qa: No access to `debug.log` in functional tests on Windows
    qa: `PermissionError` in functional tests on Windows
    on Jan 8, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-28 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me