mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
BaseTools/Source/C/Makefiles: Detect cycle in pids
Update _get_win32_parent_processes() to detect a cycle in parent process ids that can cause _get_win32_parent_processes() to never return. If a pid cycle is detected, then return the list of parent process ids detected up to the point the cycle is detected. GitHub Actions builds using windows-2025 can reproduce this issue once in a while. It shows up as job that runs until a timeout. If the job is canceled, the logs show a python stack in the loop in _get_win32_parent_processes(). Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
parent
a0002ddc53
commit
f26760f5e2
1 changed files with 4 additions and 0 deletions
|
|
@ -171,7 +171,11 @@ def _get_win32_parent_processes():
|
|||
pid = GetCurrentProcessId()
|
||||
parent_processes = []
|
||||
found_parent = True
|
||||
seen_pids = set()
|
||||
while found_parent:
|
||||
if pid in seen_pids:
|
||||
break
|
||||
seen_pids.add(pid)
|
||||
found_parent = False
|
||||
for process in process_list:
|
||||
if process.process_id == pid:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue