Skip to content

[handoff] tablet gate-environment kill loop + work inventory (agent session 2026-10-17) #779

Closed

Description

@caomengxuan666

[handoff] Tablet gate-environment kill loop + work inventory (agent session 2026-10-17)

1. Environment problem (evidence-backed)

The tablet did not reboot (uptime continuous 4→5.7h across the session).
What died, repeatedly (5+ times), was the whole Termux app process group:
the opencode server, every background shell, every detached/setsid/nohup
runner, and the user's other background apps.

Root cause, from adb shell logcat -b events:

am_kill : [...,com.zui.engine,905,ZuiMemoryCleaner[Moderate-SwapFreeLow],80400]

Lenovo ZUI's MemoryCleaner fires on low SWAP free (not RAM — 6.2G was
available) and mass-kills background processes. Sustained full cargo test
runs push pages into the 9G zRAM swap until the cleaner trips. CPU temps were
60–70°C with mStatus=0 (no thermal throttling) — heat contributes, swap is
the trigger. Every kill landed during sustained high load (load 8–15), even a
single -j2 serial suite eventually tripped it.

Mitigations applied / learned:

  • Strictly one heavy cargo job at a time, -j2 max, serial --test-threads=1.
  • Resumable per-target gate: ~/bench_niu/gate_chunk.sh <workdir> <log> <targets...>
    appends to the log and skips targets already having a test result: line.
    All progress survives kills; loss is bounded to the in-flight target.
  • cmd deviceidle whitelist +com.termux done (may not stop the ZUI cleaner).
  • Detached nohup/setsid does not survive (whole-app kill). Verify
    aliveness with the [g] bracket trick — bare pgrep -f <name> self-matches
    and gave two false RUNNER-ALIVE readings this session.
  • ADB: wireless debugging pairs fine (adb pair localhost:<pair-port> <code>,
    pairing persists). The local adb daemon dies with the server, so after each
    restart re-run adb connect localhost:<tls-port>; the TLS port is dynamic —
    re-discover by scanning 30000–49999 on localhost for a TLS handshake
    (39057 worked once). This adb build has no mdns support.

2. Work completed this session (all merged)

3. Deferred (device couldn't sustain it — do on a healthy runner)

  • fix(executor): keep empty fields in compound field-split transport #762 master-leg failure-set diff: branch leg COMPLETE —
    $PREFIX/tmp/gatetransport/branch.log, 271 targets, only the 10 known
    environment failures (signal tables/ulimit/CWD-double-slash/part_080),
    zero NEW vs expectation. Master leg —
    $PREFIX/tmp/gatetransport/master.log, 272 test result: lines, missing
    ONLY tests/regression.rs (killed 4× mid-target). Resume recipe:
    recreate baseline worktree at current master, run that one target with
    gate_chunk.sh, then bash ~/bench_niu/diff_full.sh branch.log master.log.
  • fix(executor): keep empty fields in compound field-split transport #762 niubash product A/B: needs two serial product-suite runs
    (branch vs master [patch]); failure-set compare. Not started (too heavy
    for this tablet right now).

4. Open lanes (untouched, queued)

Activity

  1. caomengxuan666 commented on Oct 19, 2026

    @caomengxuan666
    MemberAuthor

    Terminal disposition — this handoff is fully discharged; the device it describes has been returned (see #787). Nothing actionable remains.

    Environment record (§1): ZUI MemoryCleaner SwapFreeLow kill loop on the returned tablet — historical, device-specific, no repo action. Closing as reference material.

    Session inventory (§2): all three landed and verified MERGED in unixwin/rubash — #760 (82b3a4d6, merged 2026-10-17), #762 (3c2d883, merged 2026-10-17), #766 (merged). CHANGELOG entries included per PR bodies.

    Deferred (§3): the #762 master-leg diff + niubash A/B are superseded — see the terminal disposition on #787 (CI green at merge; true-baseline differential vs GNU 5.3.0 landed and run by PR #820, catalogue face must-match).

    Open lanes (§4):

    Closing as completed.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions