Process Monitor 4.12: supported Runtime exit status and file-backed log finalization

ZST 0 Reputation points
2026-10-18T19:23:11.0166667+00:00

We are validating a bounded recorder-only diagnostic on Windows build 10.0.26300.0, using the signed 64-bit Process Monitor binary. No application under investigation runs in this check; a normal-token disposable Node fixture performs 12 flushes and 12 renames and then exits.

Binary SHA-256: 28495e642b2a465474a4edc58380eaf8b7ee580f3fbcb4141061deadafe9b885.

Our sanitized command shape was:

Procmon64.exe /AcceptEula /Quiet /Minimized /LoadConfig <filter.pmc> /BackingFile <fresh.pml> /Runtime 20

The filter includes the fixture's process name, dp4trace.exe, with Drop Filtered Events enabled. The output is on fixed NTFS, in a OneDrive-backed user directory; we have not established any relationship between that location and the result. An elevated helper creates the recorder suspended and assigns it to a Windows kill-on-close job at creation, verifies its exact identity, then resumes it. It issues one bounded /WaitForIdle call before the normal-token fixture runs. This launcher/job arrangement is custom QA tooling, not a claimed Microsoft requirement. The watchdog starts containment at 29 seconds against a 30-second cap. No watchdog or forced termination was reported in this attempt.

Observed: the fixture completed all 24 operations in 250 ms and exited zero. The recorder then exited; our wrapper's wall interval was about 20.82 seconds. We successfully read its process exit value and rejected it as nonzero. Our harness failed to persist the numeric value; its own child exit code 2 must not be mistaken for Procmon's exit code. We stopped immediately and did not export the log or retry. No cause or Procmon defect is established.

The original 3,064,856-byte PML is preserved, SHA-256 3bbf23b6eebe0e808c5bc33c9cd5ebaddc7f102c0d6ba2c8258483421c928a14. Our constrained, reverse-engineered PML-v9 reader sees 1,510 declared and indexed records and walks 1,510 corresponding headers; it refuses an unrecognized 0x71 byte between cursor 695279 and index offset 695280. The walked event headers all refer to the fixture. This reader is not a Microsoft format specification, and equal counts do not establish completeness or corruption. No native CSV comparison has been performed on this log. We are withholding the raw file from a public post because its process metadata can include other host information.

  1. What exit status should an ordinary /Runtime 20 completion return? Are any nonzero statuses expected, and is there a documented status mapping?
  2. Does completion of /Runtime establish that the backing file's index and event tail are finalized? What supported offline check can assess this already-retained original without recording again or rewriting it?
  3. Is the suspended, creation-time job-contained launcher supported for this use, or is there a documented restriction we should account for?

We have read the Microsoft file-backed capture guide. We are seeking supported semantics or a narrowly specified next diagnostic, not asking for the current file to be declared complete without verification.

Sysinternals
Sysinternals

Advanced system utilities to manage, troubleshoot, and diagnose Windows and Linux systems and applications.


1 answer

Sort by: Newest
  1. AI answer

    2026-10-18T19:24:17.1866667+00:00

    Open the preserved PML with Process Monitor 4.12 and export All events to a separate CSV or PML; this is the supported offline validation path, whereas /Runtime exit-code meanings and finalization guarantees are not publicly documented.

    Validate the retained PML without changing it

    1. Keep the original PML read-only and work from a copy. Record the copy’s hash before testing.
    2. Start the same signed Procmon64.exe interactively.
    3. Use File → Open and select the copied PML.
    4. If it opens successfully:
      • Note the event count displayed by Process Monitor.
      • Clear display filters if necessary so the validation covers the complete capture.
      • Select File → Save.
      • Choose All events, then save to a different path as CSV.
      • Optionally also save All events as Native Process Monitor Format (PML) to a new file.
    5. Compare the CSV’s event count and final fixture events with the expected operation sequence. Do not treat your reverse-engineered reader’s 0x71 result as a PML integrity verdict.
    6. Hash the original again afterward. Opening and exporting to another path should leave your evidence file unchanged; the hash check independently verifies that it did.

    Microsoft’s troubleshooting guidance directs analysis by opening the recorded trace in Process Monitor, and identifies All events plus Native Process Monitor Format (PML) as the complete-save selection. It also states that a file-backed capture does not require a separate manual save before Procmon exits.^1^ Process Monitor describes PML as its native format preserving captured data for later loading.^2^

    A successful native open and export is the narrowest supported parser-level check available for this retained file. It can establish that Procmon 4.12 accepts and can enumerate the file; it cannot independently prove that every event generated before shutdown reached the file. If native open or export fails, preserve the original and submit the zipped PML—with its hash, Procmon binary hash, exact command, OS build, and launcher timeline—to Microsoft Support. Microsoft’s published Procmon workflow likewise directs users to zip PML captures for support analysis.^3^

    /Runtime exit status

    The available Process Monitor 4.12 documentation does not publish:

    • the expected process exit value for ordinary /Runtime 20 expiry;
    • a table assigning meanings to nonzero values;
    • a statement that all nonzero values represent capture failure; or
    • a guarantee connecting exit value zero—or process exit generally—to PML structural completeness.

    Consequently, the wrapper’s nonzero observation cannot be classified now because the actual value was not retained. Its own exit code 2 has no Procmon meaning.

    For the next occurrence, retain at least:

    • the unsigned 32-bit exit value and hexadecimal representation;
    • whether the process exited naturally or through the job/watchdog;
    • start, resume, runtime-expiry, and exit timestamps;
    • standard output/error, even if normally empty;
    • any Application Error or Windows Error Reporting event.

    Windows defines a process exit code as the value returned by its entry point or supplied to ExitProcess/TerminateProcess; a fatal exception can instead become the exit code.^4^ That explains how to preserve the value, but it does not supply Procmon-specific semantics.

    Does /Runtime prove finalization?

    No published Procmon contract establishes that /Runtime completion is a durability or finalization barrier for every PML index and tail structure. The observed 20.82-second lifetime is consistent with bounded execution, but it does not by itself establish completeness.

    Microsoft documents that file-backed recording writes directly to a file and does not require the manual save required by virtual-memory backing.^1^ That documented behavior should not be extended into an undocumented guarantee about internal PML-v9 layout, index construction, cache flushing, or /Runtime.

    Suspended, job-contained launch

    Creating a process suspended, assigning it to a job, and then resuming it is a documented Windows mechanism. AssignProcessToJobObject specifically documents suspended creation for certain job security configurations.^5^ However, no Procmon documentation establishes this launcher arrangement as a supported or tested Procmon automation contract.

    The job can materially affect termination:

    • JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE terminates associated processes when the last job handle closes.^6^
    • Job limits apply after assignment, and nested-job or breakaway behavior can affect child processes.
    • Forced termination gives the process no opportunity to execute termination handlers or DLL detach processing.^4^

    Your report says containment did not fire, so the job is not established as the cause of this attempt. It remains an uncontrolled variable for product-support reproduction. If escalation requires a minimal reproduction, use the documented direct elevated launch with -backingfile, then stop through Procmon’s documented -terminate -quiet path, outside the custom job wrapper.^1^ That would be a new capture and is not required for the first offline examination of the retained original.


    References

    1. Troubleshoot Apps failing to start using Process Monitor
    2. Process Monitor - Sysinternals | Microsoft Learn
    3. Troubleshoot Microsoft Defender Antivirus performance issues with Process Monitor
    4. Terminating a Process
    5. AssignProcessToJobObject function (jobapi2.h)
    6. Job Objects
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.