Skip to content

tests: flaky windows server startup failure on github action #1255

@jku

Description

@jku

From Teodoras PR #1250 (https://github.com/theupdateframework/tuf/runs/1658331874), a seemingly unrelated failure on ServerProcess tests

Notes:

======================================================================
ERROR: test_cleanup (test_utils.TestServerProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "d:\a\tuf\tuf\tests\utils.py", line 174, in __init__
    self._start_server(timeout, extra_cmd_args, popen_cwd)
  File "d:\a\tuf\tuf\tests\utils.py", line 190, in _start_server
    self._start_process(extra_cmd_args, popen_cwd)
  File "d:\a\tuf\tuf\tests\utils.py", line 207, in _start_process
    stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=popen_cwd)
  File "c:\hostedtoolcache\windows\python\3.6.8\x64\lib\subprocess.py", line 616, in __init__
    _cleanup()
  File "c:\hostedtoolcache\windows\python\3.6.8\x64\lib\subprocess.py", line 205, in _cleanup
    res = inst._internal_poll(_deadstate=sys.maxsize)
  File "c:\hostedtoolcache\windows\python\3.6.8\x64\lib\subprocess.py", line 1055, in _internal_poll
    if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0:
OSError: [WinError 6] The handle is invalid

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\tuf\tuf\tests\test_utils.py", line 134, in test_cleanup
    server='simple_server.py')
  File "d:\a\tuf\tuf\tests\utils.py", line 178, in __init__
    self.clean()
  File "d:\a\tuf\tuf\tests\utils.py", line 316, in clean
    self.flush_log()
  File "d:\a\tuf\tuf\tests\utils.py", line 294, in flush_log
    line = self._log_queue.get(block=False)
AttributeError: 'TestServerProcess' object has no attribute '_log_queue'

the latter exception seems like a separate bug that only comes up in this error case (_log_queue is not always defined when flush() gets called)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions