Skip to content

Windows Store Codex Git worker OOM: Please confirm the version with all-untracked-paths streaming budget and cache fixes #57449

Open

Description

@javerson7-beep

构建

  • Store/MSIX 26.1021.3705.0;内部桌面应用 26.1021.31345。
  • Windows x64;Electron 桌面入口 ChatGPT.exe;V8 15.6.75.19。
  • 下述信息来自已有本机崩溃样本、一次后续手工运行中样本及同版本打包代码的离线只读分析。两份样本来自不同 PID,不视为同一堆的连续测量。

现象和证据边界

  1. 崩溃样本的内部时间为 UTC 2026-10-27 09:33:22 / 北京时间 17:33:22。样本含 V8 GC/OOM 上下文,Git worker isolate 的归属有活动帧和结构校验支持。最终 Windows 原生异常为 0xC0000374;不能据此定位最早写坏内存的位置,也不把原生异常与 V8 OOM 的先后推断写成已完整证明的根因。
  2. 后续独立运行中样本中,QueryCache 的有效表项保留一个匿名仓库的 all-untracked-paths Query。state.data.result.paths 为 257,744 条路径;沿类型字段到达的数组与字符串浅大小合计 29,021,152 字节。它不是 dominator retainedSize,不能推算为原崩溃进程约 3.9 GB 的全部占用。
  3. 该时刻状态为 success/idle、isInvalidated=true、gcTime=Infinity、QueryObserver 数为 0。零 observer 不证明没有自定义业务消费者;代码中存在显式失效/移除机制,不主张“永不释放”。
  4. 单份后续样本支持大输入与缓存压力,持续泄漏仍 NOT_PROVEN。没有会话/turn ID 可把占用归到某个用户聊天。

同版本代码审查结果

  • Git 执行 helper 默认保留完整输出;WQ 先解码/push 再进行预算回调。
  • R$ -> z$ 先读取 status,再扩展未跟踪目录,将完整 NUL stdout split/filter 成路径数组;t1/n1 保存 all-untracked-paths 结果。
  • B0 的 maxUntrackedFiles 检查在完整路径数组产生以后;review_model/review_search 的 256 不是扫描输入上限。
  • snapshot/staging 消费者可能需要完整路径;不能把预算截断伪装成完整成功或空目录。
  • 现有版本未找到受支持的用户配置入口可以替换上述生产路径。

需要厂商确认

  1. 是否存在已修复这条 Electron Git worker 读取与缓存链路的正式 Windows Store 构建?请给出准确 MSIX/内部应用版本及提交或工单对应。
  2. 公开 openai/codex PR Bound concurrent Git diffs for untracked files #54032 已列入 CLI 0.164.0,但它只修改 Rust git-utils 的单次 diff 并发,未修改上述 JavaScript Query 链。是否另有匹配的桌面改动?
  3. 建议在生产路径实施有界增量 NUL 解析、字节/路径/单记录预算、有限 stderr、取消后停止保留、共享消费者语义、complete/partial/canceled/error 契约和缓存总量预算。完整快照必须明确拒绝不完整结果;预算数值需压测确定。

公开参照:

本报告仅包含匿名化文字摘要,未附日志、转储或项目文件。

Activity

  1. added
    bug
    app
    windows-os
    on Oct 27, 2026
  2. changed the title [-]Windows Store Codex Git worker OOM:请确认 all-untracked-paths 流式预算和缓存修复版本[/-] [+]Windows Store Codex Git worker OOM: Please confirm the version with all-untracked-paths streaming budget and cache fixes[/+] on Oct 27, 2026
  3. github-actions commented on Oct 27, 2026

    @github-actions
    Contributor

    English translation:

    Build

    • Store/MSIX 26.1021.3705.0; internal desktop app 26.1021.31345.
    • Windows x64; Electron desktop entry point ChatGPT.exe; V8 15.6.75.19.
    • The information below comes from offline, read-only analysis of an existing local crash sample, a sample from a subsequent manual run, and packaged code from the same version. The two samples come from different PIDs and are not treated as consecutive measurements of the same heap.

    Symptoms and limits of the evidence

    1. The crash sample's internal timestamp is UTC 2026-10-27 09:33:22 / Beijing time 17:33:22. The sample contains V8 GC/OOM context, and attribution to the Git worker isolate is supported by active frames and structural validation. The final Windows native exception was 0xC0000374; this cannot identify where memory was first corrupted, and the inferred ordering of the native exception and V8 OOM is not presented as a fully proven root cause.
    2. In the sample from the subsequent independent run, a live QueryCache entry retains an all-untracked-paths Query for an anonymized repository. state.data.result.paths contains 257,744 paths; the combined shallow size of arrays and strings reached by following type fields is 29,021,152 bytes. This is not dominator retainedSize and cannot be extrapolated to account for the original crashed process's entire approximately 3.9 GB memory usage.
    3. At that point, the state was success/idle, isInvalidated=true, gcTime=Infinity, and the QueryObserver count was 0. Zero observers does not prove the absence of custom application consumers; the code contains explicit invalidation/removal mechanisms, so no claim is made that it is “never released.”
    4. The single subsequent sample supports large input volume and cache pressure; an ongoing leak remains NOT_PROVEN. No session/turn ID is available to attribute the memory usage to a particular user chat.

    Findings from reviewing the same version's code

    • The Git execution helper retains the full output by default; WQ decodes/pushes before invoking the budget callback.
    • R$ -> z$ reads status first, then expands untracked directories, splitting/filtering the complete NUL stdout into a path array; t1/n1 stores the all-untracked-paths result.
    • B0's maxUntrackedFiles check occurs after the complete path array has been produced; the 256 in review_model/review_search is not a scan input limit.
    • snapshot/staging consumers may require complete paths; budget-based truncation must not be disguised as complete success or an empty directory.
    • No supported user configuration entry point was found in the current version that could replace the production paths described above.

    Confirmation needed from the vendor

    1. Is there an official Windows Store build that fixes this Electron Git worker reading and caching chain? Please provide the exact MSIX/internal app versions and the corresponding commit or ticket.
    2. Public openai/codex PR Bound concurrent Git diffs for untracked files #54032 is included in CLI 0.164.0, but it only changes per-diff concurrency in Rust git-utils and does not modify the JavaScript Query chain described above. Is there a separate corresponding desktop change?
    3. Recommended changes to the production path include bounded incremental NUL parsing, byte/path/single-record budgets, bounded stderr, stopping retention after cancellation, shared-consumer semantics, a complete/partial/canceled/error contract, and an overall cache budget. Full snapshots must explicitly reject incomplete results; budget values need to be determined through stress testing.

    Public references:

    This report contains only an anonymized textual summary; no logs, dumps, or project files are attached.

  4. github-actions commented on Oct 27, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  5. javerson7-beep commented on Oct 27, 2026

    @javerson7-beep
    Author

    Could the desktop team provide a supported, local-only way to collect allocation-stack or retained-reference evidence from a specifically identified V8 isolate in Windows Store Codex 26.1021.3705.0 / internal app 26.1021.31345?

    Additional local observations:

    • A later preflight, run in ordinary non-administrator Windows PowerShell 5.1, verified the same desktop process and successfully read the TCP listener table. That process had no existing TCP listeners. No inspector was enabled or attached.
    • One observed whole-process PrivateBytes sequence was approximately 523 -> 1464 -> 586 MiB across three 15-second samples. This is not a measurement of V8 used heap. It does not establish that this particular transient peak came from Git, and an ongoing leak remains unproven.
    • No heap snapshot or allocation profile was collected for that transient peak.

    Please clarify:

    1. How to identify and select the Git worker isolate, separately from the main isolate and renderer VMs.
    2. Whether this exact Store build exposes a supported allocation-sampling or heap-snapshot trigger that saves only to local disk, without enabling uploads, restarting the app, or editing project/app configuration.
    3. Required OS/app permissions, expected pauses and memory overhead, supported stop/cancel behavior, and recommended duration/file limits.
    4. For temporary allocations that are quickly reclaimed, whether the supported profiler can include already-collected samples.
    5. If this build has no such entry point, please state that limitation and identify the least disruptive supported alternative. Please also identify an exact Store build/desktop change that addresses the all-untracked-paths collection/cache path, if available.

    The bot's possible-duplicate links to #57417 and #56436 are useful comparisons, but we are not treating them as engineering confirmation of a shared cause.

    This follow-up contains text only. Permission to send chats, project files, databases, full logs, memory dumps, credentials, or other raw local evidence is not granted.

  6. crowdpay commented on Oct 27, 2026

    @crowdpay

    Following up with concrete collector-ordering validation, a bounded repair proposal, and a production-preflight regression found during integration review. This adds implementation and test evidence to the existing report. This investigation has not established which retaining allocations or triggering operation caused its live incidents. The source proposal has not been installed or activated.

    Affected component and source identity

    • Windows x64 desktop app package 26.1021.3705.0; embedded app 26.1021.31345, build 21828, production channel.
    • Chrome 156.0.8078.48, V8 15.6.75.19.
    • Packed worker source SHA-256: fbc7dbcb1402ac10c7594d009ee0ef7303261d8ab67c49b9646accdd791f15f1.
    • The incident run used non-default --js-flags=--max-old-space-size=3072 --heap-growing-percent=10. Independent numeric reads of historical worker generations verified 3072 MiB old-generation maximum / 3168 MiB reported limit. Native consumption of the growth flag was not established. This is not a failure claim about the default memory policy.

    Incident scope

    Seven generic worker JS heap-limit error/exit-1 pairs were observed across October 26-27, 2026 UTC while the same browser main survived. The error was ERR_WORKER_OUT_OF_MEMORY; it did not itself name Git. Independently queried OS thread descriptions and birth metadata correlate the named Git-thread replacement, together with process-private memory drops. This is not proof that the source defect below caused those incidents, identified a retaining object, or explains every report here.

    Reproduced source defect: output is retained before the budget is checked

    In this pinned worker, WQ decodes/appends each chunk, optionally copies it into the raw-output array, and only then invokes the callback where ve checks maxOutputBytes. The first overflow requests a child kill, but subsequent drained output is still decoded/appended until EOF. A child kill request is therefore not a strict collector allocation bound.

    A finite, deliberately synthetic 32 MiB drain with a 2 MiB budget collected all 32 MiB under the original ordering. Checking the shared stdout/stderr budget before decoding or copying limited collected bytes to 2 MiB. The old isolated allocation lab observed allocated-heap increases of 70,194,520 bytes versus 4,412,216 bytes using Node 24.19 / V8 13.6. No forced GC was used; these are runtime-specific allocation deltas, not retained-live heap measurements or app measurements. The app uses V8 15.6. Actual Windows Git termination/drain behavior during the incidents was not measured.

    This small standalone Node example demonstrates the ordering problem without running Git or importing the app. Its kill request is only a counter, deliberately modeling a finite stream that continues draining:

    const assert = require('node:assert/strict');
    const MiB = 1024 * 1024;
    const chunk = new Uint8Array(MiB).fill(0x61);
    
    function collect(checkBeforeDecode) {
      const decoder = new TextDecoder();
      const pieces = [];
      let seen = 0, retained = 0, overflow = false, killRequests = 0;
      function accept() {
        seen += chunk.byteLength;
        if (seen > 2 * MiB && !overflow) {
          overflow = true;
          killRequests++; // No process is launched or killed.
        }
        return !overflow;
      }
      for (let i = 0; i < 32; i++) {
        if (checkBeforeDecode && !accept()) continue;
        pieces.push(decoder.decode(chunk, {stream: true}));
        retained += chunk.byteLength;
        if (!checkBeforeDecode) accept();
      }
      assert.equal(pieces.reduce((n, piece) => n + piece.length, 0), retained);
      return {retained, killRequests, overflow};
    }
    
    const originalOrdering = collect(false);
    const budgetBeforeDecode = collect(true);
    assert.equal(originalOrdering.retained, 32 * MiB);
    assert.equal(budgetBeforeDecode.retained, 2 * MiB);
    assert.equal(originalOrdering.killRequests, 1);
    assert.equal(budgetBeforeDecode.killRequests, 1);
    console.log({originalOrdering, budgetBeforeDecode});

    Repair proposal

    1. Strict collector bound: move shared stdout/stderr byte accounting and overflow acceptance ahead of TextDecoder.decode, string append and raw-buffer copying. On overflow, request termination once and continue draining/discarding without collecting additional chunks. Preserve accepted raw callback ordering and reader-lock release. Preserve the limit-exceeded failure even if the child later reports exit code zero; never return truncated discovery as successful/clean.
    2. Separate discovery policy: the four discovery callers V$, R$, z$, B$ lack explicit output-byte caps. The review candidate proposes 16 MiB combined stdout/stderr and a 60-second deadline. This threshold needs product review: legitimately large repositories can lose the affected feature until a successful read. It must remain failure/unknown, not a successful empty repository.
    3. Preserve production preflight sharing: an earlier six-edit proposal added explicit timeoutMs:60000 to all four callers. That changes production preflight behavior: the generic runner passes timeoutMs != null to Pge, whose explicit-timeout path bypasses its cache/coalescing. Four concurrent synthetic calls produced four preflight config reads instead of baseline one. That earlier caller proposal should not be shipped unchanged.

    The revised seven-edit candidate retains the collector repair and uses these caller options:

    Caller Proposed options added Deadline behavior
    V$, R$, z$ maxOutputBytes:16777216 Preserve their existing default 60-second deadlines and preflight sharing
    B$ maxOutputBytes:16777216, defaultTimeoutMs:60000 Add a default deadline without setting the explicit-timeout flag

    The one generic deadline fallback change is:

    // Before
    b = Object.is(s, null) ? void 0 : s ?? (y ? NQ : void 0);
    // Review proposal: s is explicit timeoutMs; NQ is the existing 60s default.
    b = Object.is(s, null) ? void 0 : s ?? r.defaultTimeoutMs ?? (y ? NQ : void 0);

    Explicit timeout precedence and explicit-null disabling are preserved. defaultTimeoutMs had no existing occurrences in this exact original worker. This is a proposed internal option, not an existing supported user setting. Revised full-source candidate SHA-256: 864d4f5bdf51ea97e9b175214b850274caa72ed2bb82588358a3e5d81b17589e; all seven edits reverse byte-exact to the original source. The full source bundle is intentionally not attached.

    Validation and remaining limits

    • The original collector/caller/generic-transport suites passed 33 assertions, including shared stdout/stderr budgets, UTF-8 chunk boundaries, delayed EOF, raw callback compatibility, failure propagation and failing-original baselines. Those suites stubbed the production preflight path.
    • Eight additional extracted-production preflight integration checks, independently rerun, reproduce the old proposal's four-versus-one regression and confirm the revised candidate retains one shared preflight across two bursts, approximately 60-second command deadlines, explicit timeout/null behavior and synthetic timeout failure. These ran in Node 26.8.1 / V8 14.6 against a synthetic host, not the installed app.
    • These test scopes are separate; this is not a 41-assertion qualification of the complete revised worker. The full revised source was syntax-checked, not imported/executed. No real Git was used in the isolated tests.
    • The proposal bounds collected output per command, not total worker heap, transport queues, concurrency or caches. The separate turn-snapshot Git-add path remains uncapped/untimed. Static cache/tombstone hypotheses remain unmeasured.
    • No live repair was installed, no worker/main was intentionally restarted, and the seven incidents do not test this proposal. The original live retaining allocations remain unresolved.

    Requested maintainer action: review the collector-ordering defect and the separate bounded-discovery policy, preserve preflight cache/coalescing, and deliver any accepted fix through a supported signed desktop release. Delivered-runtime tests and sustained representative-load verification are still required.

    This submission contains manually sanitized findings, a synthetic reproduction and repair guidance only. No session share/link, raw logs, dump or memory content, full app bundle, repository/user paths, account data or private operational data is included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugperformancewindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions