From c68eb22052e8781bba97c6af2c4ce7eae3b5a399 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Wed, 19 Aug 2026 21:03:47 +0800 Subject: [PATCH] =?UTF-8?q?debug(phase2):=20=E7=BB=86=E5=8C=96=E6=8F=92?= =?UTF-8?q?=E6=A1=A9=E5=8C=BA=E5=88=86=20CreateProcessA=20=E5=8D=A1?= =?UTF-8?q?=E7=82=B9=E4=B8=8E=20join=20=E7=AD=89=E5=BE=85=E8=A1=8C?= =?UTF-8?q?=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/lib/core/BuildPipeline.vp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/App/lib/core/BuildPipeline.vp b/App/lib/core/BuildPipeline.vp index acf1d82..a1e0d1e 100644 --- a/App/lib/core/BuildPipeline.vp +++ b/App/lib/core/BuildPipeline.vp @@ -532,13 +532,22 @@ def _run_cmd_wait(cmd: str) -> int: sa.bInheritHandle = 1 si.cb = win32process.STARTUPINFOA.__sizeof__() # create_flags=0:子进程继承父控制台(输出直接显示,同 system 语义) + #region debug-point LLC4 + stdio.printf("[LLC-DBG] cp: 调用 CreateProcessA\n") + #endregion ok: int = win32process.CreateProcessA( t.CPtr(0), cmd_line, t.CPtr(0), t.CPtr(0), 1, 0, t.CPtr(0), t.CPtr(0), t.CPtr(c.Addr(si)), t.CPtr(c.Addr(pi))) stdlib.free(cmd_line) + #region debug-point LLC5 + stdio.printf("[LLC-DBG] cp: CreateProcessA 返回 ok=%d pid=%d\n", ok, pi.dwProcessId) + #endregion if ok == 0: return -1 win32sync.WaitForSingleObject(pi.hProcess, w32.win32base.INFINITE) + #region debug-point LLC6 + stdio.printf("[LLC-DBG] cp: 等待完成\n") + #endregion exit_code: t.CUInt32T = 0 win32process.GetExitCodeProcess(pi.hProcess, t.CPtr(c.Addr(exit_code))) w32.win32base.CloseHandle(pi.hProcess) @@ -614,7 +623,13 @@ def run_llc_parallel(tasks: bytes, task_count: int, max_threads: int) -> int: while j < batch_n: th_j: vthreading.Thread | t.CPtr = (vthreading.Thread | t.CPtr)(t.CPtr(c.Deref( t.CUInt64T(t.CUInt64T(th_ptrs) + t.CSizeT(j) * 8, t.CPtr)))) + #region debug-point LLC7 + stdio.printf("[LLC-DBG] join 前 %d\n", j) + #endregion th_j.join(600000) + #region debug-point LLC8 + stdio.printf("[LLC-DBG] join 后 %d alive=%d\n", j, th_j.is_alive()) + #endregion th_j.close() j += 1 # 本批结果检查