Merge fix/review-2026-12-phase2 (2026-12-02 review fix plan)
This commit is contained in:
+11
-3
@@ -1053,9 +1053,17 @@ Policy:
|
||||
- stuck workers are killed by process id,
|
||||
- gateway restart does not reattach old workers; `OrphanWorkerCleanupHostedService`
|
||||
runs `OrphanWorkerTerminator` once on startup — before the server accepts
|
||||
sessions — to kill leftover `ZB.MOM.WW.MxGateway.Worker.exe` processes (matched by the
|
||||
configured worker executable path, or by image name when the x64 gateway cannot
|
||||
introspect the x86 worker's module) left behind by a previous unclean run.
|
||||
sessions — to kill leftover `ZB.MOM.WW.MxGateway.Worker.exe` processes left behind by
|
||||
a previous unclean run. A candidate must match the configured worker executable path
|
||||
(when its path is readable), and its command line's `--pipe-name`
|
||||
(`mxgw-{gatewayPid}-{sessionUid}`) must name a gateway process that is no longer running
|
||||
(or whose id was recycled: it started after the worker). A worker of a gateway that is
|
||||
still running — a second gateway from the same build output, a test host — is left
|
||||
alone. When neither the path nor the command line can be read, the process is left
|
||||
alone and logged, since an image-name match alone could be another build's worker; when
|
||||
the path matches but the command line cannot be read, the path decides, as before. The
|
||||
command line is read with `NtQueryInformationProcess(ProcessCommandLineInformation)`,
|
||||
which works from the x64 gateway on the x86 worker.
|
||||
|
||||
Because each client owns one worker, a crash or leak affects only that session.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user