[Docs] (.claude/skills, .github/workflows, CMakeLists.txt, docs/archive, docs/Disaggregated, docs/MobileVA, docs/Performance, MG_Backend, MG_Backend/DirectGLES, MG_Backend/DirectVulkan, MG_Backend/Record, MG_Gbm, MG_Impl, MG_Impl/EGLImpl, MG_Impl/GLImpl, MG_Impl/GLXImpl, MG_Impl/Pipe, MG_IntegrationTest, MG_IntegrationTest/Harness, MG_IntegrationTest/Scenarios, MG_Pipe, MG_Pipe/generated, MG_Remote, MG_Remote/Client, MG_Remote/Server, MG_Remote/Transport, MG_Remote/Wire, MG_State/GLState, MG_Test/Pipe, MG_Test/Util, MG_Test/Wire, MobileGL, scripts, scripts/data, tools/device_bench, userguide): archive the planning notes and agent contracts under docs/archive

- DEBTS.md and OPEN-QUESTIONS.md stay maintained, now in docs/Disaggregated.
This commit is contained in:
2026-10-15 20:01:45 -04:00
parent 0e3e2b7761
commit aabca3c171
1035 changed files with 410 additions and 398 deletions
+161
View File
@@ -0,0 +1,161 @@
# P12 subset "on-screen server window" — implementation brief (2026-09-23)
Base: `feat/disaggregated@9f669e52` (P7 closed). Package tree `~/w7/p12-onscreen`, branch `p12/onscreen`,
build dirs `build-split` (disaggregated, ITEST tcp port 40813) and `build-linux` (pull build, for G1), both
already built at base. G1 base: `.text` 0xa52203, symbols `~/w7/logs/p12/pull-syms-base.txt`.
Gate: `bash ~/w7/notes/p12/gate.sh ~/w7/p12-onscreen <tag>`.
## User rulings (binding)
1. The Android server APK creates an ANativeWindow (its own SurfaceView) and renders the IPC render stream
ON SCREEN on it. **Both rendering paths stay available**: the existing offscreen (pbuffer) path and the
new on-screen path.
2. **Only one of them is active at a time**, decided at server initialization / context creation.
3. Topology: **in-process server** — the display Activity's own app process runs the TCP server on a thread
and renders straight into its SurfaceView; sessions run sequentially in that process. (Not fork + AHB.)
4. Client side: **the client opts in via a new `WindowKind::ServerOwned`** (control protocol revision 3,
client env knob). In this mode the client can be **fully headless**: it asks the server to create the
real (window) context/surface and gets the surface geometry etc. from the server — as if the client were
rendering directly on the server's GPU and screen.
## Design
### D1 Client knob and headless window surfaces
- New IPC knob `MOBILEGL_IPC_SURFACE=offscreen|server` (default `offscreen`), added to `MG_Config::IpcTable`
(`Config.h`, "a later phase's knob is added HERE") + `ConfigLoader.cpp`, printed in the IPC config log line.
Meaningful only when the client talks to a remote server (spawn/tcp); ignored (logged) otherwise.
- With `server`: the client EGL layer's `eglCreateWindowSurface` / `eglCreatePlatformWindowSurface` accept ANY
native window, **including NULL** (today NULL is `EGL_BAD_NATIVE_WINDOW`, `EGLImpl.cpp:130-133`) — a headless
client has no window. `BackendObject_Remote::CreateEGLWindowSurface` then sends **one** `CreateWindowSurface`
with `WindowKind::ServerOwned`, `nativeToken = 0`, width/height = the size the client asked for (the
existing `WindowHandle.Width/Height` from `EGL_WIDTH/EGL_HEIGHT` attribs; 0/0 = "the server's own size"), and
**does not send `SetWindowHandle`**. The client's native window value never reaches the wire (Rule G/H).
- `eglCreatePbufferSurface` stays a pbuffer in both modes (offscreen). See D4 for the one-mode-per-session rule.
- With `offscreen` (default) nothing changes, byte for byte.
- Geometry flows back: when a `kEventSurfaceChanged` with non-zero W/H arrives for the session's server-owned
surface, the client updates the EGL state's surface size (so `eglQuerySurface(EGL_WIDTH/HEIGHT)` answers the
server's real size; `state->ResizeSurface` as used at `EGLImpl.cpp:724`) in addition to the default-FB
reallocation `ApplySurfaceChangedToClient` already does (`ClientSession.cpp:306-347`). Make sure the client
has the size before `eglCreateWindowSurface` returns (the create path already drains events,
`BackendObject_Remote.cpp:224`).
### D2 Wire
- Append `ServerOwned = 7` to `WindowKind` (`protocol.fbs:239-250`; append-only), regenerate + commit the
generated header, bump `MOBILEGL_PROTOCOL_CONTROL_REVISION` 2 -> 3 (`mg_protocol_base.h`, with its comment
row), `protocol_revision_pin.py --write`. wireFingerprint moves: APK and host redeploy together.
- Codec (`SurfaceOpCodec.{h,cpp}`): encoder maps the client's server-owned request to `ServerOwned`; decoder
accepts `ServerOwned` only on `CreateWindowSurface` (on `SetWindowHandle` it is a named refusal), only with
`nativeToken == 0` (non-zero = `ProtocolCorruption`, latched like the other peer-corruption rows).
Update the static_assert / out-of-range bound. Keep `AndroidNativeWindow@P12` / `MetalLayer@P12` refusals.
- Do NOT add a `WindowBackend` enumerator in `MG_Backend/BackendObject.h` (pull build, G1). Carry the
server-owned request in the MG_Remote frame with a MG_Remote-local marker; on the server it becomes
`WindowBackend::Android` + the server's own `ANativeWindow*`, substituted ON THE SERVER at apply time. No
pointer ever crosses the wire.
- D8 (X11/Win32/None whitelist, CONTRACT-P6 §7.2) is OUT of scope (separate follow-up).
### D3 Server display (the on-screen server's window)
- New `MG_Remote/Server/ServerDisplay.{h,cpp}`: process-wide holder of the server-owned window, set only by the
in-process display server (Android). API sketch: `Attach(ANativeWindow*)` (acquire), `Detach()` (blocking,
see D6), `HasDisplay()`, a geometry request hook (native -> Java up-call: `SurfaceHolder.setFixedSize(w,h)`
for w,h > 0, `setSizeFromLayout()` for 0/0), and `AcquireFor(w,h, deadline)` that waits (bounded, ~10 s,
wakes on detach/shutdown) until a window is attached and reports the requested size (or any size for 0/0).
Linux/host and the exec'd supervisor have no display: `HasDisplay()` is false.
- `ServerLoop` `CreateWindowSurface` arm, for a ServerOwned frame: no display -> reply failure with a distinct
result and a named log `Refuse ServerOwned: this server owns no display` (NOT a latch — it is a
configuration error, not peer corruption); otherwise substitute the window and call the backend's
`CreateEGLWindowSurface` exactly as monolith Android does (Register -> Activate -> SetWindowHandle ->
InitWindowSurface). Log an arm proof once per surface: `MG_Remote server: surface=window WxH owner=server`
(and `surface=pbuffer WxH` on the pbuffer arm). The apply thread may wait for the window; the existing
`SurfaceProgress` heartbeat must keep the client's reply budget alive while it does.
- Reporting size: Magma already publishes swapchain extent in `OnSurfaceChanged` (`SwapchainObject.cpp:323-339`).
Espryt publishes format only (`DirectGLES.cpp:15939-15950`): publish W/H (via `QueryCurrentSurfaceSize`) for a
window surface in the disaggregated build only — `DirectGLES.cpp` is in the pull build, so guard it
(`#if MOBILEGL_BUILD_DISAGGREGATED` or equivalent) and keep G1 byte-identical. Consider whether it must be
limited to server-owned windows (publishing W/H switches the client to the reallocating arm).
- Espryt: `sameHandle` dedup (`BackendObject_DirectGLES.cpp:962-967`) keys on surface + window; with the
server's pointer it dedups correctly. A new surface token re-creates the context (existing behaviour).
- Magma: a new renderer on the SAME ANativeWindow must not be created while the old renderer's VkSurface/
swapchain still holds it (`VK_ERROR_NATIVE_WINDOW_IN_USE_KHR`); check `BackendObject_DirectVulkan.cpp:337-352`
ordering and fix if needed (guard for G1 if that file is in the pull build).
### D4 One mode per session ("only one active", decided at context creation)
- A session's surface mode latches at its FIRST surface creation: ServerOwned -> on-screen; pbuffer -> offscreen.
A later surface of the other kind in the same session is refused by name (`SurfaceModeMismatch`, reply
failure, logged on both sides, no latch). A server with no display serves only offscreen sessions.
- Server-level: the offscreen supervisor (exec'd, `MobileGLServerService`) and the on-screen display server
(in-process, `MobileGLDisplayActivity`) are mutually exclusive on the device (D8).
### D5 In-process server
- `RunSession` (`ServerMain.cpp:268-638`, `[[noreturn]]`, `_exit` on every path) becomes returning (an exit
code); every fork site becomes `_exit(RunSession(...))` so the forked shapes are unchanged.
- A new exported entry for the in-process server (e.g. `mobilegl_server_serve_inprocess(endpoint, ...)`), same
env preconditions as `mobilegl_server_main` (`:1035-1049`), TCP only, `--serve` semantics with THREADS
instead of fork: pre-auth before hand-off unchanged, one session at a time, an authenticated second Hello
while a session is live -> `Refuse{Busy}`. `TcpSupervisor`'s fork body closes fds per fd-table
(`:990-995, 1009`); the thread hand-off must not. Reuse TcpSupervisor with a pluggable hand-off if tractable.
- `FatalFunnel`: add `ResetSessionLatch()`; the in-process server arms the latch for every session and resets
it between sessions. Unarmed `SessionFail` still aborts (documented: in-process mode loses crash isolation).
- Backend pinned for the process lifetime: an explicit extra/env, else the first session's backend becomes the
pin (Espryt and Magma must never share a process, `BenchService.java:12-17`); mismatch -> the existing
pinned-backend refusal (`:371-375`).
- Everything else per `map-apk-process` §4 (config init per session, server role, PipeStats restartable).
- Must be testable on the Linux host: run the in-process entry on a thread in a test (pbuffer sessions) and
prove two sequential sessions, latch reset (second session serves after the first latched), and Busy.
### D6 Window lost
- Java `surfaceDestroyed` -> JNI `Detach()` blocks (bounded ~3 s) until the apply thread has released the
backend surface (post onto the apply thread; `ReleaseEGLResources`-style), then the live on-screen session is
latched by name (new `FatalFamilies.def` row, e.g. `ServerWindowLost`) so the client gets a clean
device-lost. The display server keeps listening; the next on-screen session waits for a window (D3) or is
refused by name. `surfaceCreated` re-attaches. A session that never had a window is unaffected.
### D7 Android (trace flavor)
- New `MobileGLDisplayActivity` (trace flavor), `android:process=":mglwin"`, exported like the service,
fullscreen SurfaceView, `FLAG_KEEP_SCREEN_ON`, `configChanges` like `TraceReplayActivity`,
`android:hardwareAccelerated="false"` (keeps HWUI off EGL: Espryt teardown `eglTerminate`s the default
display, `main/AndroidManifest.xml:25-28`). Extras: `listen`, `token`, `env` (same `K=V;K` grammar as
`MobileGLServerService.applyEnvironment` — share the helper), optional `backend`. Applies env with
`Os.setenv/unsetenv` (ROLE=server, DIAL=no, LOG_FORWARD=1, scrub list, TOKEN, LOG_FILE_PATH) BEFORE
`System.loadLibrary("MobileGL")`. Aspect-fit (letterbox) the SurfaceView when a fixed buffer size is set.
- JNI in libMobileGL (Android + disaggregated only, next to `DriverPostJni.cpp` in `CMakeLists.txt`):
start/stop the in-process server thread, attach/detach the window (`ANativeWindow_fromSurface`, acquire/
release), the geometry up-call.
- Readiness line in logcat (`listening on tcp://...`) like the supervisor's.
### D8 Only one server active on the device
- The Activity on start stops `MobileGLServerService`; the service on start kills `:mglwin`
(`ActivityManager.getRunningAppProcesses` + `Process.killProcess`, same uid) and waits for it to go.
- Forked session children get `prctl(PR_SET_PDEATHSIG, SIGKILL)` (+ the getppid race check) so they die with
their supervisor (fixes the documented child leak, `notes/p65/code-review-findings.md:9`).
- The in-process listen retries `EADDRINUSE` for up to ~5 s (the previous server may still be dying).
### D9 Tools
- `tools/trace_replay/tcp_device_server.py --surface window|pbuffer` (default pbuffer = today): window starts
the Activity (`am start -n <pkg>/top.mobilegl.plugin.MobileGLDisplayActivity` + the same extras).
- Linux glws `tools/trace_replay/apitrace_glws_egl.cpp`: `MOBILEGL_TRACE_SURFACE=window` on Linux creates
`eglCreateWindowSurface(dpy, cfg, (EGLNativeWindowType)0, {EGL_WIDTH,w,EGL_HEIGHT,h})` (only valid with
`MOBILEGL_IPC_SURFACE=server`; otherwise the create fails by name); `resize()` destroys + recreates at the new
size. So `trace_replay --window-surface` + `MOBILEGL_IPC_SURFACE=server` replays a trace on the phone screen.
## Constraints (all must hold)
- G1: pull build `.text` 0xa52203 and 0 symbols added/removed. Every edit to a file compiled into the pull
build (`MG_Backend/*`, `MG_Impl/*`, `MG_State/*`, `DirectGLES.cpp`, ...) must be guarded so the pull build is
byte-identical. Measure with the gate.
- fatal_census (79, down-ratchet; every new `Fatal{Word` needs a `FatalFamilies.def` row), link ratchet 171
monotone, spawn_lane_parity 0 errors (device-only or new arms must be named there), protocol revision pin,
wire_declines_audit, hygiene (stdio grep in MG_Backend/MG_State, gen_pipe clean, doc citations strict).
- fbs append-only; no branching on link kind above `Transport/`; handshake refusals are `Refuse`, never aborts.
- Every existing lane stays green (base numbers at 9f669e52: unit 2568, integration-split 322, spawn 239,
tcp 243, magma-split 125, magma-spawn 104, magma-tcp 89, magma-full-split 558, integration-gpu 2188 x 2).
- Red-once per behaviour (a test that is red without the fix and green with it), noted in the report.
- Commits: single-line `[Scope, Scope] (P12): <what>` (e.g. `[MG_Remote, MG_Test] (P12): ...`), NO trailers of any
kind (no Co-Authored-By). Several focused commits are fine.
## Working rules
- Edit files through `\\wsl.localhost\Arch\home\swung\w7\p12-onscreen\...` with Read/Edit/Write (UNC is writable).
- Run commands as `MSYS_NO_PATHCONV=1 wsl -d arch --cd /home/swung -- bash -lc '<cmd>'`. The Windows command
line mangles heredocs and nested quotes: put anything non-trivial in a script file (Write via UNC, then run
it; strip CR with `sed -i 's/\r$//'` if needed). Long jobs: `setsid nohup ... &` and poll the log.
- git ONLY inside `/home/swung/w7/p12-onscreen` via `wsl`. NEVER touch `~/w7/pipe` or the Windows checkouts.
Never `git lfs pull`. Never push.
- The phone (Redmi 2f7cbe2e) is shared: any adb work runs under `flock -w 3600 /home/swung/w7/locks/2f7cbe2e.lock <cmd>`.
@@ -0,0 +1,340 @@
# create window 的实测否决,与 StreamLink 的一处 ILink 契约违反(handoff-2 §2 收尾记录)
> 2026-09-26。分支 `feat/disaggregated` @ `82ed1df9` 加本轮工作树改动。对应
> [`MOBILEGL-CS-HANDOFF-2.md`](../../../../MOBILEGL-CS-HANDOFF-2.md) 的 §2(工作树里那版 create window)
> 与 §7 的「把 create 那 4,536 批成 ~1,134」。
## 0. 一句话
- **窗口开了等于没开**:同一台设备、同一帧、同一 101,421,396 B staged,`MOBILEGL_IPC_CREATE_WINDOW=4`
与 `=1` 的 create 行都是 **4,536 次等待**,墙钟都是 **28.64 s**(handoff 的 pre-window 基线是 31.3 s)。
临时计数器给出的形态是:`pushed=24 blocked=4,476 took=20 readfail=8,951 pending=4`——**drain 读不回来**。
- **不是调参问题**:回复池 8 槽,而这一帧发出 **55,903 条带回复的记录**(服务端对每条 kReplySlot 记录都回,
不管客户端要不要),所以一条答案在 **8 条回复**之后就被覆盖,等于 **0.65 个 create**。任何深度的窗口都读不回来。
- **顺带修掉一个真 bug**:`StreamLink::ReadReply` 只认「最新一条」(单槽),违背 `ILink::ReadReply(seq)`
的按 seq 读取语义。已改成一个 8 槽环 + 用例。
- **默认关掉**:`MOBILEGL_IPC_CREATE_WINDOW` 默认 1。窗口开着不只是白费,它会让**被拒绝的 create 留在「已发布」状态**
(反闩动作在同一个读不回来的 drain 里),正是 suspect 表要防的那种静默分歧。
## 1. 实测(同一设备 aikjs4s8cys8ba7l,同一世界,出厂省电)
| run | 窗口 | `frame-sent 2=` | `frame-op by_op 2=` | 墙钟 | 日志 |
|---|---|---|---|---|---|
| handoff 基线(无窗口的二进制) | — | 4,536 | 4,536 | 31.26 s | `logs/mcx.client` |
| 窗口 4 | 4 | 4,536 | **4,536** | **28.64 s** | `logs/mcx-fix4.client` |
| 窗口 1(负控) | 1 | 4,536 | **4,536** | **28.64 s** | `logs/mcx-fix1.client` |
| **默认(本轮收尾的 HEAD,窗口 1)** | 1 | 4,536 | **4,536** | 30.79 s | `logs/mcx-final.client` |
`by_op 2` 数的是**走了阻塞路径的 create**(`LinkMetricsBeginReply(ownsReplySlot, op)`,
`ownsReplySlot = rowCarriesReplySlot && wantReply`,`ClientSession.cpp:1840/1883`)。它没动,就是「一条都没延后」。
两臂的 `frame-sent` 全表逐 op 相同(4,536 / 20,633 / 3,770 / 18,056 / 12,671 …),也就是**记录一条没少发**;
收尾那一轮(默认值,`mcx-final`)的 `frame-sent` 与它们**逐字节相同**,墙钟的 30.79 s 在 handoff-2 §4.3 说的
「单次墙钟差含数秒噪声」带内——三臂的墙钟差(28.64 / 28.64 / 30.79)没有一个超出噪声。
窗口确实进去过——临时行(每 500 条打一次)在窗口 4 下的读数:
~~~
P12diag create=501 cfg=4 eff=4 suspects=0 refusals=0 pending=4 pushed=24 blocked=476 took=20 waitfail=22 readfail=951
P12diag create=4501 cfg=4 eff=4 suspects=0 refusals=0 pending=4 pushed=24 blocked=4476 took=20 waitfail=22 readfail=8951
~~~
`pending` 从第 500 条起**一直钉在 4**,`refusals=0`(一条答案都没读到过),`readfail` 约每条 create 涨 2
(非阻塞 poll + 阻塞 drain 各失败一次)。
## 2. 根因:回复池 8 槽 vs 一帧 55,903 条回复
答案只在**它的槽没被复用**之前可读(`ReplySlotPool`,`kDefaultReplySlotCount = 8`,
`Transport/ReplySlot.h:111`)。而这一帧发回复的记录数是(**只数带 `kReplySlot` 的行**——
`MG_Pipe/generated/PipeWire.inc:177-179` 的 flags 列,op 4 `ResourceDestroy` 是 `kNone`,
`PostReply` 对它直接 Fatal,从来不回;本文第一版把它的 3,770 条算了进来,审查纠正为下表):
| 行 | 条数 | 为什么回 |
|---|---|---|
| 2 `ResourceCreate` | 4,536 | 等 |
| 3 `ResourceRespecify` | 20,633 | **不等也给**(首用确认后 fire-and-forget) |
| 47 `SetTextureParams` | 18,056 | **不等也给** |
| 48 `ResourceSubData` | 12,671 | **不等也给** |
| 5 / 9 等 | 7 | 等 |
| **合计** | **55,903** | |
服务端**无法知道**客户端要不要这条答案——`ClientSession.cpp:1897-1900` 原文:「The server posts either way,
so the wire is unchanged and the row keeps its flag」。于是池子一帧 churn **6,988 次**,两条 create 之间平均夹
**12.3 条回复**,而一条答案只活得下 **8 条**:
8 / 12.3 = 0.65 个 create
**所以窗口的失败不是「慢」,是「读不到」。** 1 深度的窗口就是阻塞路径本身。
> **⚠️ 本节后来被 §8 部分更正。** 池深度是**加剧因素**而不是约束:把一帧回包从 55,903 砍到 4,543
> 之后,drain 依然一条都读不回来(readfail 8,951 → 8,872)。真正的约束是 §8 的
> 「有界缓冲 + 严格 FIFO + 读失败无出路」。本节的数字仍然有效,结论不完整。
## 3. 顺带发现并修掉:`StreamLink::ReadReply` 违背了自己的接口
`ILink::ReadReply`(`Transport/ILink.h:285`)的签名是**按 seq 读**;`ShmLink` 用 `ReplySlotPool` 实现它,
而 `StreamLink` 到本轮为止只保留**一条**回复(`reply` / `replySeq` / `replyStatus`),并且:
~~~cpp
x.replyReady.wait(lock, [&]{ return closed || x.replySeq >= seq || appliedSeq >= seq; });
if (x.replySeq != seq) return ... MOBILEGL_ERR_PROTOCOL_MISMATCH; // 等的是 >=,判的是 ==
~~~
「等到至少 seq」与「只接受恰好 seq」自相矛盾:任何早于最新一条的答案都读不回来。此前没有调用者受影响,
是因为每个调用者读的都是自己刚等到的、也就是最新的一条;create window 是第一个读**旧**答案的调用者。
已改成 8 槽环(`kReplyRing`,深度取它顶替的那个池:`kDefaultReplySlotCount`),
用例 `StreamLinkTest.AnOlderReplyIsStillReadableByItsSeq` 三连发、按 1→2→3 顺序读回。
**注意这只治好了「单槽」,没治好「池只有 8 槽」**——`ShmLink` 侧本来就是池,也一样读不回来。这也是为什么
设备上的读数在修掉单槽之后仍然一模一样。
## 4. 为什么这是个必须默认关掉的开关,而不是一个慢一点的开关
窗口的答案是**临时接受**:`PublishCreate` 会因此落闩(「applier holds this handle」),
而纠正它的唯一动作——迟到 DECLINE → `MGPipeNoteHandleUnpublished` + suspect 表——**就在那个读不回来的 drain 里**。
换句话说窗口开着时,**服务端的拒绝会被客户端当成已发布**,之后每条已转换的行都对一个不存在的记录 fire-and-forget。
这正是 suspect 表存在的理由,也是 `TextureEmit.h` 里 `RespecifyOnce` 那句话(「applier 的 REFUSAL 是唯一说
『我手里没有这个 handle』的信号」)要防的东西。
## 5. 门(`MG_Test/Wire/RemoteClientControls.inc`)
窗口机制本身是自洽的,只是在这条协议上不可用,所以门保留并 pin 住机制:
| 用例 | 钉住什么 | 读数 |
|---|---|---|
| `ACreateWindowDefersTheAnswersAndTheWindowOffDoesNot` | 窗口开=12 记录 0 等待;**同一子进程**把窗口关回 1 = 12 记录 **12** 等待(负控);`pending <= effective` 逐条断言;99 被夹到数组大小;数组 <= 池的一半 | ON 0 waits / OFF 12 waits |
| `ARefusedCreateUnlatchesItsObjectAndItsNextCreateBlocks` | 真拒绝(收窄服务端 consumed mask)→ **闩清零**、suspect 计数 +1、下一条 create **阻塞**(2 记录 2 等待)、恢复消费者后 **heal**(闩回来、suspect −1) | suspects 6 → 5 |
| `StreamLinkTest.AnOlderReplyIsStillReadableByItsSeq` | 传输层按 seq 可读 | 3/3 |
编译期还有一条:`WireTables.cpp` 的 `static_assert(kCreateWindowMax <= kDefaultReplySlotCount / 2, …)`,
把「有人把窗口改成 8 就会踩池子」变成编译错误而不是设备上的错画面。
## 6. 画面(handoff-2 §6 要的那一格)
设备端(`MOBILEGL_IPC_SURFACE=server`,画面在手机屏上)在负载帧闭合后 +8 s 截屏:
`logs/mcx-fix4.shot2.png` 与 `logs/mcx-fix1.shot2.png` 都是真实世界(地形、物品栏、聊天行),
**两臂 SSIM = 0.977**(均值绝对差 2.26/255)。同一 run 内 加载页 vs 世界 SSIM 只有 0.12,说明这个数字不是
「两张都黑」的假阳性。**这仍然只是间接证据**:两臂行为本来就相同(窗口是 inert 的),它能说明的是
「窗口开着没有把画面弄坏」,不是「延后一条确认后画面仍然对」。
## 7. 下一步(如果要救这个想法)
要让延后的答案活下来,只有两条路,**都是协议面而不是调参**:
1. **加深回复池**:`ReplySlotCount` 在 Hello 里协商(`ClientSession.cpp:957` / `ServerSession.cpp:745`),
两端一致即可改。需要的深度 \>= 两条 create 之间的回复数(本帧 12.3)乘以窗口深度,即 4 深度要 ~49 槽;
而 `ReplyBytes` 固定 16 MiB 时槽会变小(16 MiB / 64 ≈ 256 KiB),`ReadPixels` 的 `ReplyCanHold`
会先撞墙,所以要一起抬 `ReplyBytes`(W=4 保 2 MiB 上限约需 128 MiB)。**注意这是 8× 常驻内存**,
而且评审指出服务端 SEG_REPLY 的实际分配路径**没人读过**——走这条之前先读它。
2. **让服务端别回那些没人会读的答案**:四个 Bool 行(create/respecify/params/sub-data)目前一律回,
其中约 51,000 条的答案是**没有人会读**的。砍到 ~4,543 之后两条 create 之间只剩 ~1 条回复,8 槽够用。
**判据必须是「这条的答案永远不会被读」,不是「fire-and-forget」。** 这两者今天在 4 个站点里 3 个重合,
**在最重要的那一个上正好相反**:window 延后的那些 create **正是** `wantReply=false`,而 §1 的 drain
读的就是它们。按字面实现会让窗口从「读不回来」变成「根本没得读」,而且连 `readfail` 这个唯一能诊断它的
计数器一起消失——不会崩,只会静默退化。(这条是独立评审抓到的;本页 §7 的第一版写法就是那个错判据。)
三件已经核过的事:
- **位有空位**:`MGPWireRecHeader::Flags` 是链路 framing 空间 `RingRecordFlags`(**不是** `MGPipeCallFlags`),
`Ring.h:281-285` 用掉 bit 0-4,**bit 5 空**(`PipeWire.inc:35-65` 的对照表自己写着「bit 5 kOptional vs(无)」)。
- **wire fingerprint 不动**:`WireFingerprint()` 混的是 payload 布局 digest + PipeCalls.def 的 catalogue
digest + 渲染状态 + OpCount,加一个 ring 位三个都不动 ⇒ **不必 bump `MOBILEGL_PROTOCOL_CONTROL_REVISION`**。
但 `PipeWireCodec.cpp:106` / `:142-145` 与 `RingTest.cpp:740` 三条 `static_assert` **会红**——那是故意的
绊线(新 ring 位正好别名 `kOptional`)。
- **两个方向都退化成今天的行为**(旧端忽略 bit 5 照旧回包;旧客户端从不设位)⇒ 它**不是** handoff-2 §3.2
那种「不升级就会坏」的协议面,而是**「不两端都升就不会生效」**的协议面——便宜一档,客户端可以先落。
还有一处**必须同改**:`LinkMetricsBeginReply` 计的是 `ownsReplySlot`(`ClientSession.cpp:1883`),window
生效后 **`by_op 2` 会掉到 ~0**,而 §1 正是教人用 `by_op 2` 判断窗口有没有生效——它会变成**假绿**。
验证这个提案要另加「服务端为这条 op 回了多少次」的计数。
(本节的两条路都经过一次独立评审。评审指出一处**未实测**:`StreamLink::PostReply` 把 `SendProgress()`
搭在回包上(`StreamLink.cpp:577`),跳过回包会把进度粒度从「每条一次」降到「>= 64 条或 >= 1 ms 一次」
(`:564-571`)——水位仍独立推进,但 barrier 的平均多等量没人算过。)
## 8. 更正(同日晚,实现 no-reply 位之后):池深度**不是**约束
§2 把「8 槽池 vs 55,903 条回复」写成了根因。**实测否掉了这个诊断的一半。** 后来按 §7 的第 2 条路
实现了那个 no-reply 位(服务端跳过没人读的答案),真机上服务端日志确认它生效:
服务端:decisions=50001(跳过) answered=4521(回包)
客户端:收到的 Reply 帧 seen=4501, latest seq=97181
也就是说一帧的回包从 55,903 降到 ~4,543(−92%),池子不再被冲刷。**而窗口的 drain 依然一条都读不回来:**
P12win call=4501 cfg=2 eff=2 pending=2 taken=62 pushed=64 blocked=4436 waitfail=65 readfail=8872
P12miss n=1 want=310 replySeq=1504 ring=[1175..1504] slots=8
P12miss n=9001 want=310 replySeq=102915 ring=[102866..102915] slots=8
**want=310 每一次都是同一个数**:窗口是按序的,队头那条的答案早就被有界缓冲覆盖掉了,而 drain 只会
**永远重试同一个队头**。于是 taken 停在 62、pending 钉在 2、readfail 每条 create 涨 2、suspects 恒为 0。
**真正的根因是「有界缓冲 + 严格 FIFO + 读失败无出路」三者相乘**,不是池子有多深:
- 回复通道在任何实现下都是有界的(shm 是 8 槽池、stream 是我那轮改的 8 帧环),覆盖是设计的一部分;
- 窗口只读队头,且读失败时**只记账不放弃**(`if (!session.ReadReply(...)) return;`);
- 于是 4,536 条延后答案里**只要有任意一条**在被读之前被覆盖,窗口就永久卡死,之后每条 create 都走阻塞路径;
- 概率上这是必然事件,而不是小概率——这也解释了为什么去掉 50,001 条回复只让 readfail 从 8,951 动到 8,872(−0.9%):
冲刷速率降了两个数量级,但「至少丢一条」的概率仍然是 1。
**要修的话是一个明确的形状**(本轮按 goal 的止损条件停在这里,没有实现):队头的答案读不回来时
**放弃它**——`MGPipeNoteHandleUnpublished` + `NoteCreateSuspect` + 弹出该条目——也就是把 DECLINE 的
处理路径复用到「不知道」这个结果上。这样窗口自愈(该对象回到阻塞路径,下一次 create 把真相带回来),
代价是丢过答案的对象变慢,而不再是把整行拖死。它需要一个自己的门:**读失败必须让窗口继续前进**。
顺带记两条本轮得到的事实:
1. **no-reply 位本身是好的,而且两端都验证过**:服务端跳过 50,001 条、回 4,521 条;客户端的 `by_op 2`
随之变成「drain 的阻塞次数 + fallback 次数」,`frame-sent` 逐 op 不变。它救不了窗口,但它把
「服务端为每条 kReplySlot 记录都回」这件事变成了可关的——每帧少 ~102,000 次 `sendmsg`。
2. **两端必须都升才生效**:客户端先落、服务端不升时,行为与改前逐字节相同(旧端忽略 bit 5 照旧回包)——
这正是 B6 说的那一档,本轮在真机上先撞到了一次。
## 9. 第 1、2 步落地与实测:预算也不够,缺的是「保留」
按 §8 的次序做了两步并上真机。
**第 1 步(让回包失败可归因)**:`ReplyPool` 现在有 `PostedReplies()`/`FailedReplies()`,非 OK 的返回不再被吞
(原来只检查 `BUFFER_TOO_SMALL`,`TRANSPORT_CLOSED` 静默消失)。实测:
服务端 P12post posted=4501 failed=0
**⇒「答案没送到」被排除**:服务端 `answered` 与客户端 `seen` 的那 20 条差额是两端采样时刻不同,不是丢包。
**第 2 步(residency budget)**:客户端数「自最老窗口条目 push 以来发出了多少条带 `kReplySlot` 的记录」
(`ClientSession::ReplyPostings()`),逼近 8 就强制阻塞取回。实测:
P12win call=4501 cfg=2 eff=2 pending=2 taken=63 pushed=65 blocked=4435 budget=4451 readfail=8872 posts=54377
kind=frame-op frame=14 wait_replies=9078 by_op=2=9071 墙钟 27.87 s
`budget=4451`——预算在**几乎每一条 create** 上都判超支,于是窗口几乎不再延后(`pushed=65`),而 drain 依然
读不回来(`taken=63`、`readfail=8872`)。**预算无效,且原因是结构性的:**
1. **窗口只在 create 到达时才有机会动作。** 两条 create 之间客户端可以发出上千条记录——实测第一次读失败时
回复环已经是 `[1175..1504]`,而队头是 **seq 310**;中间那段没有任何人看窗口。
2. **挤掉延后答案的不是客户端发了什么,是服务端回了什么。** 服务端是落后的一侧(每次唤醒 ~5 ms 回一条,
客户端一路跑到前面),所以那段时间到达的回复是它**对更早那批 create 的迟到答案**,它们先把 8 个槽占满。
3. **所以这个判据在构造上就太晚**:它在下一条 create 才被问到,而那时答案早就没了。收紧常数只会让延后彻底消失
(`pushed=65` 就是那个样子),不会有别的结果。
**结论(本轮最终认识):延后要成立,客户端必须「保留」它延后的答案。** 回复缓冲按**条数**有界(8),而客户端
**无法**约束服务端在它两条 create 之间会回多少条答案——所以「指望缓冲里还有」不是策略,是一场客户端必输的竞争。
能工作的形状是**保留**:读线程把「还没被取走」的那几个 seq 的答案留着(同时只有个位数),取走即丢,
读不到就**报一次丢失**而不是无限重试。那是传输层改动(`StreamLink` 的环 → 带上限与丢失计数的保留表),
也是下一步该做的。
**两步都留在树里**:第 1 步是净收益;第 2 步是安全方向(只会让窗口退化成不延后=pre-window 形状),
而且它用的时钟 `ReplyPostings()` 正是保留方案要用的。
## 10. 第 0 步实验:把 `StreamLink` 的环从 8 放到 1024 —— 诊断确认
§9 的结论是「延后要成立必须保留」。在写保留表之前先做了一个**一行实验**把这句话证死:把
`StreamLink::kReplyRing` 从 8 改成 1024(其余一切不动),同一个负载帧:
| | 环 = 8(现状) | 环 = 1024(实验) |
|---|---|---|
| `readfail` | 8,872 | **0** |
| `taken` | 63 | **4,499 / 4,500** |
| `blocked`(回退阻塞路径) | 4,435 | **0** |
| `by_op 2` | 9,071 | **3,443** |
| 墙钟 | 27.9 s | **23.04 s** |
| `frame-sent` | create 4,536 / records 103,097 | 逐 op 相同 |
**结论一:唯一的原因就是淘汰。** 环够深,延后的答案**每一个**都读回来了(4,499/4,500),一次都没有回退到
阻塞路径。§8 那个 `want=310` 的楔子、§9 那个 `budget=4451` 的无效预算,都是「8 个位置不够」这一个事实的两种表现。
**结论二:现在刹车的是预算,不是缓冲。** `by_op 2 = 3,443` 恰好等于 `budget` 触发次数(3,395 量级)——
也就是**每一条被预算强制提前取回的答案,都是一次真实的阻塞等待**。预算的常数是 7(按 8 槽池定的),
而实验里缓冲有 1024 深,于是预算变成了唯一的节流阀,墙钟只从 27.9 s 降到 23.0 s。
**这对设计意味着什么**:保留表落地之后,正确性不再依赖「答案在缓冲里活多久」——**答案被持有到被读走为止**。
于是预算不该再按 8 槽池定,而应当按**保留容量**定(或者干脆由「保留即安全」取代)。
按 `by_op 2 ≈ records / W` 推算,W=2 时应是 ~2,268 次等待、墙钟 ~15 s——**正是 goal 里那条 15-16 s 的判据**。
实验状态已还原(环回到 8、探针全部删除),四个车道 172+13+22+103 全绿。
## 11. 第 0b 步:预算关掉 + 环 1024 —— 收益是量出来的,不是外推的
§10 证明「环够深,延后的答案就都读得回来」,但那一轮 `by_op 2 = 3,443` 里绝大多数是**预算**触发的
(3,395),所以「W 变小能不能换来墙钟」还没答。于是再做一次一行实验:**环 1024 + 把预算关掉**
(`kCreateReplyResidency` 抬到不可能达到),W=2 与 W=4 各跑一轮:
| 臂 | waits | rtt_mean | `by_op 2` | **墙钟** |
|---|---|---|---|---|
| W=1(现默认) | 4,543 | 5,672 µs | 4,536 | 28.66 s |
| 预算开 + 环 8 | 9,078 | 2,598 µs | 9,071 | 27.04 s |
| 环 1024 + 预算 7 | 3,450 | 5,367 µs | 3,443 | 23.04 s |
| **环 1024 + 预算关,W=2** | **2,560** | **4,916 µs** | **2,553** | **16.80 s** |
| **环 1024 + 预算关,W=4** | **1,691** | **4,224 µs** | **1,684** | **11.45 s** |
(W=4 那轮的窗口读数:`taken=4498/4500 pushed=4500 blocked=0 readfail=0`。)
**结论一:分水岭答了,而且是好的一侧。** 等待数减半/减到 1/2.7,墙钟跟着减半/减到 1/2.5,
而 **`rtt_mean` 没有变大**(4,916 / 4,224 µs,比基线的 5,672 µs 还低)。这说明那 ~5 ms 是**唤醒往返**,
而且**服务端一次唤醒吃掉一整批**——所以 W 深一档就少一档唤醒,等待数与墙钟同步下降。
(审计把这条列为「仓库里判不出来、只有真机能答」的分水岭,它同时也是「这件事值不值得做」的分水岭。)
**结论二:收益比 handoff 的地板还低。** handoff §0.4 估计「窗口生效后 15-20 s」,而那把客户端 CPU(~13.4 s)
当成与等待**相加**;实测这个帧是等待主导的,等待摊薄之后 W=4 到 **11.45 s**——比估计的地板还低 3.5 s。
**注意 1024 是替身,不是设计。** 它能工作只因为「这个负载下 1024 恰好够深」;1024 个条目最坏是 ~2 GiB
(`ReadPixels` 的答案可到 2 MiB),审计已点名。**保留表给的正是同一个性质(答案还在)而有界**,
所以这一步的结论是「按审计的形状去实现」,而不是「把环改成 1024」。
实验状态已还原(环回 8、预算回 7、探针删除),172 + 13 全绿。
**顺带更正 §7 的第 1 条路**(审计 F15):在 stream 臂上 `SEG_REPLY` / Hello 的 `ReplySlotCount` **与答案无关**
——答案走 Reply 帧、`StreamLink::ReadReply` 读客户端自己的 store,池只用来给 `MaxReplyBytes()` 定尺寸。
所以「加深池子 + 抬 `ReplyBytes`」根本没有针对实测那条臂,别为它付 8× 常驻内存。
## 12. 落地:保留表上线,默认翻到 2,真机 28.66 s → 16.52 s
按审计的形状实现(`ILink::DeclareReplyRead` + `LinkCapabilities::RetainsReplies`;`StreamLink` 的环 →
**按声明的保留表**:单调白名单 + 游标、取走即删、触顶具名 Fatal、Detach 清空;删掉 residency budget;
`CreateWindowEffective()` 在不保留答案的链路上强制为 1;窗口退休分支补一次 drain)。
**真机(两个二进制都重出,负载帧,`frame-sent 2=` 全程 4,536 不变):**
| 臂 | waits | `by_op 2` | 墙钟 |
|---|---|---|---|
| 窗口 1(R-5 的形状) | 4,543 | 4,536 | 28.66 s |
| 窗口 2(显式) | 2,507 | 2,500 | 17.27 s |
| **窗口 2(出厂默认,无覆盖)** | 2,570 | 2,563 | **16.52 s** |
| 窗口 4 | 1,651 | 1,644 | 11.02 s |
| **窗口 2 + 旧服务端(不认 no-reply 位)** | 2,670 | 2,663 | **16.38 s** |
**版本偏斜那一轮是审计点名的必测项,它过了**:旧服务端照回 ~55,903 条/帧,客户端的白名单把这些
**没人声明**的答案在到达时丢弃(`SkippedUnwanted` 增长而不是保留表增长),延后的答案照旧读得回来,
整轮**零 Fatal**。这正是「按声明保留」相对「全保留 + 淘汰」的那个差别。
**门**(172 + 15 全绿):
- `StreamLinkTest.ADeclaredAnswerSurvivesFarMoreInterveningAnswersThanAnyFixedBuffer` —— **已证明能红**:
把存储退回「按到达保留、只留 8 条」的环语义,它立刻以「the declared answer did not survive 64
intervening ones」失败。这就是把环=1024 那个替身换成有界机制的那条界线。
- `StreamLinkTest.AnAnswerNobodyDeclaredIsNotKeptAtAll` —— 没声明的答案不进保留表(红法:全保留)。
- `RemoteClientControls.TheWindowRefusesToDeferOnALinkThatCannotRetainAnswers` —— 在不能保留的链路
(in-process/ShmLink)上,把旋钮开到 4 也必须每条 create 都走阻塞、`taken == 0`(红法:去掉能力位)。
- `ARefusedCreate...` 改成读这条臂上真正的修复链:拒绝 → 闩保持清零 → 下一次定义阻塞且再被拒 → 恢复消费者后闩回来;
并断言窗口的账本(`refusals`/`suspects`/`pending`)在这条臂上**全为空**。
**还没做的一件**(审计 E10(d),下一轮):窗口级门目前只有真机这一层,**没有跑在 stream 臂上的单元门**。
三轮「门全绿而功能在设备上是死的」都源于同一件事——门跑在 in-process/ShmLink 上。传输层的保留门已经补上,
窗口那一层建议建在 `StreamClientPublicationTest` 的真 stream 会话上(`AttachStreamLink` + 可控 peer)。
## 13. 复算
~~~sh
# 两臂的帧读数(handoff-2 §1 的读法)
python3 mgl-device/bigframe.py mgl-device/logs/mcx-fix4.client mgl-device/logs/mcx-fix1.client
grep -a "kind=frame-op frame=" mgl-device/logs/mcx-fix4.client | tail -1
grep -a "kind=frame-sent frame=" mgl-device/logs/mcx-fix4.client | tail -1
# 一轮设备 run(自带 force-stop、就绪判据、负载帧检测、截屏、SIGTERM 收尾)
cd mgl-device && python3 run-once.py <tag> [MOBILEGL_IPC_CREATE_WINDOW=4]
# 窗口自己的读数(临时探针):taken / pushed / budget / readfail / posts
grep -a "P12win" mgl-device/logs/<tag>.client | tail -1
# 回包送达(服务端):posted / failed
grep -a "P12post" mgl-device/logs/<tag>.server | tail -1
# 门
build-split/MobileGL/MG_Test/Wire/RemoteClientTest --gtest_filter='*CreateWindow*:*RefusedCreate*'
build-split/MobileGL/MG_Test/Wire/StreamLinkTest --gtest_filter='*OlderReply*'
~~~
@@ -0,0 +1,44 @@
# P12 出口门 (b):另一台机器经 TCP 在 Redmi 入世界
> 2026-09-28。client = WSL 里的 `mobilegl_trace_replay`(Windows 主机上另一套系统),server = Redmi `2f7cbe2e`(Adreno 830)的 trace APK server(`930c29e9`,split 构建),
> 控制面 TCP + 数据面 stream,DirectGLES,run-ahead 开。链路:手机 Wi-Fi(5 GHz 11ax,RSSI −36)↔ 主机以太网,经 `192.168.31.1`。
> 驱动 [`tools/device_bench/disagg/crosshost_accept.sh`](../../../../tools/device_bench/disagg/crosshost_accept.sh),汇总 `crosshost_report.py`,原始数据 `.trace-work/perf-compare/crosshost/`。
> WSL 默认路由是主机 `xray_tun` 代理(会终结 TCP);脚本加临时 /32 路由绕开它,并先跑 `tcp_path_check.sh`(用完删路由、停 server)。
## 结论
**门 (b) 通过。** 另一台机器上的 client 经 TCP 重放 Minecraft 世界内 trace(rd12),画面与设备上一致;P6.5 必测数已记录。
client 是 trace 重放器,不是活的 Minecraft 实例(那是门 (a) 的 FCL 那一半)。
| 检查 | 结果 |
|---|---|
| ssim(非 benchmark,重放到目标调用) | openra **1.000000**;rd12 **0.99988301**(与设备上四臂同值 0.999883) |
| rd12 benchmark,251/251 帧、rc=0 | 三次(PRESENT_CREDIT 1/2/3)全部跑完 |
| openra benchmark,128/128 帧、rc=0 | 三次全部跑完 |
## 必测数
| 项 | openra | rd12 |
|---|---|---|
| 稳态 fps(第 2 帧起的帧时中位数),credit 1 / 2 / 3 | 133.5 / 114.3 / 104.6 | 16.9 / 21.3 / 22.1 |
| 首帧(加载帧)耗时 | 1.2–1.6 s | 51–53 s |
| 加载帧 stage 字节 | 247 MB(整段) | 2,698 MB |
| 稳态 stage 字节/帧(均值) | 1.81 MB | 1.52 MB |
| 稳态实测吞吐 | 26–38 MB/s | 20.6–24.3 MB/s |
| `wait_replies`(整段) | 1 | 324–350 |
| 回包 RTT 均值 / p50 上界 / p99 上界 | 4.1–6.8 ms / 8.2 ms / 8.2 ms | 15.7–17.3 ms / 4.1–8.2 ms / 131 ms |
| client 线程 CPU(整段) | 1.2–1.3 s | 6.2–7.2 s |
- **加载帧受带宽约束,稳态不是。** server 侧实测:加载帧 2,696 MB 在 51 s 里读完(`P65ServerFrame`,**52.4 MB/s** 持续),稳态只有 20–24 MB/s,每帧平均 1.5 MB 的话带宽本可撑到 ~34 fps。
稳态帧时 ~90% 是 `transport_wait`(client 发送本身每帧 <0.5 ms,`credit_wait_ms=0`),所以剩下的是往返延迟而不是 present 信用。
- **`PRESENT_CREDIT` 1 → 2:rd12 稳态 +26%(16.9 → 21.3);2 → 3 只再 +4%。** openra 上 credit 越大反而略低,落在噪声内(单次)。
- Wi-Fi 往返 RTT(`ping`)3.3–61 ms(均值 19),4.6–110 ms(均值 30)两次测量;手机省电状态影响大,逐次差别很大。
- 第一次直连跑同一 rd12 是 235 s(加载帧 220 s),本轮 70 s:同样的 2.7 GB,**Wi-Fi 吞吐在不同时刻差 4 倍**。以上数字是这一时刻的,不是上限。
- `toybox nc` 汇点测得 18–22 MiB/s,**低估了链路**:同一时刻 server 自己读到 52 MB/s。`netbench.sh` 测的是 nc 汇点,不是 Wi-Fi 上限(见下)。
## 没做
- 门 (a):FCL 同机 spawn、双后端入世界、杀 server 报 device-lost。
- 活的 Minecraft 在另一台机器上跑(这里是 trace 重放)。
- loopback tcp 对 spawn 的逐线程 CPU 差(五臂对比给了 fps,没给逐线程 CPU)。
- 每档只跑了一次,没有重复;credit 差别小于噪声的地方(openra)不下结论。
@@ -0,0 +1,331 @@
# device-lost 的回复容忍与纹理上传的等待粒度(handoff §4 / §5.1 落地记录)
> 2026-09-25。分支 `feat/disaggregated` @ `c984d952` 加本轮工作树改动。对应会话语料
> [`MOBILEGL-CS-HANDOFF.md`](../../../../MOBILEGL-CS-HANDOFF.md) 的 §5.1(A:进世界后的崩溃)与 §4(B:纹理上传等待粒度)。
## 0. 一句话
- **A**:客户端不再把 **DECLINED 回包**当作协议损坏。那正是进世界后 `Fatal{ProtocolCorruption, "Fence.reply"}`
(rc=134)的来源:device-lost 闩锁之后每个 verb 按设计 DECLINED,而 fence/query 两个消费点把它和 ERROR 折进了同一个 abort。
- **B**:wire 臂上纹理那半 `resource_subdata` 不再逐条买回包,等待点从「每条记录」落到「SEG_STAGE 窗口用尽」。
一帧 55,428 次回包等待(handoff §3.2 的实测)在机制上归零;真机端到端墙钟仍待复测(§3)。
## 1. A —— 一个 DECLINED 是答案,不是损坏
### 1.1 根因(三处,都是同一个折叠)
`ReplySink` 的状态空间是三值的,且它自己的头文件就写着这句话:**「DECLINED IS A REAL ANSWER, not a failure」**
(`MG_Remote/Wire/PipeWireCodec.h:457-460`);escape 那几行把另一半也说死了:**「ERROR IS NOT A DECLINE … an escape may not fold 2 into `false`」**
(`Client/WireTables.cpp:446-450`)。下面三处把 1 和 2 折成了一个 abort:
| 位置 | 折叠写法 | 真实后果 |
|---|---|---|
| `Client/EmitTables.cpp` `ReadFenceReply` | `status != kStatusOk \|\| replyBytes != sizeof(result)` → `WireProtocolFatal("Fence.reply", …)` | 进世界后区块上传期的 `glClientWaitSync` 撞上 device-lost 闩锁 → **Minecraft 26.2 崩溃(§5.1)** |
| `Client/QueryEmit.inc` `ReadQueryReply` | 同上 → `WireProtocolFatal("Query.reply", …)` | 同类:QueryAvailable / QueryResult / QueryTimestamp 三条 row 都会被它打死 |
| `MG_Impl/Pipe/PipeFill.cpp:1115` 自检 | 只比客户端记录序号 | device-lost 后 `resource_subdata` 按设计不发 → 自检误判「字节没送达」→ `Fatal{UncarriedInitialBytes}`,把**干净的 device-lost** 变成尸体(P12 出口门 (a) 卡在这条) |
DECLINED 有三条**完全不含损坏**的产生路径,两条在服务端、一条在客户端自己:
- 服务端按设计拒绝:`Wire/PipeWireCodec.cpp:1820-1830`(fence 两条 row)、`:1841-1861`(query 三条 row)——`PostReply(ok ? kStatusOk : kStatusDeclined, ok ? &result : nullptr, ok ? sizeof(result) : 0)`,
即一个**零长度**的合法答案;
- 客户端自己:`Client/ClientSession.cpp:1837`(device-lost 闩锁后每个 verb DECLINED)与 `:2025`(teardown 中死掉的门铃,注释原文就写着「报 DECLINED 而不是 ERROR」)。
而设计文档对 device-lost 的要求恰好相反:**「GL 调用变空操作、交换缓冲返回上下文丢失,而不是崩溃或卡死」**
(`design/08-runtime-and-platform.md:33`、`guide/glossary.md:18`)。前端自己也早有这个空操作:
`MG_Impl/GLImpl/Sync/GL_Sync.cpp:103-106`、`MG_Backend/DirectGLES/DirectGLES.cpp:16489`、`Server/PipeApplier.cpp:175-177` 都对「等不到的 sync」答 `GL_ALREADY_SIGNALED`。
### 1.2 改法
- **fence**:DECLINED → `FenceWait` 答 `GL_ALREADY_SIGNALED`、`FenceStatus` 答 1(signaled)。ERROR 与「OK 但短」**仍然是**原来的具名 Fatal。
- **query**:DECLINED → 该 row 自己的「还没有答案」值(零值即三者皆是:availability=false、`Produced=0`→false、timestamp=0)。ERROR 与短 OK 仍然 Fatal。
- **自检**:只在**会话没闩 device-lost** 时保持全效力(`&& !ClientSession::DeviceLost()`)。活会话上一个「发了却什么都没发出去」的 follow-up 仍然是它命名的那个 R-13.3 缺口。
- **不动的**:`ReadPixels` 的 `Fatal{ReadbackDeclined}` 是**故意的**(阻塞回读没有像素可还),本轮没碰,`ClientSession.cpp:2023-2024` 早就把它点名钉住了。
### 1.3 门与 red-once(R-16,真跑过一次红)
`MG_Test/Wire/RemoteClientControls.inc` 四个用例,全部在**活会话 + 对抗性 peer**上驱动生产消费点:
| 用例 | 断言 | 去掉修复后的红(实测) |
|---|---|---|
| `DeclinedFenceReplyAnswersSignaledInsteadOfAborting` | DECLINED 的 fence 回包 → `GL_ALREADY_SIGNALED` / `GetSyncStatus()==true` | `Fatal{ProtocolCorruption, "Fence.reply"} missing or malformed sync result`(**就是 §5.1 那条崩溃**) |
| `DeclinedQueryRepliesAnswerNoAnswerYetInsteadOfAborting` | 三条 query row → false / 未写出的 out 参数 / 0 | `Fatal{ProtocolCorruption, "Query.reply"}` |
| `ErrorFenceReplyStillRefusesByName` | **宽容不是一刀切**:ERROR 仍然具名 Fatal | (反向控制,修复前后都红/绿相反) |
| `DeviceLostRespecifyDoesNotDieOfTheUncarriedBytesCheck` | 闩锁后 `glBufferData(size,data)` 不再自杀 | `Fatal{UncarriedInitialBytes, "resource_respecify"} … 64 bytes of initial content exist on no side of the wire` |
绿:`RemoteClientControls` 30/30、`RemoteClientTest` 全量 **166/166**。
## 2. B —— 纹理上传不再逐条等回包
### 2.1 机制:一条谓词,两个半边
`MG_Pipe/PipeRoute.h` 的 `MGPipeSubDataWantsItsReply` 是**唯一**一处决定「这条记录要不要等回包」的地方(`MG_Remote/Client/WireTables.cpp:370` 与 `PipeRoute.h:328` 都读它,注释明写「a second spelling of it is how the client comes to wait for an answer the emitter told the server not to bother with」)。
本轮给它加了 wire 臂的一支:**客户端在 wire 臂上不再为纹理那半等回包**。
答案在 wire 臂上**是可推导的**,理由不是「没人读它」,而是三条站着的事实:
1. **发射本来就被答案的内容闸住了**。纹理记录只在 `FamilyIsLive(kMGPipeSubsystemTextureResources, …)` 成立时才产生,
而在 split 下那个闸**就是** `CapsMirrorInstance().ServerConsumes(bit 10)`(`PipeFill.cpp:1719-1740`)——
和服务端自己的验收闸(`PipeApply.cpp:1408-1419` `NoP4aConsumer`)读的是同一个已发布事实。
于是验收当初存在的唯一理由(「服务端没有消费者」,ID-39 / D-D5 / ID-18 M3)**不可能是**这条记录的回答。
2. **剩下的是 bug 类,而且本来就响**:target 不指纹理、没声明 texel、没字节 → 服务端 `MGP_TRIP_WIRE_REPORT`(`PipeApply.cpp:1201-1218`、`:2245-2252`);
handle 不存在 → 计数并具名(`ResolveResourceIn`,`:721-728`),而客户端自己的 tracker 靠「先 create 再 subdata」从源头杜绝(`PipeFill.cpp:1045-1051`)。
3. **客户端还能免费拿到的答案,一条都没丢**:发射器照旧读这条路返回的 Bool,所以**被客户端自己取消**的记录(device-lost、stage 用尽)仍然答「未接受」,
level 保持 dirty 并重试——D-D5 的安全方向原样不动。
**等待没有消失,它换了地方**:一条 run 放不进 SEG_STAGE 时会回收已退休字节并 park 在 stage 门铃上(`Wire/PipeWireCodec.cpp` 的 `StageAllocate` / `ReclaimStagedBytes`),
那是 run-ahead 客户端唯一欠的等待,且它正比于**窗口**而不是调用次数。
### 2.2 门与 red-once
`RemoteClientControls.TextureUploadsStopOwningAReplyOnTheWireArm` 用的是 handoff §3.2 的**同一个计数器**:
`LinkMetrics.cpp:76-80` 的 `wait_replies`(逐帧 `P65LinkMetrics` 行里那个字段,也就是「一帧 55,428」那个数)。本轮为它加了同进程读回的 `LinkMetricsReplyWaits()`,因为「等待没了」如果只能靠计时观察,那就只是实测、不是门。
| 步骤 | 断言 |
|---|---|
| 控制行:`glTexImage2D`(`resource_create` 是 kWaitReply) | `wait_replies` **必须**增加——否则下面的 0 会在「什么都没计数」的会话上假绿 |
| 被测行:`glTexSubImage2D`(纯 `resource_subdata`) | 记录真的过了线(`ClientWireRecordsEmitted()` 增加)**且** `wait_replies` 增加 **0** |
红(实测):把 `kClientWire` 那一支拿掉 → 子进程 exit 142。
**monolith 不变**由既有的 `RemoteRunAhead.OnlyTheTextureHalfOfResourceSubDataWantsItsReply` 继续钉住(臂是 `kNone` 时仍答 true)。
### 2.3 G1
谓词里新增的那一支**在 `#if MOBILEGL_BUILD_DISAGGREGATED` 内**,fall-through 是原来那一行表达式;
其余改动全部落在 split-only 的翻译单元(`MG_Remote/**`)或 `PipeFill.cpp` 的 `#if MOBILEGL_BUILD_DISAGGREGATED` 块内。
因此 pull 臂预处理后与改动前**逐字符相同**。**本机已按 G1 跑过 A/B**:pull 配置(Release、`/usr/bin/c++`、`MOBILEGL_BUILD_DISAGGREGATED=OFF`、`--target MobileGL`)在 `c984d952`(基线)与 `3b9f536d`(本轮)各建一次,结果 `.text` **13872002 = 13872002** 字节、符号 **31746 / 31746**、**0 增 0 删**,逐符号 `comm` 无任何差异(两棵树留在 `build-g1-base/`、`build-g1-head/`,符号表在各自的 `syms.txt`)。
### 2.4 「同类第二条」到底该不该等(handoff §4.3 末条 + §5.4)
handoff §5.4 说「55,428 次等待里各 op 各占多少」未量化,§4.3 说 `ResourceCreate` / `SetTextureParams` 是同类第二条、"需单独分析"。本轮把两件事一起做了:
给 `LinkMetrics` 加了**按 op 的回包等待计数**(`LinkMetricsBeginReply(wantsReply, op)` / `LinkMetricsReplyWaitsFor(op)`,与总计数一样只在 `MOBILEGL_PIPE_STATS=1` 时记),
并用它量了拼接器会产生的两种形状(`RemoteClientControls.ReplyWaitsByOpForAnAtlasShapedLoad`,先打印后断言,好让红的那一次也留下数字):
| 形状 | 没有 B | 有 B |
|---|---|---|
| **图集拼接**:一张 level 上 64 次 `glTexSubImage2D` | **64** 次回包等待 | **0** |
| **每 sprite 一张纹理**:64 张纹理 + 256 次 `glTexParameteri` | **384**(`ResourceSubData` 占 128) | **320**(`ResourceCreate` 76 + `ResourceRespecify` 130 + `SetTextureParams` 130,sub-data 0) |
结论两条:
1. **B 正好打在它要打的地方**:上传密集的形状(MC 的图集拼接就是这种)里,回包等待从「每次上传一次」变成 **0**——handoff §4.2 的预期在机制层面成立,
与「96 MiB ÷ 32 MiB 窗口 ≈ 3 次等待」是同一件事的两面(剩下的是 stage 退休,不再是回包)。
2. **剩下三个 row 不能照搬 B**,因为它们等的不是「你收下这批字节了吗」,而是**服务端的记录表里还有没有这个 handle**:
- `RespecifyOnce`(`TextureEmit.h:1332-1356`)原文:「the applier's REFUSAL is the only signal that says 'I hold nothing for this handle'」——
served context 的 teardown(`MGPipeApplierReleaseObjectRecords`)会丢掉对象记录而前端对象还活着,这件事**客户端本地推不出来**;
- `EmitTextureParams`(`:991-1017`)用同一个拒绝做自愈触发器(context 的默认纹理就是这条路径救回来的);
- `PublishCreate`(`:1303-1319`,D-I1/c0b)不能在「被拒绝的 create」上落发布闩,否则死亡路径会为一个不存在的记录发 `resource_destroy`。
所以这三条按 per-resource / per-call 结算,不是 per-chunk:**删掉等待就是删掉信号**。这条裁定已写进 `CONTRACT-P5E.md` §2.5。
**真机那一轮会直接在日志里看到这张表**:`LinkMetricsEnd` 现在把按 op 的拆分单独打一行
`P65LinkMetrics kind=per-op wait_replies=N by_op=2=…,3=…,47=…`(id 是 `MGPWireOp`:2 create / 3 respecify / 47 params / 48 sub-data)。
handoff §5.4 说过这条数字拿不到——spawn 下 client 不推进帧窗口、逐帧行不打,SIGKILL 又带不走退出时的 dump——而这一行正是从「正常收尾的客户端一定会走到」的那个位置打出来的。
## 2.5 真机结果(2026-09-25,两台设备上的第二次复现)
> **设备不是 handoff 那台手机**:本轮 `adb` 上的是 `aikjs4s8cys8ba7l`(TrebleDroid GSI,mt6893/Mali,Android 14,GLES 3.2,`192.168.1.178`),
> 不是 `90cee93`(SM8650/Adreno 750)。所以**绝对数字不可与 handoff 直接比**,可比的是机制与每条 row 的行为。
> 服务器 APK 用仓库里那份 trace release 自签后装(`mgl-device/mgl-local.jks`,一次性),客户端是本轮 `build-split`,
> 控制面 `tcp://192.168.1.178:40613`、数据面 stream、`MOBILEGL_IPC_SURFACE=server`,MC 26.2 + NeoForge 用 `--quickPlaySingleplayer` 直接进世界。
### A —— §5.1 的崩溃路径在真机上被走过了两次,都没有崩
两次运行里设备端的窗口都在会话中途消失(设备日志:`Fatal{ServerWindowLost, "surfaceDestroyed"}`),客户端随即闩上 device-lost,
而**下一条 `FenceWait` 收到的就是 DECLINED**:
~~~
[20:42:45] [Render thread/ERROR]: MGPipe: DEVICE LOST - the barrier woke on a peer that had hung up …
[20:42:58] [Render thread/ERROR]: MG_Remote client: the peer DECLINED a FenceWait reply - the verb did not
happen (a lost device, or a teardown); answering the no-op the frontend uses
for a fence it cannot wait on
~~~
这就是 handoff §5.1 那条崩溃的完整前因后果:**修复前这一行是 `Fatal{ProtocolCorruption, "Fence.reply"}` → rc=134**。
两次运行客户端日志里的 `Fatal{` 计数都是 **0**;世界也确实进去了(`Saving chunks for level 'ServerLevel[新的世界]'`、
`Changing view distance to 2, from 10`、`Started 10 worker threads` —— 与 handoff 记录的崩溃上下文同一组)。
### B —— 在真机上确实生效,但它不是那台帧的主因
第一次运行复现了 handoff §3.2 的那种「一帧吞掉全部等待」:
| | handoff(**没有** B,90cee93) | 本轮(**有** B,GSI) |
|---|---|---|
| 那一帧的 `wait_replies` | **55,428** | **43,232** |
| `stage_bytes` | 100,684,804(96 MiB) | 101,421,396(96.7 MiB) |
| `wall_ms` | 248,996 | **224,780** |
| `cpu_ms` | 18,391 | 13,413 |
两轮的 stage 字节几乎一样(形状相同),但**这不是受控 A/B**(两台设备),所以能下的结论只有一条,而它是直接证据:
第二次运行带了逐帧按 op 的拆分行,启动期那两帧是 `2=50,3=68,47=62`、稳态是每帧 1 次(op 9 = `FenceWait`,就是帧围栏),
**`ResourceSubData`(48) 一次都没有出现** —— B 在真机上按设计生效。
**handoff §4.2 的「55,428 → 约 3」不成立**:那一帧剩下的 43,232 次等待正是 §2.4 裁定「必须等」的三条 row(create / respecify / params),
按 96.7 MiB ÷ 每 sprite 一次上传估算,约每 sprite 3.5 次非上传等待。**B 是必要的,但不是那 2–3 分钟停滞的充分解**——
要动那一段,方向不是「把等待去掉」(那会删掉信号),而是**把记录数压下来**(同样的参数不必每条都发、同一 level 的 respecify 可去重)。这一条留给下一轮。
### 2.6 那一帧到底由什么构成(真机,`kind=frame-op` + `kind=frame-sent`)
第四次运行抓到了同一形状的那一帧(`wait_replies=43,232`、`stage_bytes=101,421,396`),两条行合起来第一次把「付了什么」和「发了什么」对齐:
| op | 发的记录 | 付的等待 | 说明 |
|---|---|---|---|
| `ResourceRespecify` (3) | 20,633 | **20,633** | 每条一等 |
| `SetTextureParams` (47) | 18,056 | **18,056** | 每条一等 |
| `ResourceCreate` (2) | 4,536 | **4,536** | 每条一等 |
| `ResourceSubData` (48) | 12,671 | **0** | ⭐ B:记录照发,回包一个不等 |
| `DrawVbo` (59) / `SetShaderBuffers` (38) / `SetSamplerViews` (35) | 9,121 / 9,120 / 9,122 | 0 | 这些 row 的等待是 barrier 类,不在本计数里 |
| `ObjectDeath` (78) / `ResourceDestroy` (4) | 7,515 / 3,770 | 0 | 死亡路径不发问 |
**每条等待正好对应一条记录**(三个 row 都是 1:1),所以 43,232 不是"等重了",而是"真的发了 43,232 条会问问题的记录"。
### 2.7 「把记录数压下来」这条路的结论:客户端没有可去重的记录
§3 上一轮把「少发记录」列为头号方向。本轮先做了一个**冗余探针**(`RemoteClientControls.ReplyWaitsByOpForAnAtlasShapedLoad` 里那段 `params probe`),
再去读设备上的实际计数,结论是否定的:
~~~
params probe: first=1 same-again=1 changed=2 (deltas 1/0)
~~~
- **同一个值再设一次不产生记录**(delta 0)——前端 setter 的冗余过滤 + emitter 的版本闩已经把它挡掉了;
- 换一个值才产生一条。
所以设备上那 18,056 条 `SetTextureParams` 是**真实的状态变化**,不是重复;`ResourceRespecify`/`ResourceCreate` 同理(respecify 的 `unchanged` memcmp 去重早就在了,`TextureEmit.h:838/858/865`)。
**结论:客户端侧没有"少发记录"的空间**——剩下的唯一杠杆是「同样多的记录,更少的往返」,也就是把等待批起来(同一条 row 每 K 条等一次)或把单次往返的成本降下来(数据面 stream 的 syscall/wake 路径),
不是继续找冗余。顺带确认:`TCP_NODELAY` 已经在 `SocketTransport.cpp:100` 设了,5 ms 不是 Nagle 造成的。
### 2.11 首次使用确认落地后的真机 A/B:那一帧 221.5 s → 134.4 s
按「确认推迟到该对象首次被使用」实现(提交 `b6270960`):发射端在发送参数前查发布闩,未发布就先补一次**阻塞的** create
(`HealUnpublishedRecord`,即把原来"被拒后才跑"的那段抽出来前移);对象一旦确认,参数记录全部 fire-and-forget,
调用方读到的是 accept-by-construction(与 B 的 `resource_subdata` 同形)。wire 端读**同一个闩**决定要不要开回复槽,
所以两半不会对"是否欠一次等待"给出不同答案。
同一台设备(GSI,出厂省电策略、服务端 spin 默认 50 µs、Wi-Fi LAN),同一份工作量:
| | 那一帧 waits | `by_op` | staged | 墙钟 |
|---|---|---|---|---|
| 改动前(frame 12) | **43,232** | `2=4536, 3=20633, 5=6, 9=1, `**`47=18056`** | 101,421,396 B | 221.5 s |
| 改动后(frame 25) | **25,176** | `2=4536, 3=20633, 5=6, 9=1` | 101,421,396 B | **134.4 s(−39%)** |
**`47`(`SetTextureParams`)整条从等待里消失,其余每一行一个不差**,staged 字节也完全相同——所以这 87 秒是"少买了 18,056 次往返",
不是别的什么变了;帧内 `rtt_mean` 5,040 → 5,176 µs(单次成本没动),正是"次数变了、单价没变"的形状。
**为什么不需要周期性金丝雀**:确实"服务端是否持有这个 handle"客户端本来就知道——`MGPipeHandleIsPublished` 在 create **被接受**时才置位,
而 applier 跨 make-current 保留纹理记录(`PipeFill.cpp:3756-3759`,这条注释直接否掉了"在 applier_reset 清闩"的做法:那会让每次 make-current 都无谓重发)。
所以确认只在**首次使用**付一次(那一次 create 本来就要发),之后每条记录都不必再问。兜底仍是老路径:
create 被拒 → 闩不置位 → 下一条参数记录照样阻塞取真答案 → 原来那段 one-retry 自愈照跑。
**下一个 20,633**:`ResourceRespecify` 仍逐条等(在 frame 25 里占 20,633/25,176 = 82%)。它与 params 同形(答案只用于 `NoteRespecified` 与自愈),
"对象已确认"这个前提同样成立——按同一条规则处理,估算落在 **~4.5k waits ≈ 24 s** 量级(create 那 4,536 是确认本身,应当保留)。
### 2.12 `ResourceRespecify` 的两半根本不同:buffer 是白送的,texture 才是那 20,611按"已确认对象不再等"处理这一行时,代码里两半的差别是决定性的:- **buffer 半**:`PipeFill.cpp:1105` 与 `:1142` **两处都把返回值丢掉**(`MGPipeRouteResourceRespecify(desc, nullptr);`), 所以那条等待买到的值当场被扔——改 fire-and-forget 是**纯收益、语义零变化**。- **texture 半**:返回值既是自愈触发器,又是**验收镜像 `LastDesc` 的闸**, `TextureEmit.h:885-888` 明写不许在未确认的答案上前进(ID-18 M3:否则下一次相同调用会被去重掉,而服务端从没存过)。于是本轮只落 buffer 半(提交见下),并用它把两半的占比量了出来——**同一帧的 `by_op`**:| | waits | `by_op` ||---|---|---|| 只做了 params(frame 25) | 25,176 | `2=4536, `**`3=20633`**`, 5=6, 9=1` || 再放开 buffer 半(frame 10) | **25,154** | `2=4536, `**`3=20611`**`, 5=6, 9=1` |**buffer 半只值 22 次等待(0.1%)——20,633 里几乎全是 texture respecify**,也就是带 ID-18 M3 约束的那一半。墙钟 134.4 s → 130.9 s(同一帧、同样 101,421,396 B staged)。**texture 半的正解(下一步,尚未实现)**:让镜像**只在真答案上前进**——fire-and-forget 之后 `NoteRespecified` 收 `accepted && !provisional`,于是最坏情况退化成"多补发一条相同 respecify"(安全方向),而绝不会变成"该重发的被去重掉"。这需要在 MG_Pipe 的回复信箱上把"临时接受"和"真接受"分开(信箱本来就有"最后一次调用"的纪律,`MGPipeTakeReplyBool` 就是这么读的),改动落在 route/mailbox + `EmitResourceRespecify` 一处判断。按同一模型估算:**25,154 → ~4.5k waits ≈ 24 s 量级**(create 那 4,536 是确认本身)。
### 2.13 R3 落地:texture respecify 也只在首次使用时付一次——那一帧 130.9 s → 31.3 s
实现:把"这一行要不要等"做成**唯一一处**判据 `MGPipeResourceRespecifyWantsItsReply`(`MG_Pipe/PipeRoute.h`),wire 端读它决定要不要开回复槽:
buffer 半永远不等(两处返回值都被丢弃);texture 半只在**对象未确认**时等(`MGPipeHandleIsPublished` 为假),确认本身由 `EmitResourceRespecify` 在首次使用时补的那次**阻塞 create** 付掉。
同一台设备、同一份工作量(staged **101,421,396 B**,与改动前逐字节相同)、出厂省电、服务端 spin 默认:
| | 那一帧 waits | `by_op`(等待) | `by_op`(发出的记录) | 墙钟 |
|---|---|---|---|---|
| R1+R2 之后 | 25,154 | `2=4536, 3=20611, 5=6, 9=1` | `2=4536, 3=20633, …` 共 103,088 | 130.9 s |
| **R3 之后** | **4,543** | `2=4536, 5=6, 9=1` | `2=4536, `**`3=20633`**`, …` 共 **103,094** | **31.3 s** |
**respecify 那 20,633 条记录一条没少(照发),少的是它们各自的那次往返**——这正是这条路线与"少干活"的区别。
独立审查给的预测是"4,543 waits、24–37 s(中点 ~30 s)",实测 **31.3 s**,落在中点。
**累计(同一帧)**:43,232 waits / 221.5 s → **4,543 waits / 31.3 s**(7.1×)。剩下的是 create 那 4,536 次等待 ≈ 23 s,
那是确认本身,不是浪费;硬地板还有客户端 CPU ~13.4 s 与传输 ~2.2 s(审查实测 43.1 MiB/s)。**想再往下只剩"批处理 create 行"**(4,536 → ~1.1k,且仍拿真答案)。
**两笔明账**:
1. **① 的守卫尚未接**:审查独立复核"今天不可达"(能清纹理记录的只有 `MGPipeApplierReleaseObjectRecords`,调用者只有测试;`MGPipeApplierReset` 不清它)。
接管时**优先查能否挂在 caps 代次/会话边界这类已有信号上**(一行);否则要新增反向通道第 10 个回调 = 协议面 = 两端重出 APK。
2. **画面未验**:这条路线改的是"客户端还问不问",`frame-sent` 一致是强证据但不是画面证据;R3 之后应补一次 SSIM/目视。
## 3. 剩余(下一轮的直接入口)
1. **把记录数压下来(新的头号项)**。§2.5 的真机数字说:那一帧剩下的 43,232 次等待全在「必须等」的三条 row 上,
约每 sprite 3.5 次非上传记录。**这条已经被本轮证否(§2.6/§2.7)**:记录是真实的,客户端没有可去重的空间。
于是唯一剩下的杠杆是「同样多的记录、更少的往返」,两个候选:
- **把等待批起来**:同一条 row 每 K 条等一次(回复槽池是 8 个,所以 K ≤ 8 是可证明安全的),
代价是消费点的答案要能延后兑现——`ResourceCreate`/`ResourceRespecify`/`SetTextureParams` 的答案只用来「落闩 + 自愈」,两者都可以延后到下一个同步点;
- **降低单次往返的 5 ms**:`TCP_NODELAY` 已设(`SocketTransport.cpp:100`),所以不是 Nagle;
数据面是 `stream`(socket),服务端 profile 曾经 65% 在 socket syscall —— 下一轮该重新采一次两侧的栈(handoff §3.3 的 `perf` + `simpleperf` 跑法仍然有效),
把「5 ms 里有多少是网络、多少是两侧 wake/调度」分开。
2. **受控真机 A/B**:本轮两台设备不同(GSI vs handoff 的 90cee93),55,428 vs 43,232 只能算旁证。要给出可比的数字,需要在**同一台设备**上跑一次带 B、一次不带 B(工作树里已有 `build-split/fix-b2.patch` 的往返做法)。
3. ~~真机端到端~~ **已完成(§2.5)**:A 的崩溃路径在真机上走过两次都没崩;B 在真机上按设计生效(op 48 零等待)。工具在仓库外的 `mgl-device/`:
`launch-mc.py`(按版本 JSON 重建启动命令,支持 `MC_QUICKPLAY` / `MC_GAMEDIR`)、`gl-aliases.sh`、`start-phone-server.sh`、`mkeystore`+签名步骤写在 README 里。
2. ~~同类第二条~~ **已分析完毕(§2.4)**:`ResourceCreate` / `ResourceRespecify` / `SetTextureParams` 保持 kWaitReply 是有据的裁定,
不是遗漏——它们的拒绝是「服务端没有这个 handle」的唯一客户端可见信号。**这条不再是待办。**
4. **主机门的环境前提**:本机 shell 沙箱没有 `/dev/dri`,所以任何需要真 EGL pbuffer 的车道(`SpawnLane.EventForfeitPeer`、`TcpLane.EventForfeitPeer`)在本会话里必然红(子进程 `kEglSurface = 12`),与本轮改动无关;`EventForfeitPeerTest.cpp:134` 的注释本来就写明这种 runner 会「every case reds before the ring ever fills」。
### 2.8 那 ~5 ms 一次往返,到底花在哪:**不是链路**
handoff §3.6 留过一个没解释的现象:把链路从 Wi-Fi 换到 USB(裸往返 5.76 ms → 1.70 ms,快 3.4 倍)墙钟几乎不动(3m15s → 3m03s)。
本轮在同一台设备上把这件事量清楚了——**同样的帧号、同样的记录数**,只换客户端连的地址(LAN ↔ `adb forward` 的 `127.0.0.1`):
| frame | Wi-Fi waits | Wi-Fi `rtt_mean` | USB waits | USB `rtt_mean` |
|---|---|---|---|---|
| 1 | 26 | 5,156 µs | 26 | **3,451 µs** |
| 2 | 180 | 7,934 µs | 180 | **5,716 µs** |
| 3 | 1 | 3,491 µs | 1 | **2,544 µs** |
| 4 | 1 | 8,106 µs | 1 | **6,579 µs** |
链路(含 adb 的用户态转发这一跳)把单次等待降了约 **25–30%**,量级不变。也就是说 **~5 ms 里的大部分不在链路上**,
而在「客户端 park → 服务端唤醒/读取/apply/回铃 → 客户端唤醒」这条本地路径上——这与两侧 profile 的形状一致(服务端 65% 在 socket syscall、约 15% 在门铃自旋)。
**结论:想动这一帧,只有两条路**——(a) 同样多的记录、更少的往返(把等待批起来,回复槽池 8 个 ⇒ K ≤ 8 可证明安全);
(b) 降低单次往返的本地成本(服务端 apply/wake 路径、`MOBILEGL_IPC_SPIN_US` 之类)。**不是**换链路,也不是去重记录(§2.7 已证否)。
### 2.9 那 ~5 ms 的真身:**设备侧的深度空闲退出**(本轮把 handoff §3.6 的谜题解开了)
§2.8 排除了链路,本节把剩下的候选一个个排除,最后落在一个可复现、可量化的原因上。同一台设备、同一份工作量(那一帧 43k 条记录),只改一个变量:
| 变体 | 单次等待均值 `rtt_mean` | 那一帧的墙钟 | 说明 |
|---|---|---|---|
| 基线(LAN + 客户端 spin 50 µs + 设备出厂省电) | 5.0–7.9 ms | **221.5 s**(43,232 waits / 101.4 MB staged) | |
| 客户端 `MOBILEGL_IPC_SPIN_US=2000`(自旋 40×) | 4.8–6.9 ms | — | 只快 ~10% ⇒ **不是客户端 park/wake** |
| `adb forward`(USB,裸 RTT 低数倍) | ~25–30% 更快 | — | ⇒ **不是链路**(§2.8) |
| **设备 CPU 钉住**:8 核 governor→`performance`,关掉 `cpuoff_l`/`clusteroff_l`/`mcusysoff`/`s2idle` | **3,715 µs**(帧内均值从 5,040 降下来) | **166.5 s**(43,218 waits / 100.5 MB staged) | ⇒ **就是它**:同一条数、同样的字节,**快了 25%** |
**机理**:服务端 apply 线程在两条记录之间 park,SoC 随即掉进 `cpuoff_l`/`mcusysoff` 这类深度空闲;下一条记录到达时要付**退出延迟**(毫秒级)。
每一条记录一次唤醒 ⇒ 每次往返 ~5 ms,与链路无关(§2.8),也与客户端怎么等无关(自旋试验)。
**这同时解释了 handoff 的两处观察**:§3.6「换快 3.4 倍的链路墙钟不变」(因为钱花在设备的唤醒上),以及 §3.3 服务端 profile 里那 65% 的 socket syscall / 15% 门铃自旋(等待与唤醒的形状)。
**也要说清楚**:handoff §3.2 那 249 s 是在**没有**做设备定频/关空闲的机器上取的(项目自己的纪律 `guide/pin-verification-2026-09-07.md` 就是为这件事写的),所以它的绝对值里含这份空闲税。
### 2.9b 同一个诊断的可移植修法:**服务端的自旋预算**(已实测,不需要 root、不需要改代码)
§2.9 的机理直接指向一个已经接好线的旋钮:服务端 apply 线程在记录之间 park 得越早,SoC 越容易掉进深度空闲。
本轮把它调大再测(同一台设备、同一帧、43,232 条记录、101.4 MB staged):
| 变体 | 最大帧 `rtt_mean` | 墙钟 | 代价 / 前提 |
|---|---|---|---|
| 基线(服务端 spin 50 µs,出厂省电) | 5,040 µs | **221.5 s** | — |
| **服务端 `MOBILEGL_IPC_SPIN_US=2000`** | 4,145 µs | **182.8 s(−17%)** | 设备侧多烧一点自旋 CPU;**不需要 root**、**不需要改代码** |
| 设备定频 + 关深度空闲 | 3,715 µs | **166.5 s(−25%)** | 需要 root/系统权限 |
`MOBILEGL_IPC_SPIN_US` 通过 Activity 现成的 `env` extra 传进去即可(`ServerEnvironment.apply` 的语法是 `KEY=VALUE;KEY=VALUE`,且它不在 `SCRUBBED` 名单里):
~~~sh
adb shell am start -n top.mobilegl.plugin.trace/top.mobilegl.plugin.MobileGLDisplayActivity \
--es listen tcp://0.0.0.0:40613 --es token <token> --es backend DirectGLES \
--es env "MOBILEGL_IPC_SPIN_US=2000"
~~~
服务端日志自己会证明它生效了:`mgl-srv-apply started … spin 2000 us`。**这条已经是可用的缓解手段**;要不要把它做成 Android 上的默认值(一行 env 或一个默认常量)是产品决定:
它拿设备 CPU 换墙钟,而这一帧本来就 94% 在等。
### 2.10 于是「2–3 分钟停滞」的修法清单(按预期收益排序)
1. **把等待批起来**(K ≤ 8,回复槽池可证明):同样多的记录、少得多的唤醒。与第 2 条互补,且**纯客户端**,不需要设备权限。
2. **让服务端在记录之间保持"热"**:它自己的自旋预算(设备日志里的 `spin 50 us`)——但 APK 今天没有把 `MOBILEGL_IPC_*` 接进去(P12 阶段表里那条 "FCL env 与 plugin APK 开关表接线" 未做),所以真机上只能靠 root 钉频率来证明这块蛋糕有多大(本节已证明:25%)。
3. **测量纪律**:任何 split 真机数字都应该在定频+关深度空闲的设备上取,否则把设备省电策略算进了"协议代价"。
## 4. 证据位置
| 位置 | 内容 |
|---|---|
| `MG_Test/Wire/RemoteClientControls.inc` | 本轮五个用例(四个 A + 一个 B),每个都写了它自己的红是什么 |
| `MG_Test/Wire/RemoteClientTest.cpp` | `RemoteRunAhead.OnlyTheTextureHalfOfResourceSubDataWantsItsReply`(monolith 侧的钉) |
| red-once 命令 | `./build-split/MobileGL/MG_Test/Wire/RemoteClientTest --gtest_filter='*Declined*:*DeviceLostRespecify*:*TextureUploadsStopOwning*'`,配合 `build-split/fix-a.patch`、`build-split/fix-b.patch` 两个临时补丁往返 |
| 全量 | `ctest --test-dir build-split -E "Scenario|EventForfeitPeer"`:2616 例,除上述沙箱 EGL 两条外全绿 |
+43
View File
@@ -0,0 +1,43 @@
# P12 出口门 (a):FCL 里的 Minecraft 渲染到 render server 窗口,杀 server 干净 device-lost
> 2026-09-29,Redmi `2f7cbe2e`(Adreno 830)。server = trace APK `26.09.27cbc53-trace` 的 **Render Server 屏**(勾 On-screen window,
> endpoint `tcp://127.0.0.1:40613`,Extra env `MOBILEGL_BACKEND_TYPE=…;MOBILEGL_PIPE_STATS=1`,点 Start server),窗口在 `:mglwin` 进程里。
> client = FCL fordebug `com.tungsten.fcl.mgdebug.debug` 里的 Minecraft 26.3-rc-3,世界 `test`,`/sdcard/FCL/mg_transport.txt=spawn`,
> `mg_env.txt` 里 `MOBILEGL_IPC_CONTROL=tcp://127.0.0.1:40613`、`MOBILEGL_IPC_DATA=stream`、`MOBILEGL_IPC_SURFACE=server`、`MOBILEGL_BACKEND_TYPE`。
> 驱动 [`tools/device_bench/disagg/fcl_accept.sh`](../../../../tools/device_bench/disagg/fcl_accept.sh),截图在 `.trace-work/perf-compare/fcl-accept/`。
## 结论
**门 (a) 通过,两个后端各一遍。** Minecraft 世界内的画面实时画在 render server 的窗口上;`kill -9` server 后 client 在毫秒级闩住 device-lost,FCL 进程不崩。
| 后端 | 入世界、画面上屏 | `kill -9` server | FCL 之后 |
|---|---|---|---|
| Espryt(DirectGLES) | ✅ 夜晚草原,天空 / 树 / 手 / 快捷栏都在;client `present` 计数持续增长 | `DEVICE LOST`(1 行),54 ms(修日志洪水前的构建,精确计时);修后构建同样闩锁 1 次 | 进程还在(修前构建观察 100 s;修后构建 ≥ 20 s),后续 present 被 DECLINED 空转 |
| Magma(DirectVulkan) | ✅ 画面上屏、`present` 持续增长;竖屏窗口里也是完整画面(几何修复后) | `DEVICE LOST`(1 行),33 ms(修前构建,精确计时);修后构建同样闩锁 1 次 | 进程还在(修前 ≥ 30 s;修后 ≥ 10 s) |
## 为了跑通做的三件事
1. **FCL 一退后台游戏就暂停。** FCL 的界面离开前台时,SDL 被切到 PAUSED,GLFW 的 focused / visible 也被撤销,渲染线程停住;而 server 窗口要在屏幕上就必须把 FCL 切到后台。
FCL fork 里新增版本设置 **「游戏退到后台时不暂停」**(`keepRunningInBackground`,默认关,在版本设置的渲染组里):开启后强制用 TextureView 并让系统别销毁它的 SurfaceTexture
(SurfaceView 在界面不可见时会被销毁,游戏拿着失效窗口会报 `Failed to create backend OpenGL/Vulkan`),界面离开前台时不通知 SDL 暂停、不撤销 GLFW 焦点。
改动在 FCL 仓库(`JVMActivity`、`VersionSetting`、`VersionSettingAdapter`、`LauncherHelper`、三份 strings),已提交并推送(FCL 仓库 `merge-upstream-surfaceview`,`241471515`)。
2. **FCL 的默认 spawn(游戏进程派生 server 子进程)走不通,只能接外部 render server。** FCL 把自己的窗口指针发给 server,server 按 P12 设计具名拒绝
(`Fatal{UnmigratedSurface, "AndroidNativeWindow@P12"}`),client 随即 device-lost。
3. **修了一个日志洪水。** device-lost 之后每个被 DECLINED 的 verb 都打一行 ERROR(`…woke on a dead doorbell; the server is gone`),FCL 里 48 秒 113,080 行、几千行/秒。
`ClientSession.cpp` 两处改为闩锁已经说过之后不再重复;修后同样流程 `DEVICE LOST` 1 行、`dead doorbell` 0 行。
## 没验证 / 观察到的
- (已修)竖屏 server 窗口里画面被裁:见下一节。
- 没测性能、没测输入(server 窗口不转发触摸,游戏是自己进世界的,没有人操作)、没测长时间稳定性。
- 时序有要求:FCL 的 JVMActivity 出现后要再等约 10 s 才把 server 窗口切到前台,否则游戏因 surface 未就绪卡住启动。
- 每个后端只跑了一遍。
## 竖屏窗口里画面被裁(已修)
**现象:** server 窗口是竖屏(1280×2620)时,游戏帧 2620×1280 只画出左下角 1280×1280 的一块,热键栏被切掉一半。最初只在 Magma 上看到,**Espryt 在竖屏窗口里同样被裁,Magma 在横屏窗口里是对的**——所以不是后端问题,是窗口方向。
**根因:** SDL(Minecraft 的 Android 后端)建 EGL window surface 时不带 `EGL_WIDTH` / `EGL_HEIGHT`,client 于是向 server 请求 **0×0**("用 server 窗口自己的大小");server 窗口取了竖屏尺寸,client 的默认帧缓冲就成了 1280×2620,
而游戏按它自己的窗口(FCL 的 2620×1280)渲染,1:1 画进去就被裁了。server 侧其实早就支持"client 指定尺寸 → `setFixedSize` + 视图等比留黑边"(`MobileGLDisplayActivity`),只是这一路没人传尺寸。
**修法:** `EGLImpl::CreateWindowSurface`(split 构建、Android、server-owned 窗口)在没有 `EGL_WIDTH/HEIGHT` 时用传进来的 native window 的 `ANativeWindow_getWidth/Height` 作请求尺寸。
修后日志 `display geometry 2620x1280 requested (SurfaceHolder.setFixedSize)`,竖屏窗口里显示完整的一帧、上下留黑边,两个后端都一样(截图 `geom-*-portrait-fixed.png`)。
**没验证:** 修后的横屏窗口没有重测(这台机的 `cmd window user-rotation lock 1` 没让显示转过去;修前横屏两个后端都是对的,请求尺寸与窗口相同,理应不变)。
@@ -0,0 +1,21 @@
# P12 集成者裁定日志(「server 自有屏幕窗口」子集)
> 形式沿用 [`../p7/INTEGRATOR-DECISIONS-P7.md`](../p7/INTEGRATOR-DECISIONS-P7.md):一条裁定一个 ID,只记「定了什么、为什么、影响哪些文件」,不记来回。计划与交接见 [`PLAN-P12.md`](PLAN-P12.md),任务书见 [`BRIEF-onscreen.md`](BRIEF-onscreen.md)。
| ID | 日期 | 裁定 | 理由 | 影响 |
|---|---|---|---|---|
| ID-P12-1 | 2026-09-24 | 用户四条裁定为本子集的边界:server APK 自建 `ANativeWindow`(自己的 SurfaceView)**上屏**,离屏(pbuffer)路径保留;**同一时刻只一条活跃**,在 server 初始化 / context 创建时决定;拓扑为**进程内 server**(display Activity 自己的进程里一个线程跑 TCP server,会话串行);client 以新的 `WindowKind::ServerOwned`(控制修订 3)接入,可**完全无头**,几何由 server 回传。 | 用户裁定(`BRIEF-onscreen.md` §User rulings);ROADMAP P12 行「按重审 §6 改小」已删掉 Surface 传递那一半。 | 全部 15 个 `(P12)` 提交 |
| ID-P12-2 | 2026-09-24 | 会话的表面模式在**第一次成功的表面创建**时闩定(ServerOwned 窗口 → 上屏,pbuffer → 离屏),之后另一种表面**具名拒绝**(`SurfaceRefusal::SurfaceModeMismatch`,reply ok=false,不闩会话);client 自己命名的窗口(X11/Win32/None,D8 未关)两种都不算、不闩也不拒。 | 「同一时刻只一条活跃」落到每会话;拒绝是配置答复,不是对端坏字节。 | `ServerLoop.{h,cpp}`(`SessionSurfaceModeAdmits`) |
| ID-P12-3 | 2026-09-24 | 失窗(`surfaceDestroyed` → `ServerDisplay::Detach`)的顺序即契约:apply 线程先让后端放掉窗口(Espryt 销毁 EGL surface/context,Magma 销毁 swapchain/VkSurface),再以 `Fatal{ServerWindowLost}` 闩会话(client 读干净 device lost),**最后**才结束租约、让回调返回;`Detach` 有界 3 s,超时不抽走窗口(引用留到租约结束),具名 `TimedOut`。 | GLSurfaceView 契约:回调返回后不得再往窗口渲染;UI 线程不能被无界占住。 | `ServerDisplay.{h,cpp}`、`ServerLoop.cpp`、`FatalFamilies.def`、`DisplayServerJni.cpp` |
| ID-P12-4 | 2026-09-24 | 进程内 server 用线程交接会话(`TcpSupervisor::Handoff::Thread`):预认证、Busy、DataBind 路由与 fork 形状同一份代码;会话间 `ResetSessionLatch`;后端**按进程钉住**(无 `MOBILEGL_BACKEND_TYPE` 时取第一个会话的);fork 出的会话子进程 `PR_SET_PDEATHSIG` 随监督进程去。以崩溃隔离换窗口可达:会话里一个未武装的 `SessionFail` 会带走 Activity 进程。 | `ANativeWindow` 过不了 fork / exec;Espryt 与 Magma 永不同进程(`BenchService.java` 的规则)。 | `ServerMain.cpp`、`InProcessServer.h` |
| ID-P12-5 | 2026-09-24 | 以下是**审查轮的修复**(15 条发现归并为 10 个问题,2 条被驳回为本改动之前就有的问题、不在本 diff 内)。**大项一**:失窗请求在 `DrainRing` 的**每次 pop 之前**也检查(在 latch 检查之后,`ph_latch_sites.py` 的 MECHANICS 行仍钉 latch 检查为循环首句),不再只在批与批之间由 `PumpControlRequest` 应答。 | 持续推帧的 client 让命令环数秒不空:`surfaceDestroyed` 在 UI 线程等满 3 s 后 `TimedOut`,会话继续往已销毁的窗口 present。 | `ServerLoop.cpp`;`ServerLoopLatchTest.ALostServerWindowIsReleasedMidBatchWhileTheClientStreams` |
| ID-P12-6 | 2026-09-24 | **大项二**:`DropEveryTwinForEndedServerSession` 同时清空 `TextureImpl::g_boundTexturesCache`、`SamplerImpl::g_boundSamplersCache`,并把 `g_activeTextureUnit` 置回 0。 | twin 在 `InProcessTeardown()` 为真时不从单元影子里擦掉自己,影子留下指向已释放 twin 的裸指针;下一会话的 twin 落在回收地址上就读成「已绑定」而跳过真实绑定,上传落到 texture 0、画面黑。新 context 的活动单元是 `GL_TEXTURE0`。 | `Managers.cpp`;`SanityTest EsprytServerSession.TheServerBackendsDestructionEmptiesTheTextureAndSamplerUnitShadows` |
| ID-P12-7 | 2026-09-24 | **停在推流中**:进程内 server 停止(`mobilegl_server_stop_inprocess`)时,`RunSession` 在 `loop.Stop()` 之前调 `ServerLoop::AbandonQueuedRecords()`:drain 在手上这条记录后停,退出路径不再 drain 剩余队列(与 `ReverseChannelForfeit` 同形)。**正常的 client EOF 仍 drain 完**。 | 批内剩余 + 退出 drain 一个仍在被补满的环,会超出 `Stop()` 的 5 s 有界 join,`Fatal{ApplyThreadJoinTimeout}` 带走 Activity 进程。 | `ServerLoop.{h,cpp}`、`ServerMain.cpp`;`ServerLoopTest.StoppingTheServerUnderAStreamingClientLeavesTheQueueAndJoinsPromptly` |
| ID-P12-8 | 2026-09-24 | **会话结束的清理补齐两处**:Magma 的 `~BackendObject_DirectVulkan` 在传输下丢弃进程全局的 `pVulkanRenderer`(带代际递增与程序反射缓存清理,同 `ReleaseEGLResources`);Espryt 的析构调 `ForgetRequestedSwapInterval()`。monolith 不变;pull 构建的析构仍为 `= default` / 不变(G1)。 | 未经 `eglTerminate` 就断开的 client 不会发 `ReleaseEGLResources`,renderer(窗口上的 swapchain / VkSurface)在租约结束后仍挂在窗口上;swap interval 是有意跨表面重建保留的进程全局,下一会话会静默继承上一个 client 的值。 | `BackendObject_DirectVulkan.cpp`、`DirectGLES.{h,cpp}`、`BackendObject_DirectGLES.cpp` |
| ID-P12-9 | 2026-09-24 | **陈旧尺寸**:`ServerDisplay` 记下最后请求的几何与布局最后报告的尺寸;在固定尺寸之后请求 0/0(窗口自己的尺寸)时,等(几何宽限内)布局尺寸回来,或等请求之后任何一次不等于旧固定尺寸的报告。 | `setSizeFromLayout` 与 `setFixedSize` 一样是异步应答;原实现对 0/0 立即授租,拿到的是上一会话的固定尺寸。 | `ServerDisplay.{h,cpp}`;`ServerDisplayTest.TheWindowsOwnSizeAfterAFixedSizeIsTheLayoutsNotTheStaleFixedOne` |
| ID-P12-10 | 2026-09-24 | **client 侧几何三条**:(a) 对 server-owned 表面的 `ResizeEGLWindowSurface` 走几何请求(同一持有者重取租约、等 display),后端表面随窗口**真实**尺寸,reply 带回该尺寸,client 采用它而不是自己请求的值(`ServerResizeServerOwnedWindowSurface`);(b) client 跟踪**全部** server-owned 表面,一个 extent 应用到所有(它们共用 server 的一个窗口);(c) Espryt 的 extent 发布只针对 server 自己的窗口——`ServerLoop` 经 split-only 的 `MGPipeServerSetOwnedWindow` 告诉后端哪个窗口是自己的,client 自己命名的窗口保持只发格式。 | (a) 原实现只改后端记录,手机上的 SurfaceView 不变,EGL 状态报的是请求值;(b) 单槽让第二个表面抢走第一个的更新、释放后第一个再无更新;(c) 不带旋钮的会话被切到了重分配臂。 | `ServerLoop.{h,cpp}`、`BackendObject_Remote.cpp`、`ClientSession.{h,cpp}`、`PipeInputs.{h,cpp}`、`DirectGLES.cpp` |
| ID-P12-11 | 2026-09-24 | **日志转发**:进程内 server 装 `SetSessionLogForwarder`——只有会话线程与选择加入的线程(该会话的 apply 线程,`SetThreadForwardsLogToPeer`)转发,且在释放日志互斥之后、在独立的转发互斥下发送(`WithLogBarrier` 两把都拿,flush ack 仍在每条已开始的发送之后;发送本身打的日志不再转发)。fork 出的会话子进程仍用 `SetLogForwarder`,pull 构建的 `Log()` 不变(G1)。 | `MOBILEGL_IPC_ROLE=server` 让 Activity 进程里每个线程都是 server 角色:UI 线程与监听线程(含别的对端地址、Busy 拒绝)的日志进了当前 client 的控制 socket;而阻塞的 `SendFrame` 在全局日志互斥下执行,不读的 client 会在 UI 线程下一次打日志时把它挂住。 | `Log.{h,cpp}`、`ServerMain.cpp`、`ServerLoop.cpp` |
| ID-P12-12 | 2026-09-24 | `IterationRPProgram203Scenario`(`integration-magma-full-split`)**不在本轮范围内**,门里出现时按「既有、环境敏感」读(ID-P7-22),不阻塞 P12 的合并。 | 用户裁定(2026-09-24);PLAN-P12 §2 已独立复核非本包引入。 | 过程 |
| ID-P12-13 | 2026-09-24 | 审查轮修复**未在真机上复测**:本轮的执行环境是没有 Android 设备与 NDK 的云容器,APK 重建、设备七项检查、以及「推流中按 HOME、回调返回前 surface 已释放并记录耗时」这一项都**没有跑**,留作 P12 收尾的下一次设备窗口。主机门见 ID-P12-14。 | 如实记录;设备证据仍是 `device/` 下审查轮之前(`29b7b284`)的。 | 过程 |
| ID-P12-14 | 2026-09-24 | **主机门(审查轮,云容器:4 核、clang-19、lavapipe/mesa 25.2)**:`unit` **2605/2605**(含本轮四个新用例)、spawn / tcp 与三条 Magma 双进程车道全绿,卫生 12/12,fatal census 79 / link ratchet 171 不变,协议修订 3 钉住(`gate/gate-review-3c342c97.log`)。**两个大项的红-绿已演示**:删掉 `DrainRing` 的逐记录失窗检查,新用例红——`Detach answered TimedOut in 3000 ms after 200 of 200 streamed records`;删掉三处单元影子重置,新用例四条期望全红(影子仍指向结束会话的 twin);恢复后皆绿。门里剩下的红**全部归环境**:`SplitLogPaths` 与 `spawn_lane_parity` 读的是 ctest 注册,而本容器的 CMake 3.28 生成的注册缺车道环境(CTest 3.x 还解析不了生成脚本的 `IN_LIST`,CMake 4.4 则把车道环境列表压成一个变量——`gate/gate-review-d04ac7d1-cmake4.log` 里 integration-gpu 2052 红即此);integration-gpu 的 4 条 `PersistentCoherentMapScenario` 与 3 条 `F1WireScenario` 在 `cb0404f2` 与本轮 head 上用同一环境**直接跑二进制**结果完全相同(前者两边都红、后者两边都绿),故非本轮引入;`IterationRPProgram203Scenario` 见 ID-P12-12。自 `cb0404f2` 起没有任何 CMake 文件改动。 | 如实记录;在与原门同一 CMake 版本的机器上复跑是合并前的剩余一步。 | 过程;`gate/`、`gate-container.sh` |
| ID-P12-15 | 2026-09-24 | **G1 成立(审查轮)**:pull 构建(`DISAGGREGATED=OFF`、`PIPE_PUSH=OFF`,连测试全目标编过)在 `cb0404f2` 与本轮 head 上同机同编译器(clang-19)构建,`libMobileGL.so` 的 `.text` 两边都是 `0x9b1bf2`,`nm --defined-only \| awk '{print $3}'` 符号集 30614 对 30614、**增 0 减 0**。(`0xa52203` 是原门那台机器的编译器读数,跨机不可比;同机前后对比才是 G1 的读法。) | 审查轮改动都在 `MOBILEGL_BUILD_DISAGGREGATED` 之内,`Log()` 的锁形状在 pull 构建里也保持 `lock_guard`。 | 过程 |
+104
View File
@@ -0,0 +1,104 @@
# P12「server 自有屏幕窗口」子集 — 计划与交接(2026-09-24)
> 接 P7 收官([`../p7/HANDOFF-2026-09-23.md`](../p7/HANDOFF-2026-09-23.md))。基线 `feat/disaggregated@9f669e52`。
> 包树 `~/w7/p12-onscreen`,分支 `p12/onscreen`(从 `9f669e52` 分出,15 个 `(P12)` 提交)。
> 任务书 [`BRIEF-onscreen.md`](BRIEF-onscreen.md),只读审计 `map-*.md`(四份),本页是**交接与余项**。
## 1. 这一包做了什么
按用户裁定([`BRIEF-onscreen.md`](BRIEF-onscreen.md) §User rulings,四条):Android 上的 server **自己创建
`ANativeWindow`(自己的 SurfaceView)**,把 IPC 渲染流**渲染到屏幕上**;离屏(pbuffer)与上屏两条路径**都保留**,
**同一时刻只有一条活跃**,在 server 初始化 / context 创建时决定;拓扑为**进程内 server**——display Activity
自己的进程里用一个线程跑 TCP server 并直接渲染进它的 SurfaceView,会话在该进程内**串行**;client 侧用一个
**新的 `WindowKind::ServerOwned`** 接入,且此模式下 client **完全无头**(`eglCreateWindowSurface` 接受 `NULL`),
窗口几何由 server 回传。
落地的形状(15 提交,53 文件,+4566/−110):
| 面 | 内容 |
|---|---|
| wire | `WindowKind::ServerOwned = 7`(fbs 追加)、控制修订 **2 → 3**、`SurfaceRefusal` / `SurfaceReply`(width/height/refusal)、codec 的 ServerOwned 规则(仅 `CreateWindowSurface`、`nativeToken == 0`、`SetWindowHandle` 具名拒绝)、非零 token 的 latch 行 |
| server 窗口 | `MG_Remote/Server/ServerDisplay.{h,cpp}`(不透明窗口 + hooks + lease + 有界 `Detach`)、ServerOwned 臂的 one-mode-per-session latch、无显示时的具名拒绝、失窗在 apply 线程释放、`ServerWindowLost` 家族行 |
| client | `MOBILEGL_IPC_SURFACE=server`(`Config.h` / `ConfigLoader.cpp`)→ 无头窗口 surface、**一次** ServerOwned `CreateWindowSurface`、**不发** `SetWindowHandle`、geteometry 进 EGL state 后才返回 |
| 进程内 server | `RunSession` 改为返回退出码、`TcpSupervisor` 把已认证会话交给线程(Busy / 会话间 `ResetSessionLatch` / 后端按进程钉住 / 非阻塞 stop)、fork 出的会话子进程 `PR_SET_PDEATHSIG` 随监督进程去 |
| Android | `MobileGLDisplayActivity`(`:mglwin`,全屏 SurfaceView,aspect-fit,env 在库加载前应用)、display server 的 JNI(`DisplayServerJni.cpp` + 几何 up-call)、与 `MobileGLServerService` 共享环境、**同一时刻只有一个 server**(Activity 停 service,service 杀 `:mglwin`) |
| 工具 | `tcp_device_server.py --surface window\|pbuffer`、Linux glws 的 `MOBILEGL_TRACE_SURFACE=window` |
| Espryt | 远端会话的 window-surface extent 随其默认 framebuffer 格式发布(仅 split 构建,pull 构建不动;G1) |
## 2. 门与证据
**G1(硬约束)**:pull 构建 `.text` `0xa52203` 不变、符号 0 增 0 减。门日志 `gate/gate-android1.log` 报
`a52203`,但那一行印的是 `added=30570 removed=30570`——**这是错的读法**:比较基准
`~/w7/logs/p12/pull-syms-base.txt` 是用 `nm --defined-only … | awk '{print $3}'` 生成的(每个目标文件
的符号头行 + 符号),而比较时用的是无 awk 的全量 `nm` 输出,两边不同源,于是"全部新增又全部删除"。
交接时已独立复核:在 `~/w7/pipe`(pull 构建,恰在 `9f669e52`)与 `p12-onscreen` 两个 `build-linux` 上
直接 `nm --defined-only | awk '{print $3}' | sort` 后 `comm`,**added 0 / removed 0,符号集各 30570 全同**;
`readelf -S` 两边 `.text` 都是 `a52203`。**G1 成立**;门脚本的那一行输出应在 P12 收尾时修好(见 §4)。
**主机门**(`gate/gate-android1.log`,head `29b7b284`,dirty=0,2026-09-24 00:55–01:04):
- unit 2601、integration-split 322、spawn 239、tcp 243、magma-split 125、magma-spawn 104、magma-tcp 89、
integration-gpu 2188 × 2(monolith / inproc)**全绿**。
- `integration-magma-full-split` 558 报 1 红(`IterationRPProgram203Scenario` 的 exposure texel)。**这不是本包引入的**:
交接时独立复核,用 ctest 注册的那组环境变量直跑该用例,`p12-onscreen` 3/3 绿、`mismatches=0/262656`;
整条车道 `-j 8` 重跑两遍也 558/558 绿。它是既有/环境敏感项,树上早有记录:`../p05/p05-results/value-types-v1.md`
判为**构建目录 configure 差异**(`MG_IntegrationTest/CMakeLists.txt` 只在 `MOBILEGL_ITEST_VK_ICD` 匹配
`lvp_icd|lavapipe` 时才挂三个 `MOBILEGL_MAGMA_*` 修复开关),`../p7/magma-a.md` §6.2 记它在该 worktree
3/3 稳定红且还原后端改动照样红,`../p7/INTEGRATOR-DECISIONS-P7.md` ID-P7-22 **改判为"环境敏感而非 tcp 专属"**。
`p12-onscreen` 两个 build 目录的 `MOBILEGL_ITEST_VK_ICD` 都已钉到 lavapipe,`ctest -N -V` 确认注册时带着三个修复变量。
- 卫生 12 项全 OK;fatal census 79 / link ratchet 171 不变;parity 0;protocol revision pin 报 **revision 3 holds**。
**真机**(Redmi `2f7cbe2e`,Adreno 830,证据 `device/`,`device/evidence-strip.png` 为九格拼图):
七个编号检查在两个 head(`984db455`、`a4a940db`、`29b7b284`)上跑过,`trial-*/` 是按 head 归档的旧轮次。
| # | 检查 | 结果 |
|---|---|---|
| 1 | Espryt 上屏(OpenRA,`--window-surface`,`MOBILEGL_IPC_SURFACE=server`) | ssim **1.000000**;server 日志 `surface=window 640x480 owner=server`;屏幕截图非黑 |
| 2 | Magma 上屏(OpenRA)+ 同进程第二个会话(`minecraft-1.21.4-startup`) | ssim **1.000000** / **0.999999511**;两臂都 `owner=server` |
| 3 | 串行第二会话 + `Refuse{Busy}` | 第二会话绿;并发客户端拿到 `Refuse{Busy}`(rc=134)后长会话照常收尾绿 |
| 4 | 失窗(`surfaceDestroyed`) | `Fatal{ServerWindowLost}` → 会话 latch → client 读**干净 device lost**;Activity 回来后新会话 ssim 1.0,`:mglwin` 存活 |
| 5 | 离屏 service(不带旋钮) | ssim 1.0,`surface=pbuffer 640x480`(离屏路径未被破坏) |
| 6 | 负控:`MOBILEGL_IPC_SURFACE=server` 打离屏 server | 双侧具名 `Refuse ServerOwned (NoServerDisplay)`;随后同 service 的离屏会话绿 |
| 7 | 一台设备上只有一个 server | Activity 起来杀 service、service 起来杀 `:mglwin`,互相都验证了 |
### 审查后复测(`feat/disaggregated@1fb18d9e`,2026-09-24)
审查修复后的同一 P12 实现 head 已在 Redmi `2f7cbe2e`(Adreno 830)重建并复跑七项检查。结果与上表一致:Espryt OpenRA SSIM **1.000000**;Magma OpenRA / Minecraft startup **1.000000 / 0.999999511**;串行第二会话和 `Refuse{Busy}` 通过;HOME 失窗得到 `ServerWindowLost` 干净 device-lost,surface 释放 **15 ms**,Activity 存活且重附后新会话 SSIM 1.0;pbuffer 与 `NoServerDisplay` 负控通过;Activity / service 互斥通过。第 6 项初次尝试与上一会话回收竞态命中 Busy;临时测试副本等待 2 秒后重跑,双侧具名拒绝和后续 pbuffer 会话均通过,仓库脚本未改。
审查后主机 **P12 定向 CTest 46/46 通过**:`ServerDisplayTest`、`ServerLoopTest`、`InProcessServer`、`SupervisorChildren`、`ServerOwnedSurface`。这组定向测试不等于完整主机门。证据在测试机 `/home/swung/w7/logs/p12-verify-1fb18d9e/`;日志、APK 和截图按证据数据规则未入仓库。当前 `0fe01588` 相对验证 head 只有文档整理及文档检查配置更新。
## 3. 收官处置(2026-09-29)
两个出口门都过了((b) [`CROSSHOST-ACCEPTANCE.md`](CROSSHOST-ACCEPTANCE.md)、(a) [`FCL-ACCEPTANCE.md`](FCL-ACCEPTANCE.md)),`MG_Remote/CONTRACT-P12.md` 已写,`gate.sh` 的 G1 已改。ROADMAP P12 行与任务书里原先"未落地"的每一项,处置如下:
| 项 | 处置 |
|---|---|
| in-process server 的 `unix:` 监听 | ✅ 已做(`c16fb5a8a`) |
| FCL env 与 plugin APK 开关表接线 | ✅ FCL 走 `/sdcard/FCL/mg_env.txt`;plugin / trace 两个 APK 都带 Render Server 屏与二进制(`1987bdff5`);FCL fork 新增版本设置「游戏退到后台时不暂停」(FCL 仓库,已提交 `241471515`) |
| DirectGLES `g_Display` / `g_Surface` / `g_Context` 去全局 | 不做:每进程一个会话时不需要 → [`DEBTS.md`](../../../Disaggregated/DEBTS.md) |
| cached-app freezer 的完整处理 | 不做:文档从未定义它;FCL 后台暂停的实测答案见契约 → DEBTS |
| 多 context | 不做(同上)→ DEBTS |
| D8 窗口种类白名单(拒 X11 / Win32Hwnd / None) | 不做:仍接受并把 token 强转为指针 → DEBTS(无主,等 Windows / X11 client) |
| TLS | 仍开放 → DEBTS |
| 逐条裁定日志 | ✅ `INTEGRATOR-DECISIONS-P12.md`(ID-P12-1..15) |
| 文档债(`ARCHITECTURE.md:526` 旧路径、`protocol.fbs` 旧注释、`CURRENT_STAGE_PROGRESS` 的"real windows cross processes") | ✅ 已清(设计文本已迁到 `design/`,`design/08-runtime-and-platform.md` 记上屏路径与几何) |
| IPC 顺序两处说法不一致 | ✅ ROADMAP 现为 P5 … P6.5 → Ph → P12 → P9 → P10 → P11 |
| `IterationRPProgram203Scenario` | ID-P12-12:按"既有、环境敏感"读,不阻塞 |
| a6 行 A8-3…A8-15 与 CONTRACT-P6 §7.2 D8 的逐行处置 | 由契约与裁定日志覆盖,**没有逐行列出** |
| 收官审查 | 用户裁定(2026-09-29)不派 agent / Codex 审查;由本人核对契约断言(发现两处措辞错误已改)并跑 G1 |
| G1 | G1(Arch,clang++,pull 构建,`6e35ea2c`):`.text` `0xa52203` = 基线,符号增 0 减 0 |
## 4. 收官前立刻做过的
1. `gate.sh` 的 G1 只在同机同编译器的基线上比较,否则说"未比较"并给做法,不再印无意义的 `added / removed`。
2. `notes/p7/INTEGRATOR-DECISIONS-P7.md` 里一条指向已缩成索引的 `ARCHITECTURE.md:531` 的引用改到 `design/08-runtime-and-platform.md:7`(文档引用门原先在 HEAD 上红)。
## 5. 工装在哪
- 任务书与审计:本目录 `BRIEF-onscreen.md`、`map-apk-process.md`、`map-client-surface.md`、
`map-docs-contract.md`、`map-server-surface.md`。
- 门与包树:`gate.sh`、`setup-tree.sh`、`fix-icd.sh`、`g1-base-names.sh`、`p203.sh`;主机门日志 `gate/`。
- 真机:`android/`(`dev.sh`、`check1/3/4/5/7.sh`、`final-run.sh`、`precheck.sh`、`redonce-tools.sh`、
`redonce-twins.sh`、`hostrepro.sh`、`verify-apk.sh` 等),证据 `device/`。
- **没进仓库的**(按 [`../notes/README.md`](../README.md) "证据数据"的规则):`~/w7/logs/p12/device/**/logcat*.txt`
等约 66 MB 设备日志、APK、`pull-syms-base.txt*`(2.5 MB nm 转储)。要复核请去产生它们的机器。
+118
View File
@@ -0,0 +1,118 @@
# P12 — Android 生产窗口路径(「server 自有屏幕窗口」子集已实现,未收官)
> 本页是该阶段的**阶段汇总**:阶段表行、实测与落地形状的完整文本(2026-09-24 从上层索引移入,原文照录)都在这里;上层只留摘要——[`ROADMAP.md`](../../../Disaggregated/ROADMAP.md)、[`MEASUREMENTS.md`](../../../Disaggregated/MEASUREMENTS.md)、[`ARCHITECTURE.md`](../../../Disaggregated/ARCHITECTURE.md)。文中 `file:line` 与"今天""当前"按各段写成时的头理解;文中的 `MEASUREMENTS.md §N` / `ARCHITECTURE.md §17.x` 编号保留,对照表见 [`../README.md`](../README.md)。
## 摘要
- 当前阶段。状态摘要在 [`../../CURRENT_STAGE_PROGRESS.md`](../../../Disaggregated/CURRENT_STAGE_PROGRESS.md);计划与交接 [`PLAN-P12.md`](PLAN-P12.md);任务书 [`BRIEF-onscreen.md`](BRIEF-onscreen.md);裁定 [`INTEGRATOR-DECISIONS-P12.md`](INTEGRATOR-DECISIONS-P12.md)(ID-P12-1..15);只读审计 `map-*.md` 四份。
- 形状:server APK 自建 `ANativeWindow`(`MobileGLDisplayActivity` 的 SurfaceView,进程内 TCP server,会话串行)把渲染流**上屏**;离屏路径保留、同一时刻一条活跃;client 以 `WindowKind::ServerOwned`(控制修订 3)**完全无头**接入,几何由 server 回传;失窗 → `Fatal{ServerWindowLost}` → 干净 device-lost。
- 进展:15 个 `(P12)` 提交 + 审查轮修复(10 个问题,ID-P12-5..11)已并入 `feat/disaggregated`;主机门绿(ID-P12-14)、G1 成立(ID-P12-15);审查后在 `1fb18d9e` 上完成 P12 定向 CTest 46/46 和 Redmi 真机七项复测。当前分支 `0fe01588` 后续提交只改了文档、文档检查范围和基准脚本说明文字,未改 P12 实现。
- **2026-09-25 追加(会话交接 §4/§5.1)**:**device-lost 的 DECLINED 回复容忍**与**纹理上传的等待粒度**已落地,各有自己的 red-once 门(前者就是进世界后 `Fatal{ProtocolCorruption, "Fence.reply"}` 那条崩溃;后者让单条纯上传的回包等待 1 → 0)。真机端到端(进世界不崩、那一帧墙钟)与 G1 本机复核仍待做,见 [`DEVICELOST-AND-UPLOAD-WAITS.md`](DEVICELOST-AND-UPLOAD-WAITS.md)。
- 出口门 (b) 已于 2026-09-28、(a) 已于 2026-09-29 通过([`CROSSHOST-ACCEPTANCE.md`](CROSSHOST-ACCEPTANCE.md)、[`FCL-ACCEPTANCE.md`](FCL-ACCEPTANCE.md));契约 `MG_Remote/CONTRACT-P12.md` 已写。未做的(DirectGLES 去全局、freezer、多 context、D8 白名单、TLS)已转入 [`DEBTS.md`](../../../Disaggregated/DEBTS.md)。
## 阶段表行(原 `ROADMAP.md`)
- **阶段**:**P12** Android 生产窗口路径
- **状态**:**已收官(2026-09-29)**——两个出口门都过([`CROSSHOST-ACCEPTANCE.md`](CROSSHOST-ACCEPTANCE.md)、[`FCL-ACCEPTANCE.md`](FCL-ACCEPTANCE.md)),契约 `MG_Remote/CONTRACT-P12.md` 已写,余项处置见 [`PLAN-P12.md`](PLAN-P12.md) §3。以下是 09-25 的进展记录:**子集已实现(2026-09-25)**:上屏 server 窗口、`WindowKind::ServerOwned`、无头 client、失窗 device-lost 已落地;审查轮 10 个问题已修(两个大项:批内失窗、会话间 Espryt 单元影子悬空;裁定 [`INTEGRATOR-DECISIONS-P12.md`](INTEGRATOR-DECISIONS-P12.md) ID-P12-5–11)。审查后 P12 定向 CTest 46/46、真机七项复测通过;出口门 (a) FCL + 杀 server 与 (b) 跨机 TCP 仍未完成(见 [`PLAN-P12.md`](PLAN-P12.md) §3)。
- **落地什么 / 范围**:**按重审 §6 改小**:~~Service 收 Java `Surface`~~ 删掉 Surface 传递那一半——server app 拥有自己的 SurfaceView,client 根本没有窗口,于是 minSdk 26 没有扁平化 `ANativeWindow` 的 NDK API 这条约束不再成立;`WindowKind::ServerOwned`;两个后端各一条 `CreateEGLWindowSurface` 臂;`m_windowHandle` 四处写点 + `sameHandle` 去重键(a6 §6);DirectGLES `g_Display` / `g_Surface` / `g_Context` 去全局;`kEventSurfaceChanged` 的 Width / Height 缺口(Espryt 只发布格式,server 拥有显示时 client 默认 FBO 会停在 512×512 占位值);client 侧不再无条件发 `SetWindowHandle`(`BackendObject_Remote.cpp:215`——今天 FCL 里开 spawn,第一次 `eglCreateWindowSurface` 就在 server 进程 abort);server app 监听 `unix:` 与 `tcp://`(后者 Ph 之后);server 生命周期绑 Activity;cached-app freezer(SPAWN-PLAN §8.2);多 context(契约 §11);FCL env 与 plugin APK 开关表接线
- **验收门 / 证据**:两个门:(a) Minecraft 经 FCL **同机 spawn** 在 Adreno 830 双后端入世界,杀 server 产生干净 device-lost latch;(b) **另一台机器上的 client 经 TCP** 在 Redmi 上进世界(数据面 stream),并记录 P6.5 的必测数
## 2026-09-25 复测补记
复测针对 P12 实现提交 `1fb18d9e`(控制协议修订 3);当前 `feat/disaggregated@0fe01588` 相对它只改了文档、文档检查范围和基准脚本说明文字。测试 APK 为 `26.09.1fb18d9-trace`(独立包名 `top.mobilegl.plugin.p12verify.trace`),设备为 Redmi `2f7cbe2e`(Adreno 830)。本记录只覆盖 P12 定向用例,不表示两个收官出口门已通过。
**主机 P12 定向 CTest:46/46 通过。** 包含 `ServerDisplayTest`、`ServerLoopTest`、`InProcessServer`、`SupervisorChildren` 与 `ServerOwnedSurface`;不是整套 P12 主机门重跑。
**真机七项检查:**
| # | 检查 | 审查后结果 |
|---|---|---|
| 1 | Espryt 上屏(OpenRA) | 通过,SSIM **1.000000**,server-owned window `640×480` |
| 2 | Magma 上屏(OpenRA)及同进程第二会话(Minecraft startup) | 通过,SSIM **1.000000 / 0.999999511** |
| 3 | 串行会话与 Busy | 第二次 OpenRA 通过,SSIM **1.000000**;并发客户端收到 `Refuse{Busy}`(rc=134),长 Minecraft 会话继续并以 SSIM **0.999999511** 完成 |
| 4 | 推流时按 HOME 触发 `surfaceDestroyed` | `ServerWindowLost` 后客户端干净 device-lost;Activity 进程存活,surface 在 **15 ms** 内释放;重附窗口后的 OpenRA 会话 SSIM **1.000000** |
| 5 | 离屏 service(pbuffer) | OpenRA 通过,SSIM **1.000000** |
| 6 | 离屏 server 收到 ServerOwned 请求 | 服务端和客户端都返回 `NoServerDisplay`;后续 pbuffer 会话通过,SSIM **1.000000**。首次尝试与上一会话回收竞态命中 Busy;临时测试副本等待 2 秒后重跑通过,仓库脚本未修改 |
| 7 | Activity 与离屏 service 互斥 | 启动 Activity 会停止 service 及其活动会话;启动 service 会停止 `:mglwin`,之后 service 正常监听 |
设备检查通过 `adb forward` 由 trace_replay 驱动;失窗检查使用 HOME,不是 FCL 杀 server。出口门 (a) 的 FCL 同机 spawn / 杀 server,以及出口门 (b) 的跨机 TCP 入世界与 P6.5 必测数仍未验证。
运行证据保存在测试机器的 `/home/swung/w7/logs/p12-verify-1fb18d9e/`(`build-host/Testing/Temporary/LastTest.log` 与 `device/`);按证据数据规则,大日志、APK 和截图未复制进仓库。
## 状态记录(原 `CURRENT_STAGE_STATUS.md`,2026-09-24 历史快照)
> 本段保留当日记录;其中“审查后未复测”的状态已由上方 2026-09-25 复测补记更新。
**更新:2026-09-24(P12 子集)** · 计划与交接 [notes/p12/PLAN-P12.md](PLAN-P12.md)。**P12「server 自有屏幕窗口」子集已实现、未收官,已并入 `feat/disaggregated`**(15 提交自 `9f669e52` 起,加审查轮 10 个问题的修复——两个大项:批内失窗、会话间 Espryt 单元影子悬空;裁定 [notes/p12/INTEGRATOR-DECISIONS-P12.md](INTEGRATOR-DECISIONS-P12.md) ID-P12-5–15,主机门与 G1 见 ID-P12-14/15,**审查轮之后未上真机复测**,ID-P12-13):Android 上的 server 自建 `ANativeWindow`(自己的 SurfaceView)把渲染流**上屏**,离屏路径保留,同一时刻只一条活跃;client 以新的 `WindowKind::ServerOwned` **完全无头**接入(控制修订 3)。主机门除一条既有环境敏感项外全绿,G1(pull 构建 `.text` `0xa52203`、符号 0/0)已独立复核;真机 Redmi `2f7cbe2e` 上七项编号检查过了双后端上屏、串行/Busy、失窗 device-lost、离屏不回归、无显示具名拒绝、一台设备一个 server。**两个出口门都还没打**:跨机 TCP(门 b)完全未做,FCL + 杀 server 的 device-lost(门 a)未做——本轮的真机是 trace_replay 经 `adb forward` 环路驱动的。上一阶段 **P7 已收官(2026-09-23,ID-P7-63)**:§8 九项全绿——终局窗口 3(`p7w8-78e71f2b`)门 3 PASS 36/36、门 5 PASS;门 4 以 `# P13` 读法关闭。
- **P12 子集**:APK `26.09.29b7b28-trace`(**控制协议修订 3**,与 p7w8 的 server 不兼容),证据 `notes/p12/device/`(九格拼图 `evidence-strip.png`)。七个编号检查在三个 head 上跑过,`trial-*/` 是按 head 归档的旧轮次。
## 当前状态详情(2026-09-24,原 `CURRENT_STAGE_PROGRESS.md` 正文)
> 顶层 [`CURRENT_STAGE_PROGRESS.md`](../../../Disaggregated/CURRENT_STAGE_PROGRESS.md) 只留摘要;带裁定编号的落地表、门表、余项清单与证据位置在这里。
### 1. 一句话(2026-09-24 历史快照;现状见上方复测补记)
Android 上的 server 自建窗口(自己的 SurfaceView)把 IPC 渲染流**上屏**,client 以 `WindowKind::ServerOwned` **完全无头**接入。该快照记录当时审查轮修复后尚欠真机复测;复测现已在上方补记,两个出口门仍未打。
### 2. 已落地
| 面 | 内容 | 出处 |
|---|---|---|
| wire | `WindowKind::ServerOwned`、控制修订 2 → 3、`SurfaceReply` 带回窗口真实尺寸或具名拒绝 | PLAN-P12 §1 |
| server 窗口 | `ServerDisplay`(钩子 + 租约 + 有界 3 s `Detach`);会话表面模式首次创建即闩定(`SurfaceModeMismatch`);无显示具名拒绝(`NoServerDisplay`);失窗 → `Fatal{ServerWindowLost}` → client 读干净 device-lost | ID-P12-2、ID-P12-3 |
| client | `MOBILEGL_IPC_SURFACE=server` → 无头窗口 surface,不发 `SetWindowHandle`;resize 变成对 server 窗口的几何请求,采用 server 回的真实尺寸 | ID-P12-10 |
| 进程内 server | `MobileGLDisplayActivity`(`:mglwin`)里一个线程跑 TCP server:会话串行、会话间重置闩、后端按进程钉住;与离屏 `MobileGLServerService` 互斥,一台设备同一时刻一个 server | ID-P12-4 |
| 审查轮 | 10 个问题已修;两个大项:批内失窗检查(`DrainRing` 每次 pop 前)、会话间 Espryt 单元影子悬空;另有推流中停机、会话结束清理、陈旧尺寸、日志转发 | ID-P12-5 … 11 |
### 3. 门
| 门 | 状态 | 证据 |
|---|---|---|
| G1 | ✅ pull 构建同机前后 `.text` 一致、符号 0 增 0 减 | ID-P12-15 |
| 主机门 | ✅ unit 2605/2605,spawn / tcp 与三条 Magma 双进程车道全绿;剩余红全部归容器的 CMake/CTest 版本 | ID-P12-14 |
| 真机七项检查(Redmi `2f7cbe2e`) | ✅ 审查轮之前(`29b7b284`)及审查后(`1fb18d9e`);审查后详细结果见上方复测补记 | PLAN-P12 §2、ID-P12-13 |
| 出口门 (a) | ✅ 2026-09-29:FCL 里的 Minecraft 经 render server 屏渲染到 server 窗口,双后端入世界,`kill -9` server 后 client 闩住 device-lost、FCL 不崩(Magma 竖屏窗口画面位置不对,见文档) | [`FCL-ACCEPTANCE.md`](FCL-ACCEPTANCE.md) |
| 出口门 (b) | ✅ 2026-09-28:WSL 里的 client 经 Wi-Fi TCP 重放 Minecraft 世界内 trace,rd12 ssim 0.999883、openra 1.0,251/251 与 128/128 帧,必测数已记录;client 是 trace 重放器,不是活的 Minecraft | [`CROSSHOST-ACCEPTANCE.md`](CROSSHOST-ACCEPTANCE.md) |
### 4. 在跑
无。
### 5. 下一步
P12 已收官(2026-09-29):出口门 (a)(b) 通过、契约已写、`gate.sh` 的 G1 已改、余项已处置([`PLAN-P12.md`](PLAN-P12.md) §3)。
1. 其后按 [`ROADMAP.md`](../../../Disaggregated/ROADMAP.md):monolith 跑道 P8;IPC 跑道 P9 → P10 → P11;P6.5 残余(39 例 device 矩阵 + 必测数)与 P3b/P4b 余项并行;`CONTRACT-P7.md` §12 的记录债按阶段认领。
### 6. 阻塞 / 需要人
- 没有需要用户决策的阻塞。真机复测需要一台装有 NDK、连着 Redmi 的机器(审查轮所在的云容器没有)。
- 已知环境敏感项:`IterationRPProgram203Scenario`(`integration-magma-full-split`)偶发红,按 ID-P7-22 / ID-P12-12 读作"既有、环境敏感"(钉 lavapipe ICD 即绿),不阻塞 P12。
### 7. 真机与证据
- 当前 APK `26.09.29b7b28-trace`(控制修订 3,与 P7 终局窗口的 p7w8 server 不兼容);设备 Redmi `2f7cbe2e`(Adreno 830),定频协议 [`devices/pin-verification-2026-09-07.md`](../../../Disaggregated/guide/pin-verification-2026-09-07.md)。
- 真机证据 `notes/p12/device/`(`evidence-strip.png` 九格拼图,`trial-*/` 是按 head 归档的旧轮次);主机门日志 `notes/p12/gate/`;设备脚本 `notes/p12/android/`。
## 本目录
| 文件 | 内容 |
|---|---|
| [`DEVICELOST-AND-UPLOAD-WAITS.md`](DEVICELOST-AND-UPLOAD-WAITS.md) | 2026-09-25 落地记录:DECLINED 回复容忍(A)与纹理上传等待粒度(B),含门、red-once 与未做项 |
| [`BRIEF-onscreen.md`](BRIEF-onscreen.md) | P12 subset "on-screen server window" — implementation brief (2026-09-23) |
| [`fix-icd.sh`](fix-icd.sh) | 钉 lavapipe ICD |
| [`g1-base-names.sh`](g1-base-names.sh) | G1 基准符号名生成 |
| [`gate-container.sh`](gate-container.sh) | 主机门的容器变体 |
| [`gate.sh`](gate.sh) | 主机门脚本 |
| [`INTEGRATOR-DECISIONS-P12.md`](INTEGRATOR-DECISIONS-P12.md) | P12 集成者裁定日志(「server 自有屏幕窗口」子集) |
| [`map-apk-process.md`](map-apk-process.md) | MobileGL-disagg: Android APK and process model for an on-screen server path (commit 9f669e52) |
| [`map-client-surface.md`](map-client-surface.md) | Client-side surfaces in split mode: map, open questions and change list (commit 9f669e52) |
| [`map-docs-contract.md`](map-docs-contract.md) | Design docs and contracts for a server-owned on-screen window (P12 subset) |
| [`map-server-surface.md`](map-server-surface.md) | Server-side surface path and both backends' window surfaces (commit 9f669e52) |
| [`p203.sh`](p203.sh) | `IterationRPProgram203Scenario` 复核 |
| [`PLAN-P12.md`](PLAN-P12.md) | P12「server 自有屏幕窗口」子集 — 计划与交接(2026-09-24) |
| [`setup-tree.sh`](setup-tree.sh) | 包树搭建 |
| [`android/`](android/) | 27 个文件:真机与构建脚本(`dev.sh`、`check*.sh`、`final-run.sh`、red-once 工具等) |
| [`device/`](device/) | 85 个文件:真机七项检查证据(`evidence-strip.png` 九格拼图;`trial-*/` 为按 head 归档的旧轮次) |
| [`gate/`](gate/) | 6 个文件:三个 head 的构建日志与主机门日志(含审查轮、CMake 4 对照) |
@@ -0,0 +1,128 @@
# 「①」该挂哪个信号:三个候选的判定(handoff-2 §3 调查记录)
> 2026-09-26。分支 `feat/disaggregated`。对应 [`MOBILEGL-CS-HANDOFF-2.md`](../../../../MOBILEGL-CS-HANDOFF-2.md)
> 的 §3「把『①』挂到已有信号上」。**结论是 handoff §3.2 的前两个候选都不是信号**,成本仍在协议面;
> 本文把三条理由落到符号,并把真正的缺口缩到一句话。
## 0. 一句话
- **§3.2 候选 1(caps 代次)不是信号**:caps Adopt 是「快照重发」,而 `MGPipeApplierReset`(make-current 的
服务端半边)**故意保留**对象记录——代次动了 ≠ 记录没了。
- **§3.2 候选 2(FreshlyPrimed)是同一个理由,而且它就是空的**:`TextureEmit.h:1257` 的
`void Reset() {}` 函数体为空,注释写明「Only LATCHES reset here - the applier's object records survive a
make-current」。
- **缺口的真实大小比 handoff §3.1 说的更大**:不是「清闩不够」,而是**已经没有东西会去清闩**。
P12 的首用化把两个曾经读答案的行都变成了「已确认对象不回读」(respecify 走
`MGPipeResourceRespecifyWantsItsReply` 的 fire-and-forget、params 走 `Wire_SetTextureParams` 的临时
`kStatusOk`),而「已确认」= `MGPipeHandleIsPublished`——**它回答的是「create 发出去过」,在记录被丢掉之后
仍然为真**。于是 applier 的拒绝再也到不了 emitter,`RespecifyOnce` 那条自愈链**今天对任何描述符都不成立**。
- **今天不可达**:`MGPipeApplierReleaseObjectRecords` 在生产代码里没有调用者(只有 MG_Test,实测 grep 见 §5)。
所以这是债而不是现网缺陷——但它比 handoff 估计的宽:**修它需要协议面**,不是清闩、也不是挂代次。
## 1. 失效时要清的三样,逐条落到符号
| handoff §3.1 | 符号 | 今天的状态 |
|---|---|---|
| 发布闩 | `MGPipeNoteHandleUnpublished(kind, handle)`(`PipeFill.cpp:1890`),按 `{kind, slot, gen}` 键 | 对象销毁会清;跨 make-current 保留(设计如此) |
| 各 emitter 的镜像 | `TextureEmit` 的 `entry.HasLastDesc` / `entry.HasParamsLatch` | **只清闩不够**:去重比闩更早,见 §4 |
| create window 的 suspect 表 | `g_createSuspects`(`WireTables.cpp`) | 窗口默认已关(见 `CREATE-WINDOW-MEASURED.md`),这一条随之为空 |
## 2. 候选 1:`CapsMirror::Generation()` —— 动的是快照,不是记录
`CapsMirror::Generation()` 每次 `Adopt` 自增,而 Adopt 的触发点是**caps 快照重发**:`ServerMakeEGLCurrent`
对「它没持有的 tuple」转发绑定时会重发一次(ID-67,`MakeCurrentRepublishCount`)。也就是说代次动
**只说明服务端重新回答了一次能力问题**,不说明它的记录表空了。反证在 `MGPipeApplierReset` 自己身上:
它是 make-current 的服务端半边,`PipeApply.cpp:1584-1590` 清的是 working state 与三个 binding-point 窗口,
**texture / sampler / view / shader-CSO 记录一个都不清**——注释把理由写死了:「a GL object lives in a
share group, and re-publishing one would move its Serial for nothing」。
照代次清 = 把「记录还活着」的每一次 make-current 也当成失效,每次切上下文重发全部存活纹理。方向安全
(`PipeApply.h:822`:「Over-firing is the safe」),但这是**为一个今天不可达的路径付每次 make-current 的钱**。
## 3. 候选 2:`FreshlyPrimed` —— 同一个理由,且这个函数是空的
`PipeFill.cpp:3761` 的 FreshlyPrimed 臂确实在 reset 五个 emitter,但纹理那一个的 reset 是:
~~~cpp
// A fresh context: what the server has is no longer what this emitter last sent. Only
// LATCHES reset here - the applier's object records survive a make-current and
// re-publishing them would move their serials for nothing.
void Reset() {} // TextureEmit.h:1257
~~~
空实现就是「这里没有可清的东西」的落地写法。同一个文件 `TextureEmit.h:1267-1271` 还把话说到另一头:
「a texture handle and the applier record it names are SHARE-GROUP OBJECT STATE, so nothing here is
per-context and **no re-publication path exists or may exist**」。所以候选 2 不是「一行」,是**推翻一条设计**。
## 4. 缺口:从「去重吞掉」到「没有任何行会读到拒绝」
### 4.1 第一步:去重在发射端,比闩更早
`TextureEmit.h:838`:
~~~cpp
const Bool unchanged = entry.HasLastDesc && std::memcmp(&entry.LastDesc, &desc, sizeof(desc)) == 0;
~~~
**它不读闩。** 所以描述符**没变**的 respecify 会在发射端直接返回(`if (unchanged) return;`),
一条记录都不过线,服务端也就没有机会拒绝——只清闩治不了这一半,要清的是镜像
(`entry.HasLastDesc` / `entry.HasParamsLatch`)。这一条是 handoff §3.1 已经点到的,这里是它的符号。
### 4.2 第二步(handoff 没写,本轮实测):描述符变了也不自愈了
handoff §3.3 假定「变了描述符」那一半今天能自愈:respecify 被拒 → `RespecifyOnce` 补 create 再重试。
**P12 的首用化把这半也拿掉了**,因为那条路径要读答案,而两个行现在都自己回答自己:
| 行 | P12 之后 | 拒绝还能不能到 emitter |
|---|---|---|
| `resource_respecify` | 对象已确认时 `MGPipeResourceRespecifyWantsItsReply` 返回 false(`PipeRoute.h:297-302`),`Wire_Escape_ResourceRespecify` 发 provisional accept | **不能**(调用方读到 true,`RespecifyOnce` 不进 heal 分支) |
| `set_texture_params` | `Wire_SetTextureParams` 对 confirmed 对象直接把 `status` 写成 `kStatusOk`(`WireTables.cpp`),不读答案 | **不能** |
而「已确认」是 `MGPipeHandleIsPublished`,它的语义是**「这个 handle 的 create 发出去过」**,
在 `MGPipeApplierReleaseObjectRecords` 之后**依然为真**(`TextureEmit.h:1381-1389` 的注释自己写着这件事)。
于是唯一还会读真答案的行只剩 create,而 create 只在闩为假时才发——**闩为假这件事,正好是被丢掉记录之后不再发生的事**。
实测(`RemoteClientControls.DroppedApplierRecordsAreNotRepairedTodayAndThisCaseIsTheDebt`):
丢掉之后 reshape 同一个对象,`creates=0 applier_records=0 published=1`——没有 create、applier 手里没有记录、
而客户端仍然认为它是已发布的。
### 4.3 所以「①」到底是什么
它不是一个「清三样」的卫生动作,而是**一条让 applier 能说出「我手里没有这个 handle」的通道**——
也就是 handoff §3.2 的第 3 条(反向通道第 10 个回调),成本是协议面。前两条便宜候选见 §2/§3。
## 5. 可达性(本轮复核)
~~~
$ grep -rn "MGPipeApplierReleaseObjectRecords" MobileGL/ --include=*.cpp --include=*.h | grep -v MG_Test
PipeApply.cpp:1593 void MGPipeApplierReleaseObjectRecords() { <- 定义
(其余全部是注释)
~~~
与 handoff §3.4 一致:**生产调用者为零**,唯一调用者是 MG_Test(`PipeWireCodecTest`/`StagedTextureStoreTest`
各一处、若干 `*EmitTest` 的 SetUp/TearDown)。闩按 `{kind, slot, gen}` 键、对象销毁会清闩,槽位复用安全。
## 6. 建议(本轮做了第 3 条,其余不做,理由在下面)
1. **不加反向回调**:那是协议面(两端重出 APK),而触发者今天不存在。handoff §7 的判词是「今天是潜伏,
别为它付协议面的钱」。**注意这一条的价钱现在知道了**:§4.2 说明它不是一个可选的美化,
而是唯一的修法——所以「不值得付」的前提是「调用者确实不会出现」,一旦有人给
`MGPipeApplierReleaseObjectRecords` 加生产调用者,就必须付。
2. **不挂代次**:理由见 §2/§3——它会在每次 make-current 上 over-fire,为一个不可达路径付真实成本;
而且按 §4.2 它也**治不好**(闩清了、行还是不读答案)。
3. **已做**:`RemoteClientControls.DroppedApplierRecordsAreNotRepairedTodayAndThisCaseIsTheDebt`
用 `MGPipeApplierReleaseObjectRecords` 造「记录被丢掉」,读的是**applier 手里有没有记录**和**闩的状态**
(不是计数——handoff §3.3 那句「只看计数看不出这类错」),并把今天的三个数(`creates=0`、
`applier_records=0`、`published=1`)**当成债务 pin 住**:谁把信号接上,这条用例就红,
红得正好是「修复开始生效」的地方。
4. 真要做的话,形状是**给 entry 记一个「本代次内确认过」的戳**(caps 代次或会话代次),代次一动就重发一次
——它治 §4.1(去重),**治不了 §4.2**,因为 §4.2 缺的是「applier 说它没有」这件事本身。
## 7. 复算
~~~sh
grep -rn "MGPipeApplierReleaseObjectRecords" MobileGL/ --include=*.cpp --include=*.h | grep -v MG_Test
sed -n '1249,1258p' MobileGL/MG_Impl/Pipe/TextureEmit.h # void Reset() {}
sed -n '834,840p' MobileGL/MG_Impl/Pipe/TextureEmit.h # unchanged,不读闩
sed -n '1575,1591p' MobileGL/MG_Pipe/PipeApply.cpp # MGPipeApplierReset 清什么、不清什么
~~~
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
# build.sh <sha>: the window-2 builder (10-build.sh) on a detached tree of the P12 package tree.
#
# 10-build.sh would create the tree with `git -C ~/w7/pipe worktree add` and copy submodules from
# pipe, and falls back to `git lfs pull` for pointer fixtures. The P12 rules forbid touching pipe
# and pulling LFS, so the tree is prepared HERE, from the package tree (same object store): the
# detached worktree, its submodules and glslang External copied from the package tree's copies
# (the p12 branch moves no gitlink), and the hydrated fixtures copied + assume-unchanged. Then
# 10-build.sh runs with W2_PIPE=<package tree>, finds everything in place and only builds.
set -euo pipefail
PKG=/home/swung/w7/p12-onscreen
SHA=$(git -C "$PKG" rev-parse --verify "$1^{commit}")
SHA8=${SHA:0:8}
STAMP=${2:-p12w1-$SHA8}
TREE=$HOME/w7/p7w7-tree-$SHA8
if [ ! -e "$TREE/.git" ]; then
git -C "$PKG" worktree add --detach "$TREE" "$SHA"
fi
[ "$(git -C "$TREE" rev-parse HEAD)" = "$SHA" ] || { echo "tree $TREE not at $SHA"; exit 1; }
for path in $(git -C "$TREE" submodule status | awk '{print $2}'); do
want=$(git -C "$TREE" ls-tree HEAD "$path" | awk '{print $3}')
base=$(git -C "$PKG" ls-tree HEAD "$path" | awk '{print $3}')
[ "$want" = "$base" ] || { echo "gitlink $path differs from the package tree's ($want vs $base)"; exit 1; }
if [ -z "$(ls -A "$TREE/$path" 2>/dev/null)" ]; then
rm -rf "$TREE/$path"
cp -a "$PKG/$path" "$TREE/$path"
rm -f "$TREE/$path/.git"
echo "submodule $path copied from the package tree ($want)"
fi
done
[ -d "$TREE/3rdparty/glslang/External/spirv-tools" ] || cp -a "$PKG/3rdparty/glslang/External" "$TREE/3rdparty/glslang/"
git -C "$TREE" ls-files -z tools/trace_replay/fixtures | while IFS= read -r -d "" f; do
if head -c 40 "$TREE/$f" 2>/dev/null | grep -q git-lfs && ! head -c 40 "$PKG/$f" | grep -q git-lfs; then
cp "$PKG/$f" "$TREE/$f"
fi
done
git -C "$TREE" ls-files -z tools/trace_replay/fixtures | xargs -0 -r git -C "$TREE" update-index --assume-unchanged
if head -c 40 "$TREE/tools/trace_replay/fixtures/openra.tgz" | grep -q git-lfs; then
echo "openra.tgz is still an LFS pointer - refusing (no git lfs pull)"; exit 1
fi
echo "tree ready: $TREE @ $SHA8, stamp $STAMP"
W2_PIPE=$PKG bash /home/swung/w7/notes/p7/window2/10-build.sh "$SHA" "$STAMP"
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
# Device check 1 (and 2 with BACKEND=DirectVulkan): on-screen replay through the display Activity.
# STAMP=p12w1-<sha8> [BACKEND=DirectGLES|DirectVulkan] [CASE=OpenRA] bash check1.sh
. "$(dirname "$0")/dev.sh"
BACKEND=${BACKEND:-DirectGLES}
CASE=${CASE:-OpenRA}
CHECK_NAME=${CHECK_NAME:-$([ "$BACKEND" = DirectVulkan ] && echo 2-onscreen-magma || echo 1-onscreen-espryt)}
OUT=$DEV/$CHECK_NAME
rm -rf "$OUT"; mkdir -p "$OUT"
{
log "check $CHECK_NAME: stamp $STAMP backend $BACKEND case $CASE"
log "found: $(ps_mobilegl | tr '\n' ';')"
force_stop; sleep 1
wake
T0=$(devtime); echo "$T0" > "$OUT/devtime0"
PIN=(); [ "$BACKEND" = DirectVulkan ] && PIN=(--backend DirectVulkan)
tds start --surface window --forward "${PIN[@]}" > "$OUT/tds-start.txt" 2>&1; cat "$OUT/tds-start.txt"
if wait_logcat "$T0" 'listening on tcp://127\.0\.0\.1:40613 \(in-process display server, display installed\)' 30; then
log "READY"
else
log "NOT READY within 30 s"
fi
WIN=$(pid_of "$PKG:mglwin"); log ":mglwin pid=$WIN"; echo "$WIN" > "$OUT/mglwin.pid"
Ash dumpsys window | grep -E "mCurrentFocus|mFocusedApp" | head -2
log "replay $CASE $BACKEND --window-surface MOBILEGL_IPC_SURFACE=server"
replay_with_shots "$OUT/replay" "$CASE" "$BACKEND" window MOBILEGL_IPC_SURFACE=server
log "replay rc=$?"
result_summary "$OUT/replay"
shot_report "$OUT/replay"
log ":mglwin pid after: $(pid_of "$PKG:mglwin")"
if [ -n "${SECOND_CASE:-}" ]; then
log "a second $BACKEND session in the same process: $SECOND_CASE on-screen"
replay_with_shots "$OUT/second" "$SECOND_CASE" "$BACKEND" window MOBILEGL_IPC_SURFACE=server
log "second session rc=$?"
result_summary "$OUT/second"
shot_report "$OUT/second" | tail -2
log ":mglwin pid after the second session: $(pid_of "$PKG:mglwin")"
fi
logcat_since "$T0" > "$OUT/logcat.txt"
mglines "$OUT/logcat.txt" | head -60
A shell run-as "$PKG" cat files/mglwin.server.log > "$OUT/mglwin.server.log" 2>&1
log "done $CHECK_NAME"
} 2>&1 | tee "$OUT/check.log"
+47
View File
@@ -0,0 +1,47 @@
#!/usr/bin/env bash
# Device check 3: two sequential on-screen sessions in ONE display-Activity process (the second
# works), and a second concurrent authenticated client is refused Busy. Runs on the Activity check 1
# left serving (it re-checks the pid).
# STAMP=p12w1-<sha8> [LONG_CASE=...] bash check3.sh
. "$(dirname "$0")/dev.sh"
OUT=$DEV/3-sequential-and-busy
LONG_CASE=${LONG_CASE:-minecraft-1.21.4-startup}
rm -rf "$OUT"; mkdir -p "$OUT"
{
PREV=$(cat "$DEV/1-onscreen-espryt/mglwin.pid" 2>/dev/null)
WIN=$(pid_of "$PKG:mglwin")
log ":mglwin pid now=$WIN (check 1's session ran in pid=$PREV)"
[ -n "$WIN" ] || { log "no display Activity process - run check1.sh first"; exit 1; }
wake
T0=$(devtime); echo "$T0" > "$OUT/devtime0"
log "=== session 2 in the same process: OpenRA on-screen"
replay_with_shots "$OUT/second" OpenRA DirectGLES window MOBILEGL_IPC_SURFACE=server
log "second session rc=$?"
result_summary "$OUT/second"
shot_report "$OUT/second" | tail -2
log "Welcome server pids seen by the two clients (check 1, this one):"
grep -ho "control=tcp data=stream server=[^ ]* pid=[0-9]*" "$DEV/1-onscreen-espryt/replay/output/mobilegl.client.log" "$OUT/second/output/mobilegl.client.log" | sort | uniq -c
log "=== Busy: a long on-screen session ($LONG_CASE), then a second authenticated client"
T1=$(devtime)
mkdir -p "$OUT/long"; : > "$OUT/long/shots.tsv"
replay "$OUT/long" "$LONG_CASE" DirectGLES window MOBILEGL_IPC_SURFACE=server &
LONG=$!
shots "$OUT/long" $LONG &
SHOOTER=$!
if wait_logcat "$T1" 'owner=server' 60; then log "long session is on screen"; else log "long session never reached surface=window"; fi
sleep 2
kill -0 $LONG 2>/dev/null && log "long session still live - starting the second client" || log "WARNING: the long session already ended"
replay "$OUT/concurrent" OpenRA DirectGLES window MOBILEGL_IPC_SURFACE=server
log "concurrent client rc=$?"
grep -hiE "busy|refuse" "$OUT/concurrent/replay.log" "$OUT/concurrent/output/"mobilegl*.log 2>/dev/null | cut -c1-260 | sort | uniq -c | head
wait $LONG; log "long session rc=$?"
wait $SHOOTER 2>/dev/null
result_summary "$OUT/long"
shot_report "$OUT/long" | tail -3
log ":mglwin pid after: $(pid_of "$PKG:mglwin")"
logcat_since "$T0" > "$OUT/logcat.txt"
mglines "$OUT/logcat.txt" | grep -E "MobileGLDisplay|in-process session|Busy|owner=server|surface=window|listening" | head -60
log "done 3"
} 2>&1 | tee "$OUT/check.log"
+52
View File
@@ -0,0 +1,52 @@
#!/usr/bin/env bash
# Device check 4: HOME during an on-screen replay. The session must end with the named
# ServerWindowLost latch, :mglwin must survive, the client must read a clean device loss; bringing
# the Activity back must let the next session render.
# STAMP=p12w1-<sha8> [LONG_CASE=...] bash check4.sh
. "$(dirname "$0")/dev.sh"
OUT=$DEV/4-window-lost
LONG_CASE=${LONG_CASE:-minecraft-1.21.4-startup}
rm -rf "$OUT"; mkdir -p "$OUT"
{
WIN=$(pid_of "$PKG:mglwin")
log ":mglwin pid before=$WIN"
[ -n "$WIN" ] || { log "no display Activity process - run check1.sh first"; exit 1; }
wake
T0=$(devtime); echo "$T0" > "$OUT/devtime0"
mkdir -p "$OUT/lost"; : > "$OUT/lost/shots.tsv"
replay "$OUT/lost" "$LONG_CASE" DirectGLES window MOBILEGL_IPC_SURFACE=server &
LONG=$!
shots "$OUT/lost" $LONG &
SHOOTER=$!
if wait_logcat "$T0" 'owner=server' 60; then log "session is on screen"; else log "session never reached surface=window"; fi
sleep 3
kill -0 $LONG 2>/dev/null && log "session live - pressing HOME" || log "WARNING: the session already ended before HOME"
date +%s.%N > "$OUT/lost/t-home"
Ash input keyevent KEYCODE_HOME
wait $LONG; RC=$?
wait $SHOOTER 2>/dev/null
log "client rc=$RC after HOME ($(python3 -c "print(round($(cat "$OUT/lost/t1")-$(cat "$OUT/lost/t-home"),2))") s after the key)"
result_summary "$OUT/lost"
grep -hiE "ServerWindowLost|device.lost|ServerCrashed|SessionFault|latched" "$OUT/lost/replay.log" "$OUT/lost/output/"mobilegl*.log 2>/dev/null | cut -c1-260 | sort | uniq -c | head -12
sleep 2
WIN2=$(pid_of "$PKG:mglwin")
log ":mglwin pid after HOME=$WIN2 (before=$WIN): $([ "$WIN" = "$WIN2" ] && echo SURVIVED || echo CHANGED)"
logcat_since "$T0" > "$OUT/logcat-lost.txt"
mglines "$OUT/logcat-lost.txt" | grep -E "surfaceDestroyed|ServerWindowLost|in-process session|detached|reaped|latch" | head -20
log "=== bring the Activity back, then a new on-screen session"
T1=$(devtime)
wake
tds start --surface window > "$OUT/tds-restart.txt" 2>&1
if wait_logcat "$T1" 'surfaceCreated: server window' 20; then log "window re-attached"; else log "no surfaceCreated within 20 s"; fi
Ash dumpsys window | grep -E "mCurrentFocus|mFocusedApp" | head -2
replay_with_shots "$OUT/after" OpenRA DirectGLES window MOBILEGL_IPC_SURFACE=server
log "after-return session rc=$?"
result_summary "$OUT/after"
shot_report "$OUT/after" | tail -2
log ":mglwin pid at the end=$(pid_of "$PKG:mglwin")"
logcat_since "$T0" > "$OUT/logcat.txt"
mglines "$OUT/logcat.txt" | grep -E "MobileGLDisplay|in-process session|ServerWindowLost|owner=server|window .* (attached|detached)" | head -40
A shell run-as "$PKG" cat files/mglwin.server.log > "$OUT/mglwin.server.log" 2>&1
log "done 4"
} 2>&1 | tee "$OUT/check.log"
+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
# Device checks 5 and 6 (and 7b): the offscreen service.
# 5 start MobileGLServerService while the display Activity runs -> :mglwin is gone; the same
# fixture WITHOUT the knob replays as before (ssim), server log surface=pbuffer.
# 6 MOBILEGL_IPC_SURFACE=server against it -> refused by name on both sides; the service still
# serves the next (offscreen) session.
# STAMP=p12w1-<sha8> bash check5.sh
. "$(dirname "$0")/dev.sh"
OUT=$DEV/5-offscreen-service
OUT6=$DEV/6-negative-serverowned-vs-offscreen
rm -rf "$OUT" "$OUT6"; mkdir -p "$OUT" "$OUT6"
{
WIN=$(pid_of "$PKG:mglwin")
log "before: :mglwin pid=${WIN:-none}"
ps_mobilegl
wake
T0=$(devtime); echo "$T0" > "$OUT/devtime0"
tds start --forward > "$OUT/tds-start.txt" 2>&1; cat "$OUT/tds-start.txt"
if wait_logcat "$T0" 'listening on tcp://127\.0\.0\.1:40613' 30; then log "supervisor READY"; else log "supervisor NOT READY"; fi
sleep 1
log "after: :mglwin pid=$(pid_of "$PKG:mglwin" || true) (was ${WIN:-none})"
ps_mobilegl | tee "$OUT/ps-after-start.txt"
logcat_since "$T0" > "$OUT/logcat-start.txt"; mglines "$OUT/logcat-start.txt" | head -20
log "=== 5: offscreen replay, no knob"
replay "$OUT/offscreen" OpenRA DirectGLES pbuffer
log "offscreen rc=$?"
result_summary "$OUT/offscreen"
logcat_since "$T0" > "$OUT/logcat.txt"
log "done 5"
} 2>&1 | tee "$OUT/check.log"
{
T0=$(devtime); echo "$T0" > "$OUT6/devtime0"
log "=== 6: MOBILEGL_IPC_SURFACE=server --window-surface against the offscreen service"
replay "$OUT6/refused" OpenRA DirectGLES window MOBILEGL_IPC_SURFACE=server
log "refused client rc=$?"
result_summary "$OUT6/refused"
grep -hE "NoServerDisplay|owns no display|EGL window surface creation failed|SurfaceRefusal|Refuse ServerOwned" \
"$OUT6/refused/replay.log" "$OUT6/refused/output/"mobilegl*.log 2>/dev/null | cut -c1-300 | sort | uniq -c | head
log "=== 6: the next offscreen session on the same service"
replay "$OUT6/next" OpenRA DirectGLES pbuffer
log "next offscreen rc=$?"
result_summary "$OUT6/next"
ps_mobilegl | tee "$OUT6/ps-end.txt"
logcat_since "$T0" > "$OUT6/logcat.txt"
mglines "$OUT6/logcat.txt" | grep -E "listening|reaped|Refuse|no display|surface=" | head -20
log "done 6"
} 2>&1 | tee "$OUT6/check.log"
+55
View File
@@ -0,0 +1,55 @@
#!/usr/bin/env bash
# Device check 7: only one server active.
# 7a the offscreen service runs with a LIVE session child; starting the display Activity stops
# the service - the supervisor goes, and its session child with it (PR_SET_PDEATHSIG) - and the
# Activity's server takes the port (listen retry).
# 7b starting the service kills :mglwin (also recorded by check 5).
# STAMP=p12w1-<sha8> [LONG_CASE=...] bash check7.sh
. "$(dirname "$0")/dev.sh"
OUT=$DEV/7-one-server
LONG_CASE=${LONG_CASE:-minecraft-1.21.4-startup}
rm -rf "$OUT"; mkdir -p "$OUT"
{
wake
T0=$(devtime); echo "$T0" > "$OUT/devtime0"
if [ -z "$(Ash "ps -A -o ARGS" | grep "libMobileGLServer.so $LISTEN --serve")" ]; then
log "no supervisor running - starting the service"
tds start --forward > "$OUT/tds-service.txt" 2>&1
wait_logcat "$T0" 'listening on tcp://127\.0\.0\.1:40613' 30 || log "supervisor NOT READY"
fi
log "=== 7a: a live offscreen session, then the display Activity"
T1=$(devtime)
replay "$OUT/victim" "$LONG_CASE" DirectGLES pbuffer &
VICTIM=$!
if wait_logcat "$T1" 'surface=pbuffer' 60; then log "offscreen session live"; else log "offscreen session never reached surface=pbuffer"; fi
sleep 1
ps_mobilegl | tee "$OUT/ps-before.txt"
SUP=$(Ash "ps -A -o PID,ARGS" | grep "libMobileGLServer.so $LISTEN --serve" | grep -v grep | awk '{print $1}' | head -1)
CHILD=$(Ash "ps -A -o PID,PPID,NAME" | awk -v p="$SUP" '$2==p && $3 ~ /libMobileGLServer/ {print $1}' | head -1)
log "supervisor pid=$SUP session child pid=${CHILD:-none}"
T2=$(devtime)
tds start --surface window > "$OUT/tds-activity.txt" 2>&1; cat "$OUT/tds-activity.txt"
if wait_logcat "$T2" 'listening on tcp://127\.0\.0\.1:40613 \(in-process display server, display installed\)' 30; then
log "display server READY"
else
log "display server NOT READY"
fi
sleep 1
log "supervisor $SUP alive? $(Ash "[ -d /proc/$SUP ] && echo yes || echo no") child ${CHILD:-none} alive? $([ -n "$CHILD" ] && Ash "[ -d /proc/$CHILD ] && echo yes || echo no")"
ps_mobilegl | tee "$OUT/ps-after-activity.txt"
wait $VICTIM; log "the offscreen session's client rc=$? (its server went away)"
grep -hiE "device.lost|ServerCrashed|hung up|PeerHungUp|EOF|lost" "$OUT/victim/replay.log" "$OUT/victim/output/"mobilegl.client.log 2>/dev/null | cut -c1-240 | sort | uniq -c | head -8
logcat_since "$T2" > "$OUT/logcat-7a.txt"; mglines "$OUT/logcat-7a.txt" | grep -vE "pre-auth deadline" | head -24
log "=== 7b: the service again - :mglwin must go"
WIN=$(pid_of "$PKG:mglwin"); log ":mglwin pid=$WIN"
T3=$(devtime)
tds start > "$OUT/tds-service2.txt" 2>&1
wait_logcat "$T3" 'listening on tcp://127\.0\.0\.1:40613' 30 && log "supervisor READY" || log "supervisor NOT READY"
sleep 1
log ":mglwin pid now=$(pid_of "$PKG:mglwin") (was $WIN); /proc/$WIN exists? $(Ash "[ -d /proc/$WIN ] && echo yes || echo no")"
ps_mobilegl | tee "$OUT/ps-after-service.txt"
logcat_since "$T3" > "$OUT/logcat-7b.txt"; mglines "$OUT/logcat-7b.txt" | head -16
logcat_since "$T0" > "$OUT/logcat.txt"
log "done 7"
} 2>&1 | tee "$OUT/check.log"
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Leaves the phone clean: both servers stopped (am force-stop), the new APK kept, the adb forward
# this stage added removed, the Doze whitelist and stay-on setting left as found (never touched).
# STAMP=p12w1-<sha8> bash cleanup.sh
. "$(dirname "$0")/dev.sh"
OUT=$DEV/99-cleanup
mkdir -p "$OUT"
{
force_stop
A forward --remove tcp:40613 2>/dev/null || true
Ash input keyevent KEYCODE_HOME
sleep 1
echo "processes : $(ps_mobilegl | tr '\n' ';')"
echo "forwards : $(A forward --list | tr '\n' ';')"
echo "doze wl : $(Ash 'dumpsys deviceidle whitelist' | grep -i mobilegl | tr '\n' ' ')"
echo "stay_on : $(Ash 'settings get global stay_on_while_plugged_in')"
echo "focus : $(Ash 'dumpsys window' | grep -m1 mCurrentFocus | tr -s ' ')"
echo "installed : $(Ash "dumpsys package $PKG" | grep -E 'versionName|lastUpdateTime' | tr -s ' ' | tr '\n' ' ')"
} 2>&1 | tee "$OUT/final-state.txt"
@@ -0,0 +1,37 @@
diff --git a/MobileGL/MG_Impl/Pipe/PipeFill.cpp b/MobileGL/MG_Impl/Pipe/PipeFill.cpp
index 3fb7278c..ea80cba2 100644
--- a/MobileGL/MG_Impl/Pipe/PipeFill.cpp
+++ b/MobileGL/MG_Impl/Pipe/PipeFill.cpp
@@ -1112,7 +1112,14 @@ namespace MobileGL::MG_Pipe {
// below and this aborts by name on the first glBufferData that carries data.
const Uint64 before = MG_Remote::Client::ClientWireRecordsEmitted();
MGPipeEmitResourceSubData(buffer, 0, static_cast<SizeT>(buffer.GetSize()));
- if (MG_Remote::Client::ClientWireRecordsEmitted() == before) {
+ // EXCEPT ON A LOST DEVICE (P12). Once the session latched device-lost every verb is
+ // DECLINED by design (CONTRACT-P6 5.3) - the resource_subdata above included - so "it
+ // emitted nothing" is the latch working, not bytes this client forgot to carry: there
+ // is no server left for them to exist on. Aborting here turned every clean device loss
+ // (a killed server; the on-screen server's window destroyed under the session) into a
+ // client SIGABRT at its next glBufferData with data.
+ if (MG_Remote::Client::ClientWireRecordsEmitted() == before &&
+ !MG_Remote::Client::ClientSession::DeviceLost()) {
// UncarriedInitialBytes, not a second word for the same family: WireTables.cpp:418
// already dies of exactly this - a respecify that crossed with no initial bytes -
// under that name, and two words for one family is the vocabulary drift a6
diff --git a/MobileGL/MG_Remote/Client/EmitTables.cpp b/MobileGL/MG_Remote/Client/EmitTables.cpp
index fc14e81a..6472e1d6 100644
--- a/MobileGL/MG_Remote/Client/EmitTables.cpp
+++ b/MobileGL/MG_Remote/Client/EmitTables.cpp
@@ -1577,6 +1577,12 @@ namespace MobileGL::MG_Remote::Client {
Uint64 replyBytes = 0;
session.EmitAndWait(op, payload, bytes, nullptr, 0, &result, sizeof(result),
&status, &replyBytes);
+ // A LOST DEVICE ANSWERS AS A RESET CONTEXT DOES (P12). After the latch every verb is
+ // DECLINED (CONTRACT-P6 5.3), so there is no reply to read - and GL's reset rule is
+ // that sync waits then return at once as signaled (ClientWaitSync ALREADY_SIGNALED,
+ // the status SIGNALED), not that the client dies of a "malformed" reply.
+ if (status != Wire::ReplySink::kStatusOk && ClientSession::DeviceLost())
+ return op == MG_Pipe::MGPWireOp::FenceWait ? static_cast<Uint32>(GL_ALREADY_SIGNALED) : 1u;
if (status != Wire::ReplySink::kStatusOk || replyBytes != sizeof(result))
Wire::WireProtocolFatal("Fence.reply", "missing or malformed sync result");
return result;
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
cd /home/swung/w7/p12-onscreen
git add MobileGL/MG_Remote/Server/DisplayServerJni.cpp CMakeLists.txt
git commit -q -m "[MG_Remote] (P12): the in-process display server's JNI - install the display with ANativeWindow hooks and a JVM-attached geometry up-call, serve/stop on a Java thread, attach from surfaceCreated/Changed and a blocking detach from surfaceDestroyed (Android split build only)"
git add android-plugin/app/src/trace/AndroidManifest.xml \
android-plugin/app/src/trace/java/top/mobilegl/plugin/MobileGLDisplayActivity.java \
android-plugin/app/src/trace/java/top/mobilegl/plugin/ServerEnvironment.java \
android-plugin/app/src/trace/java/top/mobilegl/plugin/MobileGLServerService.java \
tools/trace_replay/ServerEnvironmentTest.java tools/trace_replay/test_android_lifecycle.py
git commit -q -m "[android-plugin, tools] (P12): MobileGLDisplayActivity - the on-screen display server in :mglwin (software window, fullscreen SurfaceView, aspect-fit geometry, env applied before the library loads), one shared server environment with MobileGLServerService, and one server at a time (the Activity stops the service, the service kills :mglwin)"
git add tools/trace_replay/tcp_device_server.py scripts/ci/tcp_lane_tools_test.py
git commit -q -m "[tools, scripts] (P12): tcp_device_server.py --surface window|pbuffer (default pbuffer, unchanged) starts the on-screen display Activity on a lit screen, and --backend pins either server"
git log --oneline -4
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
cd /home/swung/w7/p12-onscreen
git add MobileGL/MG_Backend/DirectGLES/BackendObject_DirectGLES.cpp MobileGL/MG_Backend/DirectGLES/Managers.cpp \
MobileGL/MG_Backend/DirectGLES/Managers.h MobileGL/MG_Test/SanityTest.cpp
git commit -q -m "[MG_Backend, MG_Test] (P12): the server backend's destruction drops every Espryt twin under a transport, so the in-process display server's next session no longer adopts the ended session's programs, VAOs and buffers (split build only; the pull build is unchanged, G1)"
git add MobileGL/MG_Remote/Server/DisplayServerJni.cpp
git commit -q -m "[MG_Remote] (P12): the display geometry up-call attaches the apply thread to the JVM under its own name, so the rest of the session is not logged as the up-call's thread"
git log --oneline -3
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
cd /home/swung/w7/p12-onscreen
git add MobileGL/MG_Remote/Server/ServerMain.cpp
git commit -q -m "[MG_Remote] (P12): the in-process pin line names the pin it records - MOBILEGL_BACKEND_TYPE when the environment set it, the first session's otherwise"
git add android-plugin/app/src/trace/java/top/mobilegl/plugin/MobileGLServerService.java
git commit -q -m "[android-plugin] (P12): MobileGLServerService logs its supervisor's closed output as the service stopping, not as a failure with a stack trace, when the display Activity stops it"
git add tools/trace_replay/README.md
git commit -q -m "[tools] (P12): trace_replay README - the two device servers, tcp_device_server.py --surface window, and the headless client's MOBILEGL_IPC_SURFACE=server --window-surface replay"
git log --oneline -3
git status --short | grep -v '^??' || true
+163
View File
@@ -0,0 +1,163 @@
# P12 android stage - device check helpers. Sourced, never run. Needs STAMP (p12w1-<sha8>).
# Every script that sources this re-runs itself under the shared device lock (flock -o, like
# window-2's lib.sh), so nothing it leaves running keeps the phone locked.
SERIAL=2f7cbe2e
PKG=top.mobilegl.plugin.p7w1.trace
TOKEN=p7w1b-lan-token-20260922 # >= 16 bytes
LISTEN=tcp://127.0.0.1:40613 # loopback on the phone, reached through adb forward
ENDPOINT=tcp://127.0.0.1:40613
: "${STAMP:?set STAMP=p12w1-<sha8>}"
BUILD_OUT=$HOME/w7/logs/p7w7/$STAMP
HOST=$BUILD_OUT/host
BUILD_TREE=$(. "$BUILD_OUT/build.env"; echo "$BUILD_TREE")
FIX=$BUILD_TREE/tools/trace_replay/fixtures
DEV=$HOME/w7/logs/p12/device
LOCK=$HOME/w7/locks/$SERIAL.lock
if [ "${P12_LOCK_HELD:-}" != 1 ]; then
export P12_LOCK_HELD=1
exec flock -o -w 3600 "$LOCK" bash "$0" "$@"
fi
A() { adb -s "$SERIAL" "$@"; }
Ash() { adb -s "$SERIAL" shell "$@" | tr -d '\r'; }
log() { printf '[%s] %s\n' "$(date +%T)" "$*"; }
devtime() { Ash "date +'%m-%d %H:%M:%S.000'"; }
wake() { Ash input keyevent KEYCODE_WAKEUP; Ash wm dismiss-keyguard > /dev/null 2>&1 || true; }
tds() { python3 "$BUILD_TREE/tools/trace_replay/tcp_device_server.py" "$@" --serial "$SERIAL" --package "$PKG" \
--listen "$LISTEN" --token "$TOKEN"; }
force_stop() { Ash am force-stop "$PKG"; }
pid_of() { Ash "pidof $1" | awk '{print $1}'; }
ps_mobilegl() { Ash "ps -A -o PID,PPID,NAME,ARGS" | grep -E "mobilegl|MobileGL" | grep -v grep; }
logcat_since() { A logcat -d -v threadtime -T "$1"; } # <devtime>
# mglines <logcat file>: only this package's own tags (MobileGL native lines, the Activity, the service).
mglines() { grep -E " [VDIWEF] (MobileGL|MobileGLDisplay|MobileGLServer) *:" "$1" | cut -c1-300; }
# wait_logcat <devtime> <extended-regex> <seconds>: 0 once logcat since <devtime> matches.
wait_logcat() {
local since=$1 pattern=$2 limit=$3 n=0
while [ $n -lt $((limit * 2)) ]; do
if logcat_since "$since" 2>/dev/null | grep -Eq -- "$pattern"; then return 0; fi
sleep 0.5; n=$((n + 1))
done
return 1
}
# case_args <case>: archive trace golden target width height crop_x crop_y crop_w crop_h
case_args() {
python3 - "$BUILD_TREE/tools/trace_replay/trace_cases.json" "$1" <<'EOF'
import json, sys
m = json.load(open(sys.argv[1])); d = m["defaults"]
c = next(c for c in m["cases"] if c["name"] == sys.argv[2])
g = lambda k: c.get(k, d.get(k))
print(g("trace_archive"), g("trace_file"), g("golden"), g("target_call"), g("width"), g("height"),
g("crop_x"), g("crop_y"), g("crop_width"), g("crop_height"), g("ssim_threshold"))
EOF
}
# replay <dir> <case> <backend> <window|pbuffer> [K=V ...]: one host retrace against ENDPOINT, the
# run_trace_case.cmake invocation plus the surface flag. Writes <dir>/{replay.log,rc,t0,t1,output/}.
replay() {
local dir=$1 case=$2 backend=$3 surface=$4; shift 4
local archive trace golden target w h cx cy cw ch ssim
read -r archive trace golden target w h cx cy cw ch ssim < <(case_args "$case")
rm -rf "$dir/input" "$dir/output"; mkdir -p "$dir/input" "$dir/output"
tar xzf "$FIX/$archive" -C "$dir/input"
local flag=--pbuffer-surface; [ "$surface" = window ] && flag=--window-surface
date +%s.%N > "$dir/t0"
env -u DISPLAY -u WAYLAND_DISPLAY -u MOBILEGL_IPC_SURFACE \
MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_CONTROL="$ENDPOINT" MOBILEGL_IPC_DATA=stream \
MOBILEGL_IPC_TOKEN="$TOKEN" MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_LOG_FORWARD=1 \
MOBILEGL_LOG_FILE_PATH="$dir/output/mobilegl.log" "$@" \
timeout 900 "$HOST/mobilegl_trace_replay" --trace "$dir/input/$trace" --golden "$FIX/$golden" \
--diff "$dir/output/$case-diff.png" --output "$dir/output" --backend "$backend" \
--mobilegl-library "$HOST/libMobileGL.so" --target-call "$target" --width "$w" --height "$h" \
--ssim-threshold "$ssim" --crop-x "$cx" --crop-y "$cy" --crop-width "$cw" --crop-height "$ch" \
"$flag" > "$dir/replay.log" 2>&1
local rc=$?
date +%s.%N > "$dir/t1"
echo "$rc" > "$dir/rc"
rm -rf "$dir/input"
return $rc
}
# shots <dir> <pid>: adb screencaps every ~1 s while <pid> lives -> <dir>/shots/NN.png + shots.tsv
shots() {
local dir=$1 pid=$2 n=0
mkdir -p "$dir/shots"
while kill -0 "$pid" 2> /dev/null; do
local t0 t1 f
f=$(printf '%s/shots/%02d.png' "$dir" "$n")
t0=$(date +%s.%N)
A exec-out screencap -p > "$f" 2> /dev/null
t1=$(date +%s.%N)
printf '%s\t%s\t%s\n' "$n" "$t0" "$t1" >> "$dir/shots.tsv"
n=$((n + 1))
sleep 0.7
done
}
# replay_with_shots <dir> <case> <backend> <surface> [K=V ...]
replay_with_shots() {
local dir=$1
mkdir -p "$dir"; : > "$dir/shots.tsv"
replay "$@" &
local pid=$!
shots "$dir" "$pid" &
local shooter=$!
wait "$pid"; local rc=$?
wait "$shooter" 2> /dev/null
return $rc
}
# shot_report <dir>: per screencap, whether it was taken DURING the replay and how much of the
# screen is non-black; the best during-replay shot is copied (and a 540p copy made) as evidence.
shot_report() {
python3 - "$1" <<'EOF'
import sys, pathlib
from PIL import Image
d = pathlib.Path(sys.argv[1])
t0 = float((d / "t0").read_text()); t1 = float((d / "t1").read_text())
best = None
rows = []
for line in (d / "shots.tsv").read_text().splitlines():
n, a, b = line.split("\t"); a = float(a); b = float(b)
f = d / "shots" / f"{int(n):02d}.png"
try:
im = Image.open(f).convert("L")
except Exception as e:
rows.append(f"{n} unreadable {e}"); continue
small = im.resize((im.width // 4, im.height // 4))
px = list(small.getdata())
lit = sum(1 for p in px if p > 24) / len(px)
mean = sum(px) / len(px)
during = a >= t0 and b <= t1
rows.append(f"{n} t=+{a - t0:6.2f}s..+{b - t0:6.2f}s during={during} nonblack={lit:.3f} mean={mean:.1f}")
if during and (best is None or lit > best[1]):
best = (f, lit, mean, a - t0)
print(f"replay ran {t1 - t0:.2f}s; {len(rows)} screencaps")
print("\n".join(rows))
if best:
f, lit, mean, at = best
ev = d / "evidence-during-replay.png"
ev.write_bytes(f.read_bytes())
im = Image.open(f); h = 540; w = max(1, im.width * h // im.height)
im.resize((w, h)).save(d / "evidence-during-replay-540p.png")
print(f"BEST during-replay screencap: {f.name} at +{at:.2f}s nonblack={lit:.3f} mean={mean:.1f} -> {ev}")
else:
print("NO screencap was taken during the replay")
EOF
}
# result_summary <dir>: the runner's own verdict (result.json) and the arm proofs from the logs.
result_summary() {
local dir=$1
echo "rc=$(cat "$dir/rc" 2>/dev/null)"
python3 - "$dir/output/result.json" <<'EOF' 2>/dev/null || echo "result.json: missing"
import json, sys
r = json.load(open(sys.argv[1]))
print("result.json:", {k: r.get(k) for k in ("passed", "statusCode", "ssim", "message", "matchedGoldenPath")})
EOF
grep -hE "surface=(window|pbuffer)|control=tcp data=stream server=|owner=server|Refuse ServerOwned|NoServerDisplay|SurfaceModeMismatch|ServerWindowLost|device lost|DEVICE_LOST|Welcome" \
"$dir"/output/mobilegl*.log 2>/dev/null | cut -c1-300 | sort | uniq -c | sort -rn | head -20
}
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# final-run.sh <stamp>: install and run every device check in order on one build.
set -uo pipefail
STAMP=$1
D=/home/swung/w7/logs/p12/device
H=/home/swung/w7/notes/p12/android
prev=$(ls -d "$D"/[1-7]-* 2>/dev/null | head -1)
if [ -n "$prev" ]; then
arch=$D/trial-$(cat "$D/.stamp" 2>/dev/null || echo unknown)
mkdir -p "$arch"; mv "$D"/[1-7]-* "$arch"/
fi
echo "${STAMP#p12w1-}" > "$D/.stamp"
bash /home/swung/w7/notes/p7/window2/20-install.sh "$STAMP" 2>&1 | tail -3
export STAMP
bash "$H/check1.sh" > /dev/null 2>&1 # 1 Espryt on-screen
bash "$H/check3.sh" > /dev/null 2>&1 # 3 sequential + Busy
LONG_CASE=minecraft-1.21.4-fabric-iris-bsl-esc-menu-854 bash "$H/check4.sh" > /dev/null 2>&1 # 4 window lost
BACKEND=DirectVulkan SECOND_CASE=minecraft-1.21.4-startup bash "$H/check1.sh" > /dev/null 2>&1 # 2 Magma
bash "$H/check5.sh" > /dev/null 2>&1 # 5 + 6 offscreen service
LONG_CASE=minecraft-1.21.4-fabric-iris-bsl-esc-menu-854 bash "$H/check7.sh" > /dev/null 2>&1 # 7 one server
echo "all checks ran for $STAMP"
ls "$D"
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# g1.sh: the pull build's libMobileGL against the P12 base - .text size and full nm lines (the
# base file holds full `nm` lines, so both sides are compared whole and as names).
set -uo pipefail
cd /home/swung/w7/p12-onscreen || exit 1
export MOBILEGL_FLATC_EXECUTABLE=/home/swung/w7/flatc-build/flatc
ninja -C build-linux -j 24 MobileGL 2>&1 | tail -1
readelf -S -W build-linux/libMobileGL.so | awk '$2==".text"{print "G1 text size (hex):", $6, "(base a52203)"}'
T=$(mktemp -d)
nm --defined-only build-linux/libMobileGL.so | sort > "$T/now.txt"
sort /home/swung/w7/logs/p12/pull-syms-base.txt > "$T/base.txt"
echo "G1 full nm lines: added=$(comm -13 "$T/base.txt" "$T/now.txt" | wc -l) removed=$(comm -23 "$T/base.txt" "$T/now.txt" | wc -l)"
awk '{print $3}' "$T/now.txt" | sort > "$T/now-n.txt"; awk '{print $3}' "$T/base.txt" | sort > "$T/base-n.txt"
echo "G1 names: added=$(comm -13 "$T/base-n.txt" "$T/now-n.txt" | wc -l) removed=$(comm -23 "$T/base-n.txt" "$T/now-n.txt" | wc -l)"
rm -rf "$T"
@@ -0,0 +1,25 @@
#!/usr/bin/env python3
"""host-inproc-server.py <libMobileGL.so> <endpoint>: the in-process display server entry
(mobilegl_server_serve_inprocess) hosted by a plain host process, no display installed - the host
twin of MobileGLDisplayActivity's server thread, for reproducing sequential-session behaviour."""
import ctypes, os, sys, signal, threading
lib_path, endpoint = sys.argv[1], sys.argv[2]
for k in ("MOBILEGL_TRANSPORT", "MOBILEGL_IPC_SERVER_PATH", "MOBILEGL_IPC_RING_MB", "MOBILEGL_IPC_STAGE_MB",
"MOBILEGL_IPC_CONTROL", "DISPLAY", "WAYLAND_DISPLAY"):
os.environ.pop(k, None)
os.environ.update(MOBILEGL_IPC_ROLE="server", MOBILEGL_IPC_DIAL="no", MOBILEGL_IPC_LOG_FORWARD="1")
os.environ.setdefault("EGL_PLATFORM", "surfaceless")
lib = ctypes.CDLL(lib_path)
lib.mobilegl_server_serve_inprocess.argtypes = [ctypes.c_char_p]
lib.mobilegl_server_serve_inprocess.restype = ctypes.c_int
def stop(*_):
lib.mobilegl_server_stop_inprocess()
signal.signal(signal.SIGTERM, stop)
signal.signal(signal.SIGINT, stop)
rc = [None]
t = threading.Thread(target=lambda: rc.__setitem__(0, lib.mobilegl_server_serve_inprocess(endpoint.encode())))
t.start()
while t.is_alive():
t.join(0.2)
print("serve returned", rc[0], flush=True)
sys.exit(rc[0] or 0)
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
# hostkill.sh <libdir> <outdir> [case] [kill-after-s]: a replay against the host in-process server,
# whose process is SIGKILLed mid-session. The client must latch DEVICE LOST and end without a
# SIGABRT (rc 134).
set -uo pipefail
LIBDIR=$1; OUT=$2; CASE=${3:-minecraft-1.21.4-fabric-iris-bsl-esc-menu-854}; AFTER=${4:-6}
TREE=/home/swung/w7/p12-onscreen
FIX=$TREE/tools/trace_replay/fixtures
REPLAY=${REPLAY:-/home/swung/w7/logs/p7w7/p12w1-a4a940db/host/mobilegl_trace_replay}
EP=tcp://127.0.0.1:41998
TOKEN=p12-host-repro-token-0001
rm -rf "$OUT"; mkdir -p "$OUT"
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.json __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
MOBILEGL_IPC_TOKEN=$TOKEN MOBILEGL_LOG_FILE_PATH=$OUT/server.log \
python3 /home/swung/w7/notes/p12/android/host-inproc-server.py "$LIBDIR/libMobileGL.so" "$EP" > "$OUT/server.out" 2>&1 &
SERVER=$!
sleep 1.5
read -r archive trace golden target w h cx cy cw ch ssim < <(python3 - "$TREE/tools/trace_replay/trace_cases.json" "$CASE" <<'EOF'
import json, sys
m = json.load(open(sys.argv[1])); d = m["defaults"]
c = next(c for c in m["cases"] if c["name"] == sys.argv[2])
g = lambda k: c.get(k, d.get(k))
print(g("trace_archive"), g("trace_file"), g("golden"), g("target_call"), g("width"), g("height"),
g("crop_x"), g("crop_y"), g("crop_width"), g("crop_height"), g("ssim_threshold"))
EOF
)
d=$OUT/run; mkdir -p "$d/input" "$d/output"; tar xzf "$FIX/$archive" -C "$d/input"
env -u DISPLAY -u WAYLAND_DISPLAY MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_CONTROL=$EP MOBILEGL_IPC_DATA=stream \
MOBILEGL_IPC_TOKEN=$TOKEN MOBILEGL_IPC_LOG_FORWARD=1 MOBILEGL_LOG_FILE_PATH=$d/output/mobilegl.log \
timeout 600 "$REPLAY" --trace "$d/input/$trace" --golden "$FIX/$golden" --diff "$d/output/diff.png" \
--output "$d/output" --backend DirectGLES --mobilegl-library "$LIBDIR/libMobileGL.so" --target-call "$target" \
--width "$w" --height "$h" --ssim-threshold "$ssim" --crop-x "$cx" --crop-y "$cy" --crop-width "$cw" \
--crop-height "$ch" --pbuffer-surface > "$d/replay.log" 2>&1 &
CLIENT=$!
sleep "$AFTER"
kill -0 $CLIENT 2>/dev/null && echo "client live after ${AFTER}s: SIGKILL the server" || echo "WARNING: client already ended"
kill -KILL $SERVER
wait $CLIENT; RC=$?
echo "client rc=$RC $( [ $RC = 134 ] && echo '(SIGABRT)')"
grep -hE "DEVICE LOST|FATAL" "$d/output/mobilegl.client.log" | cut -c1-200 | head -4
rm -rf "$d/input"
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
# hostrepro.sh <libdir> <outdir> [case] [backend] [runs]: the in-process server on the host (no display),
# then <runs> sequential offscreen replays of <case> against it. Reproduces cross-session state leaks.
set -uo pipefail
LIBDIR=$1; OUT=$2; CASE=${3:-OpenRA}; BACKEND=${4:-DirectGLES}; RUNS=${5:-2}
TREE=/home/swung/w7/p12-onscreen
FIX=$TREE/tools/trace_replay/fixtures
REPLAY=${REPLAY:-/home/swung/w7/logs/p7w7/p12w1-984db455/host/mobilegl_trace_replay}
EP=tcp://127.0.0.1:41999
TOKEN=p12-host-repro-token-0001
rm -rf "$OUT"; mkdir -p "$OUT"
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.json __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
MOBILEGL_IPC_TOKEN=$TOKEN MOBILEGL_LOG_FILE_PATH=$OUT/server.log ${SERVER_ENV:-} \
python3 /home/swung/w7/notes/p12/android/host-inproc-server.py "$LIBDIR/libMobileGL.so" "$EP" > "$OUT/server.out" 2>&1 &
SERVER=$!
sleep 1.5
CASES=${CASES:-$(for _ in $(seq 1 "$RUNS"); do printf '%s ' "$CASE"; done)}
n=0
for CASE in $CASES; do
n=$((n + 1))
read -r archive trace golden target w h cx cy cw ch ssim < <(python3 - "$TREE/tools/trace_replay/trace_cases.json" "$CASE" <<'EOF'
import json, sys
m = json.load(open(sys.argv[1])); d = m["defaults"]
c = next(c for c in m["cases"] if c["name"] == sys.argv[2])
g = lambda k: c.get(k, d.get(k))
print(g("trace_archive"), g("trace_file"), g("golden"), g("target_call"), g("width"), g("height"),
g("crop_x"), g("crop_y"), g("crop_width"), g("crop_height"), g("ssim_threshold"))
EOF
)
echo "run$n: $CASE"
d=$OUT/run$n; mkdir -p "$d/input" "$d/output"; tar xzf "$FIX/$archive" -C "$d/input"
env -u DISPLAY -u WAYLAND_DISPLAY MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_CONTROL=$EP MOBILEGL_IPC_DATA=stream \
MOBILEGL_IPC_TOKEN=$TOKEN MOBILEGL_IPC_LOG_FORWARD=1 MOBILEGL_LOG_FILE_PATH=$d/output/mobilegl.log ${CLIENT_ENV:-} \
timeout 600 "$REPLAY" --trace "$d/input/$trace" --golden "$FIX/$golden" --diff "$d/output/diff.png" \
--output "$d/output" --backend "$BACKEND" --mobilegl-library "$LIBDIR/libMobileGL.so" --target-call "$target" \
--width "$w" --height "$h" --ssim-threshold "$ssim" --crop-x "$cx" --crop-y "$cy" --crop-width "$cw" \
--crop-height "$ch" ${SURFACE_FLAG:---pbuffer-surface} > "$d/replay.log" 2>&1
echo "run$n rc=$? $(python3 -c "import json;r=json.load(open('$d/output/result.json'));print(r['passed'],r.get('ssim'))" 2>/dev/null)"
grep -hcE "Program linking failed" "$d/output/mobilegl.server.log" 2>/dev/null | sed "s/^/ link failures: /"
rm -rf "$d/input"
done
kill -TERM $SERVER; wait $SERVER
tail -3 "$OUT/server.out"
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# launch-build.sh [<sha>]: starts build.sh for the package tree's HEAD (or <sha>) in the background.
set -euo pipefail
SHA=$(git -C /home/swung/w7/p12-onscreen rev-parse "${1:-HEAD}")
mkdir -p /home/swung/w7/logs/p12/android
LOG=/home/swung/w7/logs/p12/android/build-${SHA:0:8}.log
setsid nohup bash /home/swung/w7/notes/p12/android/build.sh "$SHA" > "$LOG" 2>&1 < /dev/null &
echo "started build of ${SHA:0:8}, log $LOG"
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
# pidlines.sh <logcat> <pid> <from HH:MM:SS> <to HH:MM:SS> [exclude-regex]: that pid's lines in a window.
f=$1; pid=$2; from=$3; to=$4; ex=${5:-'^$'}
awk -v p="$pid" -v a="$from" -v b="$to" '$3==p && substr($2,1,8)>=a && substr($2,1,8)<=b' "$f" | grep -vE "$ex" | cut -c1-240
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# Quick compile checks before the full APK build: the trace flavour's new/changed Java against
# android-34, and DisplayServerJni.cpp for aarch64-linux-android26 with the split build's flags.
set -uo pipefail
cd /home/swung/w7/p12-onscreen || exit 1
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk PATH=/usr/lib/jvm/java-21-openjdk/bin:$PATH
OUT=$(mktemp -d /tmp/p12-precheck-XXXX)
J=android-plugin/app/src/trace/java/top/mobilegl/plugin
echo "--- javac (android-34)"
javac --release 11 -Xlint:all -cp /home/swung/android-sdk/platforms/android-34/android.jar -d "$OUT/classes" \
$J/MobileGLDisplayActivity.java $J/MobileGLServerService.java $J/ServerEnvironment.java 2>&1 | grep -v "^warning: \[options\]" | tail -30
echo "javac rc=${PIPESTATUS[0]}"
echo "--- clang++ -fsyntax-only DisplayServerJni.cpp (android26)"
NDK=/home/swung/android-sdk/ndk/27.3.13750724/toolchains/llvm/prebuilt/linux-x86_64
# The split build's command line for ServerDisplay.cpp gives the include dirs and defines.
CMD=$(python3 - <<'EOF'
import json,shlex
db=json.load(open('build-split/compile_commands.json'))
e=next(x for x in db if x['file'].endswith('MG_Remote/Server/ServerDisplay.cpp'))
args=shlex.split(e['command'])
keep=[a for a in args if a.startswith(('-I','-D','-isystem','-std=')) ]
# -isystem takes the next arg
out=[];i=0
while i<len(args):
a=args[i]
if a=='-isystem': out+= [a,args[i+1]]; i+=2; continue
if a.startswith(('-I','-D','-std=')): out.append(a)
i+=1
print(' '.join(shlex.quote(a) for a in out))
EOF
)
eval "$NDK/bin/clang++ --target=aarch64-linux-android26 -fsyntax-only -Wall -Wextra $CMD \
MobileGL/MG_Remote/Server/DisplayServerJni.cpp" 2>&1 | grep -E "error|warning: .*DisplayServerJni" | head -30
echo "clang rc=${PIPESTATUS[0]}"
eval "$NDK/bin/clang++ --target=aarch64-linux-android26 -fsyntax-only $CMD \
MobileGL/MG_Remote/Server/ServerDisplay.cpp" 2>&1 | grep -E "error" | head -10
echo "clang ServerDisplay.cpp (android arm) rc=${PIPESTATUS[0]}"
rm -rf "$OUT"
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
# Red-once for the Android stage's host-side tool tests: each mutation must turn its test red, and
# the working file is restored from a backup copy (never git checkout) afterwards.
set -uo pipefail
cd /home/swung/w7/p12-onscreen || exit 1
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk PATH=/usr/lib/jvm/java-21-openjdk/bin:$PATH
B=$(mktemp -d /tmp/p12-redonce-XXXX)
run() { "$@" > "$B/out.txt" 2>&1; local rc=$?; tail -3 "$B/out.txt" | sed 's/^/ /'; echo " rc=$rc"; }
echo "=== 1. tcp_device_server.py at base (no --surface): DeviceServerSurface must be red"
cp tools/trace_replay/tcp_device_server.py "$B/tds.py"
git show HEAD:tools/trace_replay/tcp_device_server.py > tools/trace_replay/tcp_device_server.py
run python3 scripts/ci/tcp_lane_tools_test.py DeviceServerSurface
cp "$B/tds.py" tools/trace_replay/tcp_device_server.py
echo " restored; green again:"; run python3 scripts/ci/tcp_lane_tools_test.py DeviceServerSurface
echo "=== 2. ServerEnvironment.changes without unsets: ServerEnvironmentTest must be red"
F=android-plugin/app/src/trace/java/top/mobilegl/plugin/ServerEnvironment.java
cp "$F" "$B/se.java"
sed -i 's/if (!after.containsKey(name)) edits.put(name, null);/if (false) edits.put(name, null);/' "$F"
grep -c 'if (false) edits.put' "$F"
run python3 tools/trace_replay/test_android_lifecycle.py
cp "$B/se.java" "$F"
echo "=== 3. applyServerRole keeping the scrub list: ServerEnvironmentTest must be red"
sed -i 's/for (String name : SCRUBBED) env.remove(name);/for (String name : SCRUBBED) { }/' "$F"
grep -c 'SCRUBBED) { }' "$F"
run python3 tools/trace_replay/test_android_lifecycle.py
cp "$B/se.java" "$F"
echo "=== 4. the display Activity without android:process: the manifest check must be red"
M=android-plugin/app/src/trace/AndroidManifest.xml
cp "$M" "$B/manifest.xml"
sed -i '/android:process=":mglwin"/d' "$M"
run python3 tools/trace_replay/test_android_lifecycle.py
cp "$B/manifest.xml" "$M"
echo "=== restored: all green"
run python3 tools/trace_replay/test_android_lifecycle.py
git status --short
rm -rf "$B"
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Red-once for the twin drop: the call removed from ~BackendObject_DirectGLES must turn the unit
# case red, and the host sequential repro red again; the file is restored from a backup copy.
set -uo pipefail
cd /home/swung/w7/p12-onscreen || exit 1
export MOBILEGL_FLATC_EXECUTABLE=/home/swung/w7/flatc-build/flatc
F=MobileGL/MG_Backend/DirectGLES/BackendObject_DirectGLES.cpp
B=$(mktemp /tmp/p12-bodg-XXXX.cpp); cp "$F" "$B"
sed -i 's/if (MG_Config::Transport != MG_Config::TransportMode::Monolith) DropEveryTwinForEndedServerSession();/(void)0;/' "$F"
echo "mutation applied: $(grep -c '(void)0;' "$F") site(s)"
ninja -C build-split -j 24 SanityTest MobileGL 2>&1 | tail -1
echo "--- unit case WITHOUT the drop"
./build-split/MobileGL/MG_Test/SanityTest --gtest_filter='EsprytServerSession.*' 2>&1 | grep -E "Failure|OK \]|FAILED \]|still live" | head -8
echo "--- host sequential sessions WITHOUT the drop"
bash /home/swung/w7/notes/p12/android/hostrepro.sh /home/swung/w7/p12-onscreen/build-split /tmp/p12-redonce-twins OpenRA DirectGLES 2 2>&1 | grep -E "^run"
cp "$B" "$F"; rm -f "$B"
touch "$F"
ninja -C build-split -j 24 SanityTest MobileGL 2>&1 | tail -1
echo "--- restored"
./build-split/MobileGL/MG_Test/SanityTest --gtest_filter='EsprytServerSession.*' 2>&1 | grep -E "OK \]|FAILED \]"
git diff --stat
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Runs the host-side tool tests the Android stage touches, in the package tree.
set -uo pipefail
cd /home/swung/w7/p12-onscreen || exit 1
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk PATH=/usr/lib/jvm/java-21-openjdk/bin:$PATH
echo "--- test_android_lifecycle.py"
python3 tools/trace_replay/test_android_lifecycle.py; echo "rc=$?"
echo "--- tcp_lane_tools_test.py DeviceServerSurface + DeviceIdleExemption"
python3 -m pytest -q scripts/ci/tcp_lane_tools_test.py 2>/dev/null | tail -3 || true
python3 scripts/ci/tcp_lane_tools_test.py 2>&1 | tail -4; echo "rc=${PIPESTATUS[0]}"
@@ -0,0 +1,69 @@
// P12 (on-screen server window): A SERVER SESSION ENDS IN A PROCESS THAT OUTLIVES IT.
//
// The in-process display server (the display Activity's process) runs its sessions one after
// another in ONE process, and each new client mints its handles from the same {slot, gen} space
// again. The twin tables are process globals, so the twins the previous session built - naming ids
// of the context its backend destroyed - answered for the next session's objects: on the device
// the second on-screen OpenRA replay linked no program (ssim 0.00004) and the third crashed inside
// Adreno's glDrawElements; on llvmpipe the second replay failed the same way. The server backend's
// destruction under a transport - the end of a session - now drops every twin (without a driver
// call), and monolith keeps its twins. Red once: remove the DropEveryTwinForEndedServerSession
// call from ~BackendObject_DirectGLES and the first half of this case fails at every kind.
#if MOBILEGL_BUILD_DISAGGREGATED
TEST(EsprytServerSession, TheServerBackendsDestructionDropsEveryTwinTheSessionBuilt) {
using namespace MobileGL;
namespace GL = MG_Backend::DirectGLES;
const auto previousTransport = MG_Config::Transport;
const MG_Pipe::MGPipeHandle program{7u, 3u};
const MG_Pipe::MGPipeHandle texture{4u, 2u};
const MG_Pipe::MGPipeHandle buffer{5u, 1u};
// A session's twins: LIVE entries at the generations its client minted. A null twin object is
// enough for the program and texture kinds - what the next session trips over is the live
// entry itself (its generation, and the driver id a real twin would carry).
const auto populate = [&] {
ASSERT_NE(GL::PrgramImpl::g_backendProgramObjects.GetOrCreateByHandle(program), nullptr);
ASSERT_NE(GL::TextureImpl::g_backendTextureObjects.GetOrCreateByHandle(texture), nullptr);
GL::BufferImpl::g_backendBufferResources.GetOrCreate(buffer) =
MakeShared<GL::BufferImpl::GLESBufferResource>();
ASSERT_EQ(GL::PrgramImpl::g_backendProgramObjects.LiveGenAt(program.Slot), 3u);
ASSERT_EQ(GL::TextureImpl::g_backendTextureObjects.LiveGenAt(texture.Slot), 2u);
ASSERT_NE(GL::BufferImpl::g_backendBufferResources.FindByHandle(buffer), nullptr);
};
// Under a transport this backend is the SERVER's: its destruction ends the session.
MG_Config::Transport = MG_Config::TransportMode::Spawn;
populate();
{ GL::BackendObject_DirectGLES serverBackend; }
EXPECT_EQ(GL::PrgramImpl::g_backendProgramObjects.LiveGenAt(program.Slot), 0u)
<< "the ended session's program twin is still live: the next session's client mints {7, 0} "
"and is refused as ProtocolCorruption, or adopts a program of the destroyed context";
EXPECT_EQ(GL::TextureImpl::g_backendTextureObjects.LiveGenAt(texture.Slot), 0u)
<< "the ended session's texture twin is still live";
EXPECT_EQ(GL::BufferImpl::g_backendBufferResources.FindByHandle(buffer), nullptr)
<< "the ended session's buffer twin is still live";
// The next session starts from empty tables: its first handle at that slot is a fresh twin.
MG_Pipe::MGPipeHandle nextSession{7u, 0u};
auto* fresh = GL::PrgramImpl::g_backendProgramObjects.GetOrCreateByHandle(nextSession);
ASSERT_NE(fresh, nullptr);
EXPECT_EQ(*fresh, nullptr);
// Monolith keeps its twins: its backend is not a session's, and nothing here changed for it.
GL::PrgramImpl::g_backendProgramObjects = {};
MG_Config::Transport = MG_Config::TransportMode::Monolith;
populate();
{ GL::BackendObject_DirectGLES monolithBackend; }
EXPECT_EQ(GL::PrgramImpl::g_backendProgramObjects.LiveGenAt(program.Slot), 3u);
EXPECT_EQ(GL::TextureImpl::g_backendTextureObjects.LiveGenAt(texture.Slot), 2u);
EXPECT_NE(GL::BufferImpl::g_backendBufferResources.FindByHandle(buffer), nullptr);
GL::PrgramImpl::g_backendProgramObjects = {};
GL::TextureImpl::g_backendTextureObjects = {};
GL::BufferImpl::g_backendBufferResources = {};
MG_Config::Transport = previousTransport;
}
#else
TEST(EsprytServerSession, TheServerBackendsDestructionDropsEveryTwinTheSessionBuilt) {
GTEST_SKIP() << "a server backend exists only in the split build (MOBILEGL_BUILD_DISAGGREGATED)";
}
#endif
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# show.sh <check-dir>...: the non-logcat lines of each check.log, then its logcat lines (trimmed).
for c in "$@"; do
f=/home/swung/w7/logs/p12/device/$c/check.log
echo "######## $c"
grep -vE "^09-24" "$f" | grep -v Deprecation | cut -c1-260
echo "---- logcat lines"
grep -E "^09-24" "$f" | cut -c1-250 | head -${LINES_MAX:-30}
done
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env python3
"""thumbs.py <out.png> <png>...: a side-by-side strip of 540p-high thumbnails with labels."""
import sys
from PIL import Image, ImageDraw
out, files = sys.argv[1], sys.argv[2:]
thumbs = []
for f in files:
im = Image.open(f).convert("RGB")
h = 540
w = max(1, im.width * h // im.height)
t = im.resize((w, h))
ImageDraw.Draw(t).text((8, 8), f.split("/")[-1], fill=(255, 0, 255))
thumbs.append(t)
strip = Image.new("RGB", (sum(t.width for t in thumbs) + 8 * (len(thumbs) - 1), 540), (40, 40, 40))
x = 0
for t in thumbs:
strip.paste(t, (x, 0))
x += t.width + 8
strip.save(out)
print(out, strip.size)
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# verify-apk.sh <stamp>: the APK carries the display Activity, its JNI and the in-process entry.
O=/home/swung/w7/logs/p7w7/$1
NM=/home/swung/android-sdk/ndk/27.3.13750724/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-nm
BT=$(ls -d /home/swung/android-sdk/build-tools/* | sort -V | tail -1)
echo "--- JNI + in-process entry exported by the APK's libMobileGL.so"
$NM -D --defined-only "$O/apk/lib/libMobileGL.so" | grep -E "MobileGLDisplayActivity|serve_inprocess|stop_inprocess"
echo "--- manifest"
"$BT/aapt2" dump xmltree --file AndroidManifest.xml "$O/apk/trace-$1.apk" | grep -B2 -A14 'MobileGLDisplayActivity' | grep -E "name|process|hardware|launchMode|taskAffinity|exported|configChanges" | head -12
echo "--- classes"
unzip -p "$O/apk/trace-$1.apk" classes.dex | strings | grep -E "^Ltop/mobilegl/plugin/(MobileGLDisplayActivity|ServerEnvironment|MobileGLServerService);" | sort -u
echo "--- stamp"
strings "$O/apk/lib/libMobileGL.so" | grep -F "$1" | head -2
cat "$O/build.env"
@@ -0,0 +1,9 @@
Device 2f7cbe2e as found by the P12 android stage (2026-09-24 ~00:10, before any change):
- installed top.mobilegl.plugin.p7w1.trace (window-2 build), its :mglsrv service running the supervisor
`libMobileGLServer.so tcp://0.0.0.0:40613 --serve` (window-2's 90-restore.sh left it up)
- doze whitelist: user,top.mobilegl.plugin.p7w1.trace,10318 (window-2 state file
~/.cache/mobilegl/tcp-server/2f7cbe2e-top.mobilegl.plugin.p7w1.trace.json, originally_whitelisted=false)
- settings global stay_on_while_plugged_in = 15
- adb forward --list: empty
- screen: mWakefulness=Awake, isKeyguardShowing=false
The APK install (20-install.sh, 00:25) replaced the package and ended that supervisor.
@@ -0,0 +1,95 @@
[00:55:16] check 1-onscreen-espryt: stamp p12w1-29b7b284 backend DirectGLES case OpenRA
[00:55:16] found:
Starting: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGL MobileGLDisplay (MG_Remote server: ... listening on ... in-process display server, display installed)
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_SURFACE=server MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613 (trace_replay --window-surface)
[00:55:18] READY
[00:55:18] :mglwin pid=16893
mCurrentFocus=Window{f185636 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
mFocusedApp=ActivityRecord{78532545 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t661}
[00:55:18] replay OpenRA DirectGLES --window-surface MOBILEGL_IPC_SURFACE=server
[00:55:31] replay rc=0
rc=0
result.json: {'passed': True, 'statusCode': 0, 'ssim': 1.0, 'message': 'retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png'}
1 [12:55:22] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 6, window 0xb40000789ac32cb0 generation 1)
1 [12:55:22] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac32cb0 generation 1)
1 [00:55:19] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 640x480 owner=server (MOBILEGL_IPC_SURFACE=server, 640x480 requested)
1 [00:55:18] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 640x480 owner=server (MOBILEGL_IPC_SURFACE=server, 640x480 requested)
1 [00:55:18] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=16893 dial=connect
<stdin>:15: DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
replay ran 11.21s; 12 screencaps
0 t=+ -0.07s..+ 0.20s during=False nonblack=0.023 mean=1.9
1 t=+ 0.90s..+ 1.18s during=True nonblack=0.000 mean=0.0
2 t=+ 1.88s..+ 2.23s during=True nonblack=0.090 mean=5.4
3 t=+ 2.93s..+ 3.24s during=True nonblack=0.090 mean=5.4
4 t=+ 3.94s..+ 4.23s during=True nonblack=0.090 mean=5.4
5 t=+ 4.93s..+ 5.24s during=True nonblack=0.090 mean=5.4
6 t=+ 5.94s..+ 6.25s during=True nonblack=0.090 mean=5.4
7 t=+ 6.95s..+ 7.29s during=True nonblack=0.090 mean=5.4
8 t=+ 7.99s..+ 8.30s during=True nonblack=0.090 mean=5.4
9 t=+ 9.00s..+ 9.33s during=True nonblack=0.090 mean=5.4
10 t=+ 10.03s..+ 10.32s during=True nonblack=0.090 mean=5.4
11 t=+ 11.03s..+ 11.67s during=False nonblack=0.340 mean=32.4
BEST during-replay screencap: 02.png at +1.88s nonblack=0.090 mean=5.4 -> /home/swung/w7/logs/p12/device/1-onscreen-espryt/replay/evidence-during-replay.png
[00:55:31] :mglwin pid after: 16893
09-24 12:55:21.624 16893 16893 I MobileGL: [12:55:21] [Android w1.trace:mglwin/INFO]: MG_Remote server: this process owns a display (ServerDisplay installed); a ServerOwned window surface is served on its window
09-24 12:55:21.624 16893 16893 I MobileGLDisplay: starting the in-process display server on tcp://127.0.0.1:40613 (pid=16893, backend pinned by the first session)
09-24 12:55:21.625 16893 18709 E MobileGL: [12:55:21] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=16893 listening on tcp://127.0.0.1:40613 (in-process display server, display installed)
09-24 12:55:21.625 16893 18709 E MobileGL: [12:55:21] [Android mgl-display-ser/ERROR]: MG_Remote server: pre-auth deadline=2000 ms, at most 8 pending, backoff after 5 failures from 1000 ms (0 = off)
09-24 12:55:21.652 16893 16893 I MobileGL: [12:55:21] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac32cb0 attached at 1280x2620 (generation 1)
09-24 12:55:21.652 16893 16893 I MobileGLDisplay: surfaceCreated: server window 1280x2620 attached
09-24 12:55:21.652 16893 16893 I MobileGL: [12:55:21] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac32cb0 is now 1280x2620
09-24 12:55:21.652 16893 16893 I MobileGLDisplay: surfaceChanged: server window 1280x2620 attached
09-24 12:55:21.883 16893 18709 E MobileGL: [12:55:21] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #1 started on a thread (pid=16893)
09-24 12:55:21.883 16893 18729 I MobileGL: [12:55:21] [Android mgl-display-ser/INFO]: Config: Active backend type set to DirectGLES
09-24 12:55:21.883 16893 18729 E MobileGL: [12:55:21] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=16893 in-process display server pinned backend type 0 for the process lifetime (the first session's; MOBILEGL_BACKEND_TYPE unset)
09-24 12:55:21.884 16893 18729 I MobileGL: [12:55:21] [Android mgl-display-ser/INFO]: Loaded GL backend library: libEGL.so
09-24 12:55:21.884 16893 18729 F MobileGL: [12:55:21] [Android mgl-display-ser/FATAL]: Failed to load EGL function: eglSwapBuffersWithDamageEXT
09-24 12:55:21.890 16893 18729 E MobileGL: [12:55:21] [Android mgl-display-ser/ERROR]: Failed to load GLES function: glShaderStorageBlockBinding
09-24 12:55:21.905 16893 18729 I MobileGL: [12:55:21] [Android mgl-display-ser/INFO]: MG_Remote memory[accept/server]: peakRss=249167872 currentRss=249167872 roleMapped=58990592 allRolesMapped=58990592 (peakRss is the PROCESS's; under inproc both roles share it)
09-24 12:55:21.905 16893 18729 E MobileGL: [12:55:21] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=16893 transport=spawn role=server ready control=tcp data=stream
09-24 12:55:21.908 16893 18731 I MobileGL: [12:55:21] [Android mgl-srv-apply/INFO]: MG_Remote server: mgl-srv-apply started. MOBILEGL_IPC_SERVER_AFFINITY='auto' requested mask 0xc0, RESOLVED mask 0xc0 (0 = no affinity applied), spin 50 us
09-24 12:55:22.037 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: MG_Remote server: display geometry 640x480 requested (SurfaceHolder.setFixedSize)
09-24 12:55:22.038 16893 16893 I MobileGLDisplay: geometry request 640x480 (setFixedSize, aspect-fit)
09-24 12:55:22.045 16893 16893 I MobileGL: [12:55:22] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac32cb0 is now 640x480
09-24 12:55:22.045 16893 16893 I MobileGLDisplay: surfaceChanged: server window 640x480 attached
09-24 12:55:22.052 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac32cb0 generation 1)
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_VENDOR: Qualcomm
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_RENDERER: Adreno (TM) 830
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: Detected 125 OpenGL ES extensions:
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_EGL_image
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_EGL_image_external
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_EGL_sync
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_vertex_half_float
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_framebuffer_object
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_rgb8_rgba8
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_compressed_ETC1_RGB8_texture
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_AMD_compressed_ATC_texture
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_KHR_texture_compression_astc_sliced_3d
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_KHR_texture_compression_astc_ldr
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_KHR_texture_compression_astc_hdr
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_texture_compression_astc
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_EXT_texture_compression_s3tc
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_EXT_texture_compression_s3tc_srgb
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_EXT_texture_compression_rgtc
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_EXT_texture_compression_bptc
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_texture_npot
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_EXT_texture_filter_anisotropic
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_EXT_texture_format_BGRA8888
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_EXT_read_format_bgra
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_texture_3D
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_EXT_color_buffer_float
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_EXT_color_buffer_half_float
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_EXT_float_blend
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_QCOM_alpha_test
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_depth24
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_packed_depth_stencil
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_depth_texture
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_depth_texture_cube_map
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_EXT_sRGB
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_texture_float
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_texture_float_linear
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_texture_half_float
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_OES_texture_half_float_linear
09-24 12:55:22.079 16893 18731 I MobileGL: [12:55:22] [Android mgl-srv-apply/INFO]: GL_EXT_texture_type_2_10_10_10_REV
[00:55:32] done 1-onscreen-espryt
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

@@ -0,0 +1,32 @@
{
"passed": true,
"statusCode": 0,
"message": "retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"tracePath": "/home/swung/w7/logs/p12/device/1-onscreen-espryt/replay/input/openra.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"actualPath": "/home/swung/w7/logs/p12/device/1-onscreen-espryt/replay/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/1-onscreen-espryt/replay/output/OpenRA-diff.png",
"backend": "DirectGLES",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 31249,
"width": 640,
"height": 480,
"cropX": 1,
"cropY": 1,
"cropWidth": 638,
"cropHeight": 478,
"ssim": 1.000000000,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": false,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": 0
}
@@ -0,0 +1,3 @@
Starting: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGL MobileGLDisplay (MG_Remote server: ... listening on ... in-process display server, display installed)
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_SURFACE=server MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613 (trace_replay --window-surface)
@@ -0,0 +1,106 @@
[00:56:15] check 2-onscreen-magma: stamp p12w1-29b7b284 backend DirectVulkan case OpenRA
[00:56:16] found: 16893 1666 top.mobilegl.plugin.p7w1.trace:mglwin top.mobilegl.plugin.p7w1.trace:mglwin;
Starting: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGL MobileGLDisplay (MG_Remote server: ... listening on ... in-process display server, display installed)
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_SURFACE=server MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613 (trace_replay --window-surface)
[00:56:17] READY
[00:56:17] :mglwin pid=17622
mCurrentFocus=Window{1e71822 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
mFocusedApp=ActivityRecord{113535615 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t662}
[00:56:17] replay OpenRA DirectVulkan --window-surface MOBILEGL_IPC_SURFACE=server
[00:56:30] replay rc=0
rc=0
result.json: {'passed': True, 'statusCode': 0, 'ssim': 1.0, 'message': 'retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png'}
2 [00:56:18] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 640x480 owner=server (MOBILEGL_IPC_SURFACE=server, 640x480 requested)
1 [12:56:21] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 6, window 0xb40000789ac37380 generation 1)
1 [12:56:21] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac37380 generation 1)
1 [00:56:18] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=17622 dial=connect
<stdin>:15: DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
replay ran 11.53s; 12 screencaps
0 t=+ -0.07s..+ 0.20s during=False nonblack=0.019 mean=1.7
1 t=+ 0.90s..+ 1.19s during=True nonblack=0.000 mean=0.0
2 t=+ 1.89s..+ 2.19s during=True nonblack=0.090 mean=5.4
3 t=+ 2.89s..+ 3.18s during=True nonblack=0.090 mean=5.4
4 t=+ 3.89s..+ 4.18s during=True nonblack=0.090 mean=5.4
5 t=+ 4.88s..+ 5.21s during=True nonblack=0.090 mean=5.4
6 t=+ 5.92s..+ 6.24s during=True nonblack=0.090 mean=5.4
7 t=+ 6.95s..+ 7.29s during=True nonblack=0.090 mean=5.4
8 t=+ 7.99s..+ 8.31s during=True nonblack=0.090 mean=5.4
9 t=+ 9.01s..+ 9.34s during=True nonblack=0.090 mean=5.4
10 t=+ 10.04s..+ 10.37s during=True nonblack=0.090 mean=5.4
11 t=+ 11.08s..+ 11.74s during=False nonblack=0.340 mean=32.4
BEST during-replay screencap: 02.png at +1.89s nonblack=0.090 mean=5.4 -> /home/swung/w7/logs/p12/device/2-onscreen-magma/replay/evidence-during-replay.png
[00:56:31] :mglwin pid after: 17622
[00:56:31] a second DirectVulkan session in the same process: minecraft-1.21.4-startup on-screen
[00:56:40] second session rc=0
rc=0
result.json: {'passed': True, 'statusCode': 0, 'ssim': 0.999999511, 'message': 'retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=520, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png'}
2 [00:56:31] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 854x480 owner=server (MOBILEGL_IPC_SURFACE=server, 854x480 requested)
1 [12:56:34] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 6, window 0xb40000789ac37380 generation 1)
1 [12:56:34] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 2, window 0xb40000789ac37380 generation 1)
1 [00:56:31] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=17622 dial=connect
<stdin>:15: DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
8 t=+ 8.56s..+ 8.88s during=False nonblack=0.261 mean=31.8
BEST during-replay screencap: 01.png at +1.30s nonblack=0.261 mean=31.7 -> /home/swung/w7/logs/p12/device/2-onscreen-magma/second/evidence-during-replay.png
[00:56:41] :mglwin pid after the second session: 17622
09-24 12:56:20.787 17622 17622 I MobileGL: [12:56:20] [Android w1.trace:mglwin/INFO]: MG_Remote server: this process owns a display (ServerDisplay installed); a ServerOwned window surface is served on its window
09-24 12:56:20.787 17622 17622 I MobileGLDisplay: starting the in-process display server on tcp://127.0.0.1:40613 (pid=17622, backend DirectVulkan)
09-24 12:56:20.787 17622 19362 E MobileGL: [12:56:20] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=17622 listening on tcp://127.0.0.1:40613 (in-process display server, display installed)
09-24 12:56:20.787 17622 19362 E MobileGL: [12:56:20] [Android mgl-display-ser/ERROR]: MG_Remote server: pre-auth deadline=2000 ms, at most 8 pending, backoff after 5 failures from 1000 ms (0 = off)
09-24 12:56:20.814 17622 17622 I MobileGL: [12:56:20] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac37380 attached at 1280x2620 (generation 1)
09-24 12:56:20.814 17622 17622 I MobileGLDisplay: surfaceCreated: server window 1280x2620 attached
09-24 12:56:20.814 17622 17622 I MobileGL: [12:56:20] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac37380 is now 1280x2620
09-24 12:56:20.814 17622 17622 I MobileGLDisplay: surfaceChanged: server window 1280x2620 attached
09-24 12:56:21.071 17622 19362 E MobileGL: [12:56:21] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #1 started on a thread (pid=17622)
09-24 12:56:21.071 17622 19385 I MobileGL: [12:56:21] [Android mgl-display-ser/INFO]: Config: Active backend type set to DirectVulkan
09-24 12:56:21.071 17622 19385 E MobileGL: [12:56:21] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=17622 in-process display server pinned backend type 1 for the process lifetime (MOBILEGL_BACKEND_TYPE)
09-24 12:56:21.084 17622 19385 I MobileGL: [12:56:21] [Android mgl-display-ser/INFO]: MG_Remote memory[accept/server]: peakRss=246738944 currentRss=246738944 roleMapped=58990592 allRolesMapped=58990592 (peakRss is the PROCESS's; under inproc both roles share it)
09-24 12:56:21.084 17622 19385 E MobileGL: [12:56:21] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=17622 transport=spawn role=server ready control=tcp data=stream
09-24 12:56:21.087 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: MG_Remote server: mgl-srv-apply started. MOBILEGL_IPC_SERVER_AFFINITY='auto' requested mask 0xc0, RESOLVED mask 0xc0 (0 = no affinity applied), spin 50 us
09-24 12:56:21.218 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: MG_Remote server: display geometry 640x480 requested (SurfaceHolder.setFixedSize)
09-24 12:56:21.218 17622 17622 I MobileGLDisplay: geometry request 640x480 (setFixedSize, aspect-fit)
09-24 12:56:21.225 17622 17622 I MobileGL: [12:56:21] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac37380 is now 640x480
09-24 12:56:21.225 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac37380 generation 1)
09-24 12:56:21.225 17622 17622 I MobileGLDisplay: surfaceChanged: server window 640x480 attached
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: Got 14 Vulkan instance extensions:
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_surface (r.25)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_surface_protected_capabilities (r.1)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_android_surface (r.6)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_EXT_swapchain_colorspace (r.5)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_get_surface_capabilities2 (r.1)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_GOOGLE_surfaceless_query (r.2)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_EXT_surface_maintenance1 (r.1)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_EXT_debug_report (r.10)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_get_physical_device_properties2 (r.2)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_external_semaphore_capabilities (r.1)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_external_memory_capabilities (r.1)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_device_group_creation (r.1)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_EXT_debug_utils (r.2)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_external_fence_capabilities (r.1)
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: Validation layers not available.
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: Validation layers not requested.
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: Enabling 2 Vulkan instance extensions:
09-24 12:56:21.270 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_surface
09-24 12:56:21.271 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_android_surface
09-24 12:56:21.277 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: Found 1 physical device(s).
09-24 12:56:21.277 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: Adreno (TM) 830 (Vulkan 1.3.284, INTEGRATED_GPU)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: Got 165 Vulkan device extensions:
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_incremental_present (r.2)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_EXT_hdr_metadata (r.3)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_shared_presentable_image (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_GOOGLE_display_timing (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_EXT_image_compression_control (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_EXT_image_compression_control_swapchain (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_EXT_swapchain_maintenance1 (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_swapchain_mutable_format (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_EXT_depth_range_unrestricted (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_EXT_subgroup_size_control (r.2)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_ray_tracing_maintenance1 (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_external_memory (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_EXT_pipeline_creation_feedback (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_shader_float16_int8 (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_EXT_multisampled_render_to_single_sampled (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_get_memory_requirements2 (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_copy_commands2 (r.1)
09-24 12:56:21.278 17622 19387 I MobileGL: [12:56:21] [Android mgl-srv-apply/INFO]: VK_KHR_deferred_host_operations (r.4)
[00:56:41] done 2-onscreen-magma
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

@@ -0,0 +1,32 @@
{
"passed": true,
"statusCode": 0,
"message": "retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"tracePath": "/home/swung/w7/logs/p12/device/2-onscreen-magma/replay/input/openra.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"actualPath": "/home/swung/w7/logs/p12/device/2-onscreen-magma/replay/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/2-onscreen-magma/replay/output/OpenRA-diff.png",
"backend": "DirectVulkan",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 31249,
"width": 640,
"height": 480,
"cropX": 1,
"cropY": 1,
"cropWidth": 638,
"cropHeight": 478,
"ssim": 1.000000000,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": false,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": 0
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

@@ -0,0 +1,32 @@
{
"passed": true,
"statusCode": 0,
"message": "retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=520, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png",
"tracePath": "/home/swung/w7/logs/p12/device/2-onscreen-magma/second/input/trace.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png",
"actualPath": "/home/swung/w7/logs/p12/device/2-onscreen-magma/second/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/2-onscreen-magma/second/output/minecraft-1.21.4-startup-diff.png",
"backend": "DirectVulkan",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 92195,
"width": 854,
"height": 480,
"cropX": 0,
"cropY": 0,
"cropWidth": 0,
"cropHeight": 0,
"ssim": 0.999999511,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": false,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": 520
}
@@ -0,0 +1,3 @@
Starting: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGL MobileGLDisplay (MG_Remote server: ... listening on ... in-process display server, display installed)
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_SURFACE=server MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613 (trace_replay --window-surface)
@@ -0,0 +1,47 @@
[00:55:32] :mglwin pid now=16893 (check 1's session ran in pid=16893)
[00:55:32] === session 2 in the same process: OpenRA on-screen
[00:55:44] second session rc=0
rc=0
result.json: {'passed': True, 'statusCode': 0, 'ssim': 1.0, 'message': 'retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png'}
2 [00:55:32] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 640x480 owner=server (MOBILEGL_IPC_SURFACE=server, 640x480 requested)
1 [12:55:35] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 6, window 0xb40000789ac32cb0 generation 1)
1 [12:55:35] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac32cb0 generation 1)
1 [00:55:32] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=16893 dial=connect
<stdin>:15: DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
10 t=+ 10.86s..+ 11.57s during=False nonblack=0.340 mean=30.0
BEST during-replay screencap: 02.png at +2.37s nonblack=0.090 mean=5.4 -> /home/swung/w7/logs/p12/device/3-sequential-and-busy/second/evidence-during-replay.png
[00:55:45] Welcome server pids seen by the two clients (check 1, this one):
2 control=tcp data=stream server=127.0.0.1:40613 pid=16893
[00:55:45] === Busy: a long on-screen session (minecraft-1.21.4-startup), then a second authenticated client
[00:55:46] long session is on screen
[00:55:48] long session still live - starting the second client
/home/swung/w7/notes/p12/android/dev.sh: line 60: 3978928 Aborted env -u DISPLAY -u WAYLAND_DISPLAY -u MOBILEGL_IPC_SURFACE MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_CONTROL="$ENDPOINT" MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_TOKEN="$TOKEN" MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_LOG_FORWARD=1 MOBILEGL_LOG_FILE_PATH="$dir/output/mobilegl.log" "$@" timeout 900 "$HOST/mobilegl_trace_replay" --trace "$dir/input/$trace" --golden "$FIX/$golden" --diff "$dir/output/$case-diff.png" --output "$dir/output" --backend "$backend" --mobilegl-library "$HOST/libMobileGL.so" --target-call "$target" --width "$w" --height "$h" --ssim-threshold "$ssim" --crop-x "$cx" --crop-y "$cy" --crop-width "$cw" --crop-height "$ch" "$flag" > "$dir/replay.log" 2>&1
[00:55:48] concurrent client rc=134
1 [00:55:48] [Linux mobilegl_trace_/ERROR]: MGPipe: peer Refuse{Busy} one session is already active expected=0 actual=0
[00:55:52] long session rc=0
rc=0
result.json: {'passed': True, 'statusCode': 0, 'ssim': 0.999999511, 'message': 'retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=520, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png'}
2 [00:55:45] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 854x480 owner=server (MOBILEGL_IPC_SURFACE=server, 854x480 requested)
1 [12:55:48] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 6, window 0xb40000789ac32cb0 generation 1)
1 [12:55:48] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 2, window 0xb40000789ac32cb0 generation 1)
1 [00:55:45] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=16893 dial=connect
<stdin>:15: DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
5 t=+ 5.50s..+ 5.83s during=True nonblack=0.261 mean=32.0
6 t=+ 6.53s..+ 6.84s during=True nonblack=0.261 mean=31.9
BEST during-replay screencap: 01.png at +1.36s nonblack=0.261 mean=31.8 -> /home/swung/w7/logs/p12/device/3-sequential-and-busy/long/evidence-during-replay.png
[00:55:53] :mglwin pid after: 16893
09-24 12:55:35.571 16893 18709 E MobileGL: [12:55:35] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #2 started on a thread (pid=16893)
09-24 12:55:35.786 16893 16893 I MobileGLDisplay: geometry request 640x480 (setFixedSize, aspect-fit)
09-24 12:55:35.789 16893 18851 I MobileGL: [12:55:35] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac32cb0 generation 1)
09-24 12:55:35.860 16893 16893 I MobileGLDisplay: geometry request 640x480 (setFixedSize, aspect-fit)
09-24 12:55:35.864 16893 18851 I MobileGL: [12:55:35] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 6, window 0xb40000789ac32cb0 generation 1)
09-24 12:55:47.107 16893 18709 E MobileGL: [12:55:47] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #2 pid=16893 reaped exit=0 sessionsFaulted=0
09-24 12:55:48.458 16893 18709 E MobileGL: [12:55:48] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #3 started on a thread (pid=16893)
09-24 12:55:48.630 16893 16893 I MobileGLDisplay: geometry request 854x480 (setFixedSize, aspect-fit)
09-24 12:55:48.647 16893 16893 I MobileGLDisplay: surfaceChanged: server window 854x480 attached
09-24 12:55:48.650 16893 18956 I MobileGL: [12:55:48] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 2, window 0xb40000789ac32cb0 generation 1)
09-24 12:55:48.697 16893 16893 I MobileGLDisplay: geometry request 854x480 (setFixedSize, aspect-fit)
09-24 12:55:48.701 16893 18956 I MobileGL: [12:55:48] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 6, window 0xb40000789ac32cb0 generation 1)
09-24 12:55:51.238 16893 18709 E MobileGL: [12:55:51] [Android mgl-display-ser/ERROR]: MG_Remote server: Refuse{Busy} one session is already active
09-24 12:55:55.993 16893 18709 E MobileGL: [12:55:55] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #3 pid=16893 reaped exit=0 sessionsFaulted=0
[00:55:53] done 3
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

@@ -0,0 +1,32 @@
{
"passed": true,
"statusCode": 0,
"message": "retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=520, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png",
"tracePath": "/home/swung/w7/logs/p12/device/3-sequential-and-busy/long/input/trace.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png",
"actualPath": "/home/swung/w7/logs/p12/device/3-sequential-and-busy/long/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/3-sequential-and-busy/long/output/minecraft-1.21.4-startup-diff.png",
"backend": "DirectGLES",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 92195,
"width": 854,
"height": 480,
"cropX": 0,
"cropY": 0,
"cropWidth": 0,
"cropHeight": 0,
"ssim": 0.999999511,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": false,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": 520
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

@@ -0,0 +1,32 @@
{
"passed": true,
"statusCode": 0,
"message": "retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"tracePath": "/home/swung/w7/logs/p12/device/3-sequential-and-busy/second/input/openra.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"actualPath": "/home/swung/w7/logs/p12/device/3-sequential-and-busy/second/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/3-sequential-and-busy/second/output/OpenRA-diff.png",
"backend": "DirectGLES",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 31249,
"width": 640,
"height": 480,
"cropX": 1,
"cropY": 1,
"cropWidth": 638,
"cropHeight": 478,
"ssim": 1.000000000,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": false,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": 0
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

@@ -0,0 +1,32 @@
{
"passed": true,
"statusCode": 0,
"message": "retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"tracePath": "/home/swung/w7/logs/p12/device/4-window-lost/after/input/openra.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"actualPath": "/home/swung/w7/logs/p12/device/4-window-lost/after/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/4-window-lost/after/output/OpenRA-diff.png",
"backend": "DirectGLES",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 31249,
"width": 640,
"height": 480,
"cropX": 1,
"cropY": 1,
"cropWidth": 638,
"cropHeight": 478,
"ssim": 1.000000000,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": false,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": 0
}
@@ -0,0 +1,62 @@
[00:55:53] :mglwin pid before=16893
[00:55:54] session is on screen
[00:55:57] session live - pressing HOME
/home/swung/w7/notes/p12/android/dev.sh: line 60: 3979042 Aborted env -u DISPLAY -u WAYLAND_DISPLAY -u MOBILEGL_IPC_SURFACE MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_CONTROL="$ENDPOINT" MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_TOKEN="$TOKEN" MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_LOG_FORWARD=1 MOBILEGL_LOG_FILE_PATH="$dir/output/mobilegl.log" "$@" timeout 900 "$HOST/mobilegl_trace_replay" --trace "$dir/input/$trace" --golden "$FIX/$golden" --diff "$dir/output/$case-diff.png" --output "$dir/output" --backend "$backend" --mobilegl-library "$HOST/libMobileGL.so" --target-call "$target" --width "$w" --height "$h" --ssim-threshold "$ssim" --crop-x "$cx" --crop-y "$cy" --crop-width "$cw" --crop-height "$ch" "$flag" > "$dir/replay.log" 2>&1
[00:55:59] client rc=134 after HOME (0.82 s after the key)
rc=134
result.json: missing
1 [12:56:01] [Android mgl-srv-apply/FATAL]: MGPipe: Fatal{ServerWindowLost, "surfaceDestroyed"} - the server's own display window was destroyed under this on-screen session; its surface was released on mgl-srv-apply before the window went, and the session ends so the client reads a clean device loss.
1 [12:56:01] [Android mgl-srv-apply/ERROR]: MG_Remote server: SessionLatch{ServerWindowLost} - the first named fault of this session is latched; every further record and control op is declined and the session closes (exit 75) for the supervisor to serve the next connection (PH-1, ID-P7-1)
1 [12:56:01] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=16893 session closed on a latched fault (ServerWindowLost; 1 named fault(s) latched or declined); exiting 75 for the supervisor to reap - PH-1
1 [12:55:57] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 2, window 0xb40000789ac32cb0 generation 1)
1 [00:55:54] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 854x480 owner=server (MOBILEGL_IPC_SURFACE=server, 854x480 requested)
1 [00:55:53] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=16893 dial=connect
1 [00:55:58] [Linux mobilegl_trace_/ERROR]: MGPipe: DEVICE LOST - the barrier woke on a peer that had hung up. The server process is gone; every verb from here is DECLINED and glGetGraphicsResetStatus reports GL_UNKNOWN_CONTEXT_RESET. This is latched from the pe
1 [12:56:01] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=16893 session closed on a latched fault (ServerWindowLost; 1 named fault(s) latched or declined); exiting 75 for the supervisor to reap - PH-1
1 [12:56:01] [Android mgl-srv-apply/ERROR]: MG_Remote server: mgl-srv-apply leaves its loop - the session latched a named fault and declines the rest of the ring (PH-1)
1 [12:56:01] [Android mgl-srv-apply/ERROR]: MG_Remote server: SessionLatch{ServerWindowLost} - the first named fault of this session is latched; every further record and control op is declined and the session closes (exit 75) for the supervisor to serve the next
1 [12:56:01] [Android mgl-srv-apply/FATAL]: MGPipe: Fatal{ServerWindowLost, "surfaceDestroyed"} - the server's own display window was destroyed under this on-screen session; its surface was released on mgl-srv-apply before the window went, and the session ends s
[00:56:01] :mglwin pid after HOME=16893 (before=16893): SURVIVED
09-24 12:55:56.897 16893 18709 E MobileGL: [12:55:56] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #4 started on a thread (pid=16893)
09-24 12:56:01.355 16893 19061 F MobileGL: [12:56:01] [Android mgl-srv-apply/FATAL]: MGPipe: Fatal{ServerWindowLost, "surfaceDestroyed"} - the server's own display window was destroyed under this on-screen session; its surface was released on mgl-srv-apply before the window went, and the session end
09-24 12:56:01.355 16893 19061 E MobileGL: [12:56:01] [Android mgl-srv-apply/ERROR]: MG_Remote server: SessionLatch{ServerWindowLost} - the first named fault of this session is latched; every further record and control op is declined and the session closes (exit 75) for the supervisor to serve the n
09-24 12:56:01.355 16893 19061 E MobileGL: [12:56:01] [Android mgl-srv-apply/ERROR]: MG_Remote server: mgl-srv-apply leaves its loop - the session latched a named fault and declines the rest of the ring (PH-1)
09-24 12:56:01.355 16893 16893 I MobileGL: [12:56:01] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac32cb0 detached (ReleasedBySession)
09-24 12:56:01.355 16893 16893 I MobileGLDisplay: surfaceDestroyed: server window detached (ReleasedBySession) in 10 ms
09-24 12:56:01.378 16893 19054 E MobileGL: [12:56:01] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=16893 session closed on a latched fault (ServerWindowLost; 1 named fault(s) latched or declined); exiting 75 for the supervisor to reap - PH-1
09-24 12:56:01.457 16893 18709 E MobileGL: [12:56:01] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #4 pid=16893 reaped exit=75 (latched fault) sessionsFaulted=1
[00:56:01] === bring the Activity back, then a new on-screen session
[00:56:02] window re-attached
mCurrentFocus=Window{f185636 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
mFocusedApp=ActivityRecord{78532545 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t661}
[00:56:15] after-return session rc=0
rc=0
result.json: {'passed': True, 'statusCode': 0, 'ssim': 1.0, 'message': 'retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png'}
2 [00:56:02] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 640x480 owner=server (MOBILEGL_IPC_SURFACE=server, 640x480 requested)
1 [12:56:06] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 6, window 0xb40000789ac2d290 generation 3)
1 [12:56:05] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac2d290 generation 3)
1 [00:56:02] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=16893 dial=connect
<stdin>:15: DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
11 t=+ 11.12s..+ 11.76s during=False nonblack=0.340 mean=32.4
BEST during-replay screencap: 02.png at +1.93s nonblack=0.090 mean=5.4 -> /home/swung/w7/logs/p12/device/4-window-lost/after/evidence-during-replay.png
[00:56:15] :mglwin pid at the end=16893
09-24 12:55:56.897 16893 18709 E MobileGL: [12:55:56] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #4 started on a thread (pid=16893)
09-24 12:55:57.108 16893 16893 I MobileGLDisplay: geometry request 854x480 (setFixedSize, aspect-fit)
09-24 12:55:57.111 16893 19061 I MobileGL: [12:55:57] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 2, window 0xb40000789ac32cb0 generation 1)
09-24 12:56:01.355 16893 19061 F MobileGL: [12:56:01] [Android mgl-srv-apply/FATAL]: MGPipe: Fatal{ServerWindowLost, "surfaceDestroyed"} - the server's own display window was destroyed under this on-screen session; its surface was released on mgl-srv-apply before the window went, and the session end
09-24 12:56:01.355 16893 19061 E MobileGL: [12:56:01] [Android mgl-srv-apply/ERROR]: MG_Remote server: SessionLatch{ServerWindowLost} - the first named fault of this session is latched; every further record and control op is declined and the session closes (exit 75) for the supervisor to serve the n
09-24 12:56:01.355 16893 16893 I MobileGL: [12:56:01] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac32cb0 detached (ReleasedBySession)
09-24 12:56:01.355 16893 16893 I MobileGLDisplay: surfaceDestroyed: server window detached (ReleasedBySession) in 10 ms
09-24 12:56:01.378 16893 19054 E MobileGL: [12:56:01] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=16893 session closed on a latched fault (ServerWindowLost; 1 named fault(s) latched or declined); exiting 75 for the supervisor to reap - PH-1
09-24 12:56:01.457 16893 18709 E MobileGL: [12:56:01] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #4 pid=16893 reaped exit=75 (latched fault) sessionsFaulted=1
09-24 12:56:05.455 16893 16893 I MobileGL: [12:56:05] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac2d290 attached at 854x480 (generation 3)
09-24 12:56:05.455 16893 16893 I MobileGLDisplay: surfaceCreated: server window 854x480 attached
09-24 12:56:05.455 16893 16893 I MobileGLDisplay: surfaceChanged: server window 854x480 attached
09-24 12:56:05.686 16893 18709 E MobileGL: [12:56:05] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #5 started on a thread (pid=16893)
09-24 12:56:05.925 16893 16893 I MobileGLDisplay: geometry request 640x480 (setFixedSize, aspect-fit)
09-24 12:56:05.934 16893 16893 I MobileGLDisplay: surfaceChanged: server window 640x480 attached
09-24 12:56:05.944 16893 19187 I MobileGL: [12:56:05] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac2d290 generation 3)
09-24 12:56:06.019 16893 16893 I MobileGLDisplay: geometry request 640x480 (setFixedSize, aspect-fit)
09-24 12:56:06.028 16893 19187 I MobileGL: [12:56:06] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 6, window 0xb40000789ac2d290 generation 3)
09-24 12:56:16.959 16893 18709 E MobileGL: [12:56:16] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #5 pid=16893 reaped exit=0 sessionsFaulted=1
[00:56:15] done 4
@@ -0,0 +1,3 @@
Starting: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGL MobileGLDisplay (MG_Remote server: ... listening on ... in-process display server, display installed)
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_SURFACE=server MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613 (trace_replay --window-surface)
@@ -0,0 +1,21 @@
[00:56:41] before: :mglwin pid=17622
17622 1666 top.mobilegl.plugin.p7w1.trace:mglwin top.mobilegl.plugin.p7w1.trace:mglwin
Starting service: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLServerService (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGLServer
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613
[00:56:42] supervisor READY
[00:56:43] after: :mglwin pid= (was 17622)
19605 1666 top.mobilegl.plugin.p7w1.trace:mglsrv top.mobilegl.plugin.p7w1.trace:mglsrv
19649 19605 libMobileGLServer.so libMobileGLServer.so tcp://127.0.0.1:40613 --serve
09-24 12:56:45.241 19605 19605 I MobileGLServer: removing the on-screen display server's task (P12 D8: one server at a time)
09-24 12:56:45.245 19605 19605 I MobileGLServer: stopping the on-screen display server top.mobilegl.plugin.p7w1.trace:mglwin pid=17622 (P12 D8: one server at a time)
09-24 12:56:45.297 19605 19605 I MobileGLServer: on-screen display server top.mobilegl.plugin.p7w1.trace:mglwin pid=17622 is gone
09-24 12:56:45.376 19649 19649 E MobileGL: [12:56:45] [Android libMobileGLServ/ERROR]: MG_Remote server: pid=19649 listening on tcp://127.0.0.1:40613
09-24 12:56:45.376 19649 19649 E MobileGL: [12:56:45] [Android libMobileGLServ/ERROR]: MG_Remote server: pre-auth deadline=2000 ms, at most 8 pending, backoff after 5 failures from 1000 ms (0 = off)
[00:56:44] === 5: offscreen replay, no knob
[00:56:56] offscreen rc=0
rc=0
result.json: {'passed': True, 'statusCode': 0, 'ssim': 1.0, 'message': 'retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png'}
2 [12:56:47] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=pbuffer 640x480
1 [00:56:44] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=19676 dial=connect
[00:56:56] done 5
@@ -0,0 +1,32 @@
{
"passed": true,
"statusCode": 0,
"message": "retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"tracePath": "/home/swung/w7/logs/p12/device/5-offscreen-service/offscreen/input/openra.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"actualPath": "/home/swung/w7/logs/p12/device/5-offscreen-service/offscreen/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/5-offscreen-service/offscreen/output/OpenRA-diff.png",
"backend": "DirectGLES",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 31249,
"width": 640,
"height": 480,
"cropX": 1,
"cropY": 1,
"cropWidth": 638,
"cropHeight": 478,
"ssim": 1.000000000,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": true,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": 0
}
@@ -0,0 +1,2 @@
19605 1666 top.mobilegl.plugin.p7w1.trace:mglsrv top.mobilegl.plugin.p7w1.trace:mglsrv
19649 19605 libMobileGLServer.so libMobileGLServer.so tcp://127.0.0.1:40613 --serve
@@ -0,0 +1,3 @@
Starting service: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLServerService (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGLServer
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613
@@ -0,0 +1,25 @@
[00:56:56] === 6: MOBILEGL_IPC_SURFACE=server --window-surface against the offscreen service
[00:56:57] refused client rc=5
rc=5
result.json: {'passed': False, 'statusCode': 5, 'ssim': -1.0, 'message': 'retrace failed with status 1', 'matchedGoldenPath': ''}
1 [12:57:00] [Android mgl-srv-apply/ERROR]: MG_Remote server: Refuse ServerOwned: this server owns no display - a client (MOBILEGL_IPC_SURFACE=server) asked for a 640x480 window surface on the server's own window, and this process is an offscreen server. Start the on-screen display server, or run the
1 [00:56:57] [Linux mobilegl_trace_/ERROR]: MG_Remote client: Refuse ServerOwned (NoServerDisplay) - MOBILEGL_IPC_SURFACE=server asked the server to create this 640x480 window surface on its own window, and the server owns no display: it is an offscreen server. eglCreateWindowSurface fails with EGL_BA
1 [00:56:56] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=19702 dial=connect
1 [00:56:57] [Linux mobilegl_trace_/ERROR]: MG_Remote client: Refuse ServerOwned (NoServerDisplay) - MOBILEGL_IPC_SURFACE=server asked the server to create this 640x480 window surface on its own window, and the server owns no display: it is an offscreen server. eglCreateWindowSurface fails with EGL_BA
1 [12:57:00] [Android mgl-srv-apply/ERROR]: MG_Remote server: Refuse ServerOwned: this server owns no display - a client (MOBILEGL_IPC_SURFACE=server) asked for a 640x480 window surface on the server's own window, and this process is an offscreen server. Start the on-screen display server, or run the
[00:56:57] === 6: the next offscreen session on the same service
[00:57:09] next offscreen rc=0
rc=0
result.json: {'passed': True, 'statusCode': 0, 'ssim': 1.0, 'message': 'retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png'}
2 [12:57:00] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=pbuffer 640x480
1 [00:56:57] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=19708 dial=connect
19605 1666 top.mobilegl.plugin.p7w1.trace:mglsrv top.mobilegl.plugin.p7w1.trace:mglsrv
19649 19605 libMobileGLServer.so libMobileGLServer.so tcp://127.0.0.1:40613 --serve
19708 19649 [libMobileGLServ] [libMobileGLServ]
09-24 12:56:59.590 19649 19649 E MobileGL: [12:56:59] [Android libMobileGLServ/ERROR]: MG_Remote server: session pid=19676 reaped exit=0 sessionsFaulted=0
09-24 12:57:00.090 19702 19704 E MobileGL: [12:57:00] [Android mgl-srv-apply/ERROR]: MG_Remote server: Refuse ServerOwned: this server owns no display - a client (MOBILEGL_IPC_SURFACE=server) asked for a 640x480 window surface on the server's own window, and this process is an offscreen server. Star
09-24 12:57:00.188 19649 19649 E MobileGL: [12:57:00] [Android libMobileGLServ/ERROR]: MG_Remote server: session pid=19702 reaped exit=0 sessionsFaulted=0
09-24 12:57:00.454 19708 19710 I MobileGL: [12:57:00] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=pbuffer 640x480
09-24 12:57:00.577 19708 19710 I MobileGL: [12:57:00] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=pbuffer 640x480
09-24 12:57:12.288 19649 19649 E MobileGL: [12:57:12] [Android libMobileGLServ/ERROR]: MG_Remote server: session pid=19708 reaped exit=0 sessionsFaulted=0
[00:57:09] done 6
@@ -0,0 +1,32 @@
{
"passed": true,
"statusCode": 0,
"message": "retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"tracePath": "/home/swung/w7/logs/p12/device/6-negative-serverowned-vs-offscreen/next/input/openra.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"actualPath": "/home/swung/w7/logs/p12/device/6-negative-serverowned-vs-offscreen/next/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/6-negative-serverowned-vs-offscreen/next/output/OpenRA-diff.png",
"backend": "DirectGLES",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 31249,
"width": 640,
"height": 480,
"cropX": 1,
"cropY": 1,
"cropWidth": 638,
"cropHeight": 478,
"ssim": 1.000000000,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": true,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": 0
}
@@ -0,0 +1,3 @@
19605 1666 top.mobilegl.plugin.p7w1.trace:mglsrv top.mobilegl.plugin.p7w1.trace:mglsrv
19649 19605 libMobileGLServer.so libMobileGLServer.so tcp://127.0.0.1:40613 --serve
19708 19649 [libMobileGLServ] [libMobileGLServ]
@@ -0,0 +1,32 @@
{
"passed": false,
"statusCode": 5,
"message": "retrace failed with status 1",
"tracePath": "/home/swung/w7/logs/p12/device/6-negative-serverowned-vs-offscreen/refused/input/openra.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-29b7b284/tools/trace_replay/fixtures/openra.0000031249.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "",
"actualPath": "/home/swung/w7/logs/p12/device/6-negative-serverowned-vs-offscreen/refused/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/6-negative-serverowned-vs-offscreen/refused/output/OpenRA-diff.png",
"backend": "DirectGLES",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 31249,
"width": 640,
"height": 480,
"cropX": 1,
"cropY": 1,
"cropWidth": 638,
"cropHeight": 478,
"ssim": -1.000000000,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": false,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": -1
}
@@ -0,0 +1,38 @@
[00:57:09] === 7a: a live offscreen session, then the display Activity
[00:57:10] offscreen session live
19605 1666 top.mobilegl.plugin.p7w1.trace:mglsrv top.mobilegl.plugin.p7w1.trace:mglsrv
19649 19605 libMobileGLServer.so libMobileGLServer.so tcp://127.0.0.1:40613 --serve
19773 19649 libMobileGLServer.so libMobileGLServer.so tcp://127.0.0.1:40613 --serve
[00:57:11] supervisor pid=19649 session child pid=19773
Starting: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGL MobileGLDisplay (MG_Remote server: ... listening on ... in-process display server, display installed)
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_SURFACE=server MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613 (trace_replay --window-surface)
/home/swung/w7/notes/p12/android/dev.sh: line 60: 4060364 Aborted env -u DISPLAY -u WAYLAND_DISPLAY -u MOBILEGL_IPC_SURFACE MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_CONTROL="$ENDPOINT" MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_TOKEN="$TOKEN" MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_LOG_FORWARD=1 MOBILEGL_LOG_FILE_PATH="$dir/output/mobilegl.log" "$@" timeout 900 "$HOST/mobilegl_trace_replay" --trace "$dir/input/$trace" --golden "$FIX/$golden" --diff "$dir/output/$case-diff.png" --output "$dir/output" --backend "$backend" --mobilegl-library "$HOST/libMobileGL.so" --target-call "$target" --width "$w" --height "$h" --ssim-threshold "$ssim" --crop-x "$cx" --crop-y "$cy" --crop-width "$cw" --crop-height "$ch" "$flag" > "$dir/replay.log" 2>&1
[00:57:12] display server READY
[00:57:13] supervisor 19649 alive? no child 19773 alive? no
18033 1666 top.mobilegl.plugin.p7w1.trace:mglwin top.mobilegl.plugin.p7w1.trace:mglwin
19605 1666 top.mobilegl.plugin.p7w1.trace:mglsrv top.mobilegl.plugin.p7w1.trace:mglsrv
[00:57:13] the offscreen session's client rc=134 (its server went away)
1 [00:57:12] [Linux mobilegl_trace_/ERROR]: MGPipe: DEVICE LOST - the barrier woke on a peer that had hung up. The server process is gone; every verb from here is DECLINED and glGetGraphicsResetStatus reports GL_UNKNOWN_CONTEXT_RESET. This is
09-24 12:57:14.098 19773 19782 I MobileGL: [12:57:14] [Android mgl-srv-apply/INFO]: [driver-bug] layered blit destination probe: a blit asking for destination layer 1 landed on layer 0 - THE DESTINATION LAYER IS IGNORED
09-24 12:57:15.200 18033 18033 I MobileGLDisplay: stopped MobileGLServerService (the offscreen supervisor): one server at a time (P12 D8)
09-24 12:57:15.204 18033 18033 I MobileGL: [12:57:15] [Android w1.trace:mglwin/INFO]: MG_Remote server: this process owns a display (ServerDisplay installed); a ServerOwned window surface is served on its window
09-24 12:57:15.204 18033 18033 I MobileGLDisplay: starting the in-process display server on tcp://127.0.0.1:40613 (pid=18033, backend pinned by the first session)
09-24 12:57:15.209 19605 19651 I MobileGLServer: supervisor output closed: the service is stopping
09-24 12:57:15.230 18033 18033 I MobileGL: [12:57:15] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac37380 attached at 1280x2620 (generation 1)
09-24 12:57:15.230 18033 18033 I MobileGLDisplay: surfaceCreated: server window 1280x2620 attached
09-24 12:57:15.230 18033 18033 I MobileGL: [12:57:15] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac37380 is now 1280x2620
09-24 12:57:15.230 18033 18033 I MobileGLDisplay: surfaceChanged: server window 1280x2620 attached
09-24 12:57:15.454 18033 19848 E MobileGL: [12:57:15] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=18033 listening on tcp://127.0.0.1:40613 (in-process display server, display installed)
[00:57:14] === 7b: the service again - :mglwin must go
[00:57:14] :mglwin pid=18033
[00:57:15] supervisor READY
[00:57:16] :mglwin pid now= (was 18033); /proc/18033 exists? no
19605 1666 top.mobilegl.plugin.p7w1.trace:mglsrv top.mobilegl.plugin.p7w1.trace:mglsrv
19914 19605 libMobileGLServer.so libMobileGLServer.so tcp://127.0.0.1:40613 --serve
09-24 12:57:17.407 19605 19605 I MobileGLServer: removing the on-screen display server's task (P12 D8: one server at a time)
09-24 12:57:17.411 19605 19605 I MobileGLServer: stopping the on-screen display server top.mobilegl.plugin.p7w1.trace:mglwin pid=18033 (P12 D8: one server at a time)
09-24 12:57:17.463 19605 19605 I MobileGLServer: on-screen display server top.mobilegl.plugin.p7w1.trace:mglwin pid=18033 is gone
09-24 12:57:17.534 19914 19914 E MobileGL: [12:57:17] [Android libMobileGLServ/ERROR]: MG_Remote server: pid=19914 listening on tcp://127.0.0.1:40613
09-24 12:57:17.534 19914 19914 E MobileGL: [12:57:17] [Android libMobileGLServ/ERROR]: MG_Remote server: pre-auth deadline=2000 ms, at most 8 pending, backoff after 5 failures from 1000 ms (0 = off)
[00:57:16] done 7
@@ -0,0 +1,2 @@
18033 1666 top.mobilegl.plugin.p7w1.trace:mglwin top.mobilegl.plugin.p7w1.trace:mglwin
19605 1666 top.mobilegl.plugin.p7w1.trace:mglsrv top.mobilegl.plugin.p7w1.trace:mglsrv
@@ -0,0 +1,2 @@
19605 1666 top.mobilegl.plugin.p7w1.trace:mglsrv top.mobilegl.plugin.p7w1.trace:mglsrv
19914 19605 libMobileGLServer.so libMobileGLServer.so tcp://127.0.0.1:40613 --serve
@@ -0,0 +1,3 @@
19605 1666 top.mobilegl.plugin.p7w1.trace:mglsrv top.mobilegl.plugin.p7w1.trace:mglsrv
19649 19605 libMobileGLServer.so libMobileGLServer.so tcp://127.0.0.1:40613 --serve
19773 19649 libMobileGLServer.so libMobileGLServer.so tcp://127.0.0.1:40613 --serve
@@ -0,0 +1,3 @@
Starting: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGL MobileGLDisplay (MG_Remote server: ... listening on ... in-process display server, display installed)
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_SURFACE=server MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613 (trace_replay --window-surface)
@@ -0,0 +1,3 @@
Starting service: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLServerService (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGLServer
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613
@@ -0,0 +1,6 @@
processes :
forwards : ;
doze wl : user,top.mobilegl.plugin.p7w1.trace,10318
stay_on : 15
focus : mCurrentFocus=Window{48ecc69 u0 com.miui.home/com.miui.home.launcher.Launcher}
installed : versionName=26.09.29b7b28-trace lastUpdateTime=2026-09-24 12:55:19
Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

@@ -0,0 +1,115 @@
[00:25:58] check DESKTOP-OP19A6G: stamp p12w1-984db455 backend DirectGLES case OpenRA
[00:25:58] found:
40613
Starting: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGL MobileGLDisplay (MG_Remote server: ... listening on ... in-process display server, display installed)
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_SURFACE=server MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613 (trace_replay --window-surface)
[00:26:00] READY
[00:26:00] :mglwin pid=19108
mCurrentFocus=Window{d31f83b u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
mFocusedApp=ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655}
[00:26:00] replay OpenRA DirectGLES --window-surface MOBILEGL_IPC_SURFACE=server
[00:26:13] replay rc=0
rc=0
result.json: {'passed': True, 'statusCode': 0, 'ssim': 1.0, 'message': 'retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-984db455/tools/trace_replay/fixtures/openra.0000031249.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-984db455/tools/trace_replay/fixtures/openra.0000031249.png'}
2 [00:26:01] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 640x480 owner=server (MOBILEGL_IPC_SURFACE=server, 640x480 requested)
1 [12:26:04] [Android mgl-srv-geometr/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 6, window 0xb40000789ac38060 generation 1)
1 [12:26:04] [Android mgl-srv-geometr/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac38060 generation 1)
1 [00:26:01] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=19108 dial=connect
<stdin>:15: DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
replay ran 11.39s; 12 screencaps
0 t=+ -0.07s..+ 0.19s during=False nonblack=0.018 mean=1.4
1 t=+ 0.90s..+ 1.21s during=True nonblack=0.000 mean=0.0
2 t=+ 1.91s..+ 2.25s during=True nonblack=0.090 mean=5.4
3 t=+ 2.95s..+ 3.27s during=True nonblack=0.090 mean=5.4
4 t=+ 3.97s..+ 4.30s during=True nonblack=0.090 mean=5.4
5 t=+ 5.00s..+ 5.35s during=True nonblack=0.090 mean=5.4
6 t=+ 6.05s..+ 6.38s during=True nonblack=0.090 mean=5.4
7 t=+ 7.09s..+ 7.41s during=True nonblack=0.090 mean=5.4
8 t=+ 8.11s..+ 8.40s during=True nonblack=0.090 mean=5.4
9 t=+ 9.11s..+ 9.44s during=True nonblack=0.090 mean=5.4
10 t=+ 10.14s..+ 10.43s during=True nonblack=0.090 mean=5.4
11 t=+ 11.13s..+ 11.80s during=False nonblack=0.340 mean=32.4
BEST during-replay screencap: 02.png at +1.91s nonblack=0.090 mean=5.4 -> /home/swung/w7/logs/p12/device/DESKTOP-OP19A6G/replay/evidence-during-replay.png
[00:26:14] :mglwin pid after: 19108
09-24 12:26:03.573 2903 2903 I adbd : in ShellService: am start -n top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity --es listen tcp://127.0.0.1:40613 --es token p7w1b-lan-token-20260922 --es env ''
09-24 12:26:03.614 3149 4298 I CamOpt_Service: notifyActivityStart: intent = Intent { flg=0x10000000 xflg=0x4 cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
09-24 12:26:03.619 3149 6759 D WindowManager: Collecting in transition 875: ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t-1} init visibleRequested:false dc:null
09-24 12:26:03.624 3149 6759 D As.MonitorAppForegroundStateHelper: onTaskMovedToFront: mTopActivityPackageName: top.mobilegl.plugin.p7w1.trace mTopActivityClassName: top.mobilegl.plugin.MobileGLDisplayActivity mPreTopActivityPackageName: com.miui.home mPreTo
09-24 12:26:03.624 3149 6759 D As.ActivityMmReduceLoadHelper: onTaskMovedToFront: mTopActivityPackageName: top.mobilegl.plugin.p7w1.trace mTopActivityClassName: top.mobilegl.plugin.MobileGLDisplayActivity
09-24 12:26:03.625 3149 6759 I WindowManager: Try to add startingWindow type = STARTING_WINDOW_TYPE_SPLASH_SCREEN this = ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655} mOccludesParent = true preAl
09-24 12:26:03.626 3149 6759 D WindowManager: Collecting in transition 875: ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655} init visibleRequested:false dc:Display{#0 state=ON size=1280x2772 ROTATIO
09-24 12:26:03.627 3149 6759 I ActivityTaskManager: START u0 {flg=0x10000000 xflg=0x4 cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras)} with LAUNCH_SINGLE_TOP from uid 2000 from pid 14658 callingPackage com.android.
09-24 12:26:03.627 3149 6759 I AppStartScenario: notifyScenarioChanged: active=true param=Bundle[{uid=10318, name=top.mobilegl.plugin.MobileGLDisplayActivity, type=2, preStartProc=false, state=1, processName=top.mobilegl.plugin.p7w1.trace, packageName=top.mo
09-24 12:26:03.628 5038 5293 I SoScStageCoordinator: Transition requested:TransitionRequestInfo { type = OPEN, triggerTask = TaskInfo{userId=0 taskId=655 effectiveUid=10318 displayId=0 isRunning=true baseIntent=Intent { flg=0x10000000 cmp=top.mobilegl.plugin
09-24 12:26:03.628 3149 5465 D WindowManager: ChangeInfo{e72dc38 container=ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655} flags=0x0}
09-24 12:26:03.631 5038 5038 D KeyguardEditorHelper: onTopActivityMayChanged, topActivity=ComponentInfo{top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}; mState=IDEL
09-24 12:26:03.632 3149 5465 D WindowManager: Collecting in transition 875: ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655} init visibleRequested:false dc:Display{#0 state=ON size=1280x2772 ROTATIO
09-24 12:26:03.632 3149 5465 D WindowManager: ChangeInfo{e72dc38 container=ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655} flags=0x0}
09-24 12:26:03.633 3149 5465 D WindowManager: isSyncFinished true. ar: ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655}
09-24 12:26:03.634 3149 5465 D WindowManager: isSyncFinished true. ar: ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655}
09-24 12:26:03.634 3149 5465 D WindowManager: ChangeInfo{e72dc38 container=ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655} flags=0x0}
09-24 12:26:03.635 3149 3396 I AppStartScenario: notifyScenarioChanged: active=true param=Bundle[{hostingRecordName={top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}, hostingRecordType=next-top-activity, uid=10318, type=1, state=2,
09-24 12:26:03.636 5038 5293 D MiuiDecorationController: relayout::taskId=655, visible=true, bounds=Rect(0, 0 - 1280, 2772), focused=false, oldImmersive=false, newImmersive=false, windowMode=1, activityType=1, displayId=0, baseActivity=ComponentInfo{top.mobi
09-24 12:26:03.638 4384 5363 D WindowTransitionCompat: printLeash::taskInfo = TaskInfo{userId=0 taskId=655 effectiveUid=10318 displayId=0 isRunning=true baseIntent=Intent { flg=0x10000000 cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDispla
09-24 12:26:03.638 4384 5956 W RecentsModel: getRunningTask taskInfo=TaskInfo{userId=0 taskId=655 effectiveUid=10318 displayId=0 isRunning=true baseIntent=Intent { flg=0x10000000 cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivit
09-24 12:26:03.638 4384 5363 D TransitionUtil: get key :ComponentInfo{top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}#655
09-24 12:26:03.639 3149 3421 I AppStartScenario: notifyScenarioChanged: active=true param=Bundle[{hostingRecordName={top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}, hostingRecordType=next-top-activity, pid=19108, uid=10318, type=
09-24 12:26:03.639 4384 5956 E ActivityManagerWrapper: mainTaskId=655 userId=0 windowMode=1 isExcludedFromRecents=false baseIntent=Intent { act=null flag=268435456 cmp=ComponentInfo{top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayA
09-24 12:26:03.640 3149 3421 I ActivityManager: Start proc 19108:top.mobilegl.plugin.p7w1.trace:mglwin/u0a318 for next-top-activity {top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity} caller=com.android.shell
09-24 12:26:03.641 4384 5956 W RecentsModel: getRunningTask taskInfo=TaskInfo{userId=0 taskId=655 effectiveUid=10318 displayId=0 isRunning=true baseIntent=Intent { flg=0x10000000 cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivit
09-24 12:26:03.642 4384 5956 E ActivityManagerWrapper: mainTaskId=655 userId=0 windowMode=1 isExcludedFromRecents=false baseIntent=Intent { act=null flag=268435456 cmp=ComponentInfo{top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayA
09-24 12:26:03.642 1816 1891 I ANDR-PWR-OPT: GAMEPOWEROPT: sendEvents() 231: Start hint for app top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity/26091169, hintID : 4099, hintID hex : 1003 value: -1
09-24 12:26:03.642 4384 5956 D RecentsTaskLoader: reloadTasksData [TaskKey{id=655, stackId=0, baseIntent=Intent { flg=0x10000000 cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity }, userId=0, lastActiveTime=17217161, windowingMod
09-24 12:26:03.642 1816 1891 I ANDR-PWR-OPT: GAMEPOWEROPT: sendEvents() 231: Start hint for app top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity/26091169, hintID : 4099, hintID hex : 1003 value: -1
09-24 12:26:03.644 4384 5956 D RecentsTaskLoader: reloadTasksData [TaskKey{id=655, stackId=0, baseIntent=Intent { flg=0x10000000 cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity }, userId=0, lastActiveTime=17217161, windowingMod
09-24 12:26:03.654 3149 5757 I WindowManager: Allow fixed rotation for not collecting:ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655}
09-24 12:26:03.656 3149 12140 I WindowManager: Allow fixed rotation for not collecting:ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655}
09-24 12:26:03.681 5038 5038 D DynamicIslandController: onTopActivityChanged: ComponentInfo{top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
09-24 12:26:03.682 5038 5038 D DynamicIslandWindowViewController: onTopActivityChange: topActivity ComponentInfo{top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}, inSmallWindow false, isSupportPip false, isFocus false fullScreenPkg
09-24 12:26:03.688 3149 12140 I AppStartScenario: notifyScenarioChanged: active=true param=Bundle[{applicationThread=android.os.BinderProxy@287c674, hostingRecordName={top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}, hostingRecordT
09-24 12:26:03.692 26308 26355 D VA_ActivityUtils: getTopActivity packageName:ComponentInfo{top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
09-24 12:26:03.692 26308 26355 D VA_AppStateWatcher: currentPkgName:top.mobilegl.plugin.p7w1.trace, className:top.mobilegl.plugin.MobileGLDisplayActivity, lastPkgName:com.miui.home
09-24 12:26:03.720 7308 7976 D MyLog : -->log(0): [Tid:308] GamePopupListeneronForegroundAppEnter: pkg=top.mobilegl.plugin.p7w1.trace cls=top.mobilegl.plugin.MobileGLDisplayActivity
09-24 12:26:03.720 7308 7976 D MyLog : -->log(0): [Tid:308] GamePopupJudgefindMatchedPlans: matched 0 plans for pkg=top.mobilegl.plugin.p7w1.trace, cls=top.mobilegl.plugin.MobileGLDisplayActivity
09-24 12:26:03.720 7308 7976 D MyLog : -->log(0): [Tid:308] GamePopupListeneronForegroundAppEnter: no matching plans found, pkg=top.mobilegl.plugin.p7w1.trace, cls=top.mobilegl.plugin.MobileGLDisplayActivity, totalPlans=0
09-24 12:26:03.726 3149 5435 I WindowManager: Allow fixed rotation for not collecting:ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655}
09-24 12:26:03.726 3149 5435 I WindowManager: Allow fixed rotation for not collecting:ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655}
09-24 12:26:03.727 5038 5293 D MiuiDecorationController: relayout::taskId=655, visible=true, bounds=Rect(0, 0 - 1280, 2772), focused=false, oldImmersive=false, newImmersive=false, windowMode=1, activityType=1, displayId=0, baseActivity=ComponentInfo{top.mobi
09-24 12:26:03.730 3149 4297 I CameraActivitySceneMode: decideSceneMode: ActivityStateChange activityName = top.mobilegl.plugin.MobileGLDisplayActivity, displayId = 0, state = 2
09-24 12:26:03.733 4945 5545 D NetworkMetricsController: processUidChangeEvent :activity is:ComponentInfo{top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
09-24 12:26:03.735 4384 5956 W RecentsModel: getRunningTask taskInfo=TaskInfo{userId=0 taskId=655 effectiveUid=10318 displayId=0 isRunning=true baseIntent=Intent { flg=0x10000000 cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivit
09-24 12:26:03.736 4384 5956 E ActivityManagerWrapper: mainTaskId=655 userId=0 windowMode=1 isExcludedFromRecents=false baseIntent=Intent { act=null flag=268435456 cmp=ComponentInfo{top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayA
09-24 12:26:03.737 4384 5956 D RecentsTaskLoader: reloadTasksData [TaskKey{id=655, stackId=0, baseIntent=Intent { flg=0x10000000 cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity }, userId=0, lastActiveTime=17217262, windowingMod
09-24 12:26:03.751 19108 19108 I MobileGL: [12:26:03] [Android w1.trace:mglwin/INFO]: MG_Remote server: this process owns a display (ServerDisplay installed); a ServerOwned window surface is served on its window
09-24 12:26:03.751 19108 19108 I MobileGLDisplay: starting the in-process display server on tcp://127.0.0.1:40613 (pid=19108, backend pinned by the first session)
09-24 12:26:03.751 19108 14698 E MobileGL: [12:26:03] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=19108 listening on tcp://127.0.0.1:40613 (in-process display server, display installed)
09-24 12:26:03.751 19108 14698 E MobileGL: [12:26:03] [Android mgl-display-ser/ERROR]: MG_Remote server: pre-auth deadline=2000 ms, at most 8 pending, backoff after 5 failures from 1000 ms (0 = off)
09-24 12:26:03.752 19108 19108 D Activity: Activity = ActivityInfo{68651d2 top.mobilegl.plugin.MobileGLDisplayActivity}, Resume onConfigurationChanged = {1.0 ?mcc0mnc [zh_CN] ldltr sw394dp w394dp h790dp 520dpi nrml long hdr widecg port finger -keyb/v/h -nav/h
09-24 12:26:03.755 19108 14696 I ContentCatcher: SettingTrigger : register screen QA status observer top.mobilegl.plugin.MobileGLDisplayActivity
09-24 12:26:03.756 19108 14696 I ContentCatcher: SettingTrigger : register global collect status observer top.mobilegl.plugin.MobileGLDisplayActivity
09-24 12:26:03.757 19108 14696 I ContentCatcher: SettingTrigger : registerUIAgentListener top.mobilegl.plugin.MobileGLDisplayActivity, uid:10318
09-24 12:26:03.761 19108 19108 I ViewRootImpl: top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity use first frame acceleration
09-24 12:26:03.762 19108 19108 D InsetsController: top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity hide: statusBars navigationBars captionBar android.view.InsetsController@f698c64 android.view.InsetsController.applyAnimation:2241 and
09-24 12:26:03.766 4384 4384 D RecentsImpl: mActivityStateObserver top.mobilegl.plugin.MobileGLDisplayActivity
09-24 12:26:03.766 7264 7339 I ActivityObserverUtil: activityResumed ComponentInfo{top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
09-24 12:26:03.766 4384 4384 W RecentsImpl: updateGestureWindowVisibleImpl, className=top.mobilegl.plugin.MobileGLDisplayActivity
09-24 12:26:03.766 26308 14168 I VA_ActivityStateHelper: activityResumed componentName ComponentInfo{top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
09-24 12:26:03.766 7264 7339 I TopActivityMonitor: send TopActivityChangeEvent=TopActivityChangeEvent(prev=ComponentInfo{com.miui.home/com.miui.home.launcher.Launcher}, current=ComponentInfo{top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayA
09-24 12:26:03.766 7264 19875 I travelService_ActivityObserverUtils: activityResumed ComponentInfo{top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
09-24 12:26:03.766 19108 19108 D DecorViewImmersiveImpl: getWindowType: 1 title:top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity
09-24 12:26:03.767 3149 6759 D CoreBackPreview: Window{d31f83b u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@67e5504,
09-24 12:26:03.769 3149 5757 I AppCompatLetterboxPolicy: updateLetterboxSurfaceIfNeeded applySurfaceChanges Window{d31f83b u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
09-24 12:26:03.769 3149 5757 I Letterbox: applySurfaceChanges Window{d31f83b u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity} remove letterbox com.android.server.wm.Letterbox@7b933b3
09-24 12:26:03.769 3149 5757 I LetterboxSurface: applySurfaceChanges created ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655} top Surface(name=Letterbox - top#17195)/@0x70dbd70 false com.android.ser
09-24 12:26:03.769 3149 5757 D BarFollowAnimation: current status bar control target is : Window{d31f83b u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
09-24 12:26:03.770 3149 5757 D WindowManager: updateSystemBarAttributes displayId: 0 Window{d31f83b u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity} winAppearance=
09-24 12:26:03.770 3149 5757 D WindowManager: wms.Input focus has changed to Window{d31f83b u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity} display=0 updateInputWindows = true
09-24 12:26:03.770 5038 5293 D MiuiDecorationController: relayout::taskId=655, visible=true, bounds=Rect(0, 0 - 1280, 2772), focused=true, oldImmersive=false, newImmersive=true, windowMode=1, activityType=1, displayId=0, baseActivity=ComponentInfo{top.mobile
09-24 12:26:03.770 3149 5757 I WindowManager: Allow fixed rotation for not collecting:ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655}
09-24 12:26:03.770 5038 5293 D MiuiFreeformModeController: onFocusTaskChanged taskInfo: TaskInfo{userId=0 taskId=655 effectiveUid=10318 displayId=0 isRunning=true baseIntent=Intent { flg=0x10000000 cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.Mobil
09-24 12:26:03.774 3149 12140 I AppCompatLetterboxPolicy: updateLetterboxSurfaceIfNeeded applySurfaceChanges Window{d31f83b u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
09-24 12:26:03.774 3149 12140 I Letterbox: applySurfaceChanges Window{d31f83b u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity} remove letterbox com.android.server.wm.Letterbox@7b933b3
09-24 12:26:03.774 3149 12140 I LetterboxSurface: applySurfaceChanges created ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655} top Surface(name=Letterbox - top#17195)/@0x70dbd70 false com.android.ser
09-24 12:26:03.774 3149 12140 I WindowManager: Allow fixed rotation for not collecting:ActivityRecord{208930475 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t655}
[00:26:14] done DESKTOP-OP19A6G
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

@@ -0,0 +1,32 @@
{
"passed": true,
"statusCode": 0,
"message": "retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-984db455/tools/trace_replay/fixtures/openra.0000031249.png",
"tracePath": "/home/swung/w7/logs/p12/device/DESKTOP-OP19A6G/replay/input/openra.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-984db455/tools/trace_replay/fixtures/openra.0000031249.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "/home/swung/w7/p7w7-tree-984db455/tools/trace_replay/fixtures/openra.0000031249.png",
"actualPath": "/home/swung/w7/logs/p12/device/DESKTOP-OP19A6G/replay/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/DESKTOP-OP19A6G/replay/output/OpenRA-diff.png",
"backend": "DirectGLES",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 31249,
"width": 640,
"height": 480,
"cropX": 1,
"cropY": 1,
"cropWidth": 638,
"cropHeight": 478,
"ssim": 1.000000000,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": false,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": 0
}
@@ -0,0 +1,4 @@
40613
Starting: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGL MobileGLDisplay (MG_Remote server: ... listening on ... in-process display server, display installed)
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_SURFACE=server MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613 (trace_replay --window-surface)
@@ -0,0 +1,42 @@
[00:27:22] :mglwin pid now=19108 (check 1's session ran in pid=19108)
[00:27:22] === session 2 in the same process: OpenRA on-screen
[00:27:34] second session rc=6
rc=6
result.json: {'passed': False, 'statusCode': 6, 'ssim': 3.6422e-05, 'message': 'retrace completed; ssim=0.000036, ssimThreshold=0.990000, mismatchPixels=295296, matchedGoldenPath=/home/swung/w7/p7w7-tree-984db455/tools/trace_replay/fixtures/openra.0000031249.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-984db455/tools/trace_replay/fixtures/openra.0000031249.png'}
2 [00:27:22] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 640x480 owner=server (MOBILEGL_IPC_SURFACE=server, 640x480 requested)
1 [12:27:25] [Android mgl-srv-geometr/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 6, window 0xb40000789ac38060 generation 1)
1 [12:27:25] [Android mgl-srv-geometr/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac38060 generation 1)
1 [00:27:22] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=19108 dial=connect
<stdin>:15: DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
10 t=+ 10.67s..+ 11.02s during=True nonblack=0.000 mean=0.0
BEST during-replay screencap: 01.png at +1.33s nonblack=0.000 mean=0.0 -> /home/swung/w7/logs/p12/device/3-sequential-and-busy/second/evidence-during-replay.png
[00:27:34] Welcome server pids seen by the two clients (check 1, this one):
2 control=tcp data=stream server=127.0.0.1:40613 pid=19108
[00:27:34] === Busy: a long on-screen session (minecraft-1.21.4-startup), then a second authenticated client
[00:27:35] long session is on screen
/home/swung/w7/notes/p12/android/dev.sh: line 60: 3958019 Aborted env -u DISPLAY -u WAYLAND_DISPLAY -u MOBILEGL_IPC_SURFACE MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_CONTROL="$ENDPOINT" MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_TOKEN="$TOKEN" MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_LOG_FORWARD=1 MOBILEGL_LOG_FILE_PATH="$dir/output/mobilegl.log" "$@" timeout 900 "$HOST/mobilegl_trace_replay" --trace "$dir/input/$trace" --golden "$FIX/$golden" --diff "$dir/output/$case-diff.png" --output "$dir/output" --backend "$backend" --mobilegl-library "$HOST/libMobileGL.so" --target-call "$target" --width "$w" --height "$h" --ssim-threshold "$ssim" --crop-x "$cx" --crop-y "$cy" --crop-width "$cw" --crop-height "$ch" "$flag" > "$dir/replay.log" 2>&1
[00:27:37] WARNING: the long session already ended
/home/swung/w7/notes/p12/android/dev.sh: line 60: 3958047 Aborted env -u DISPLAY -u WAYLAND_DISPLAY -u MOBILEGL_IPC_SURFACE MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_CONTROL="$ENDPOINT" MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_TOKEN="$TOKEN" MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_LOG_FORWARD=1 MOBILEGL_LOG_FILE_PATH="$dir/output/mobilegl.log" "$@" timeout 900 "$HOST/mobilegl_trace_replay" --trace "$dir/input/$trace" --golden "$FIX/$golden" --diff "$dir/output/$case-diff.png" --output "$dir/output" --backend "$backend" --mobilegl-library "$HOST/libMobileGL.so" --target-call "$target" --width "$w" --height "$h" --ssim-threshold "$ssim" --crop-x "$cx" --crop-y "$cy" --crop-width "$cw" --crop-height "$ch" "$flag" > "$dir/replay.log" 2>&1
[00:27:37] concurrent client rc=134
[00:27:37] long session rc=134
rc=134
result.json: missing
1 [12:27:38] [Android mgl-srv-geometr/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 6, window 0xb40000789ac38060 generation 1)
1 [12:27:38] [Android mgl-srv-geometr/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 2, window 0xb40000789ac38060 generation 1)
1 [00:27:35] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 854x480 owner=server (MOBILEGL_IPC_SURFACE=server, 854x480 requested)
1 [00:27:34] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 854x480 owner=server (MOBILEGL_IPC_SURFACE=server, 854x480 requested)
1 [00:27:34] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=19108 dial=connect
[00:27:37] :mglwin pid after:
09-24 12:27:25.562 19108 14698 E MobileGL: [12:27:25] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #2 started on a thread (pid=19108)
09-24 12:27:25.721 19108 19108 I MobileGLDisplay: geometry request 640x480 (setFixedSize, aspect-fit)
09-24 12:27:25.724 19108 14970 I MobileGL: [12:27:25] [Android mgl-srv-geometr/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac38060 generation 1)
09-24 12:27:25.791 19108 19108 I MobileGLDisplay: geometry request 640x480 (setFixedSize, aspect-fit)
09-24 12:27:25.797 19108 14970 I MobileGL: [12:27:25] [Android mgl-srv-geometr/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 6, window 0xb40000789ac38060 generation 1)
09-24 12:27:37.094 19108 14698 E MobileGL: [12:27:37] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #2 pid=19108 reaped exit=0 sessionsFaulted=0
09-24 12:27:37.844 19108 14698 E MobileGL: [12:27:37] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #3 started on a thread (pid=19108)
09-24 12:27:37.980 19108 19108 I MobileGLDisplay: geometry request 854x480 (setFixedSize, aspect-fit)
09-24 12:27:37.991 19108 19108 I MobileGLDisplay: surfaceChanged: server window 854x480 attached
09-24 12:27:38.003 19108 15040 I MobileGL: [12:27:38] [Android mgl-srv-geometr/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 2, window 0xb40000789ac38060 generation 1)
09-24 12:27:38.068 19108 19108 I MobileGLDisplay: geometry request 854x480 (setFixedSize, aspect-fit)
09-24 12:27:38.076 19108 15040 I MobileGL: [12:27:38] [Android mgl-srv-geometr/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 6, window 0xb40000789ac38060 generation 1)
[00:27:37] done 3
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@@ -0,0 +1,32 @@
{
"passed": false,
"statusCode": 6,
"message": "retrace completed; ssim=0.000036, ssimThreshold=0.990000, mismatchPixels=295296, matchedGoldenPath=/home/swung/w7/p7w7-tree-984db455/tools/trace_replay/fixtures/openra.0000031249.png",
"tracePath": "/home/swung/w7/logs/p12/device/3-sequential-and-busy/second/input/openra.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-984db455/tools/trace_replay/fixtures/openra.0000031249.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "/home/swung/w7/p7w7-tree-984db455/tools/trace_replay/fixtures/openra.0000031249.png",
"actualPath": "/home/swung/w7/logs/p12/device/3-sequential-and-busy/second/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/3-sequential-and-busy/second/output/OpenRA-diff.png",
"backend": "DirectGLES",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 31249,
"width": 640,
"height": 480,
"cropX": 1,
"cropY": 1,
"cropWidth": 638,
"cropHeight": 478,
"ssim": 0.000036422,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": false,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": 295296
}
@@ -0,0 +1,94 @@
[00:44:44] check 1-onscreen-espryt: stamp p12w1-a4a940db backend DirectGLES case OpenRA
[00:44:44] found:
Starting: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGL MobileGLDisplay (MG_Remote server: ... listening on ... in-process display server, display installed)
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_SURFACE=server MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613 (trace_replay --window-surface)
[00:44:46] READY
[00:44:46] :mglwin pid=19603
mCurrentFocus=Window{5e9116f u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
mFocusedApp=ActivityRecord{218119468 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t657}
[00:44:46] replay OpenRA DirectGLES --window-surface MOBILEGL_IPC_SURFACE=server
[00:44:59] replay rc=0
rc=0
result.json: {'passed': True, 'statusCode': 0, 'ssim': 1.0, 'message': 'retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/openra.0000031249.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/openra.0000031249.png'}
2 [00:44:47] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 640x480 owner=server (MOBILEGL_IPC_SURFACE=server, 640x480 requested)
1 [12:44:50] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 6, window 0xb40000789ac37380 generation 1)
1 [12:44:50] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac37380 generation 1)
1 [00:44:46] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=19603 dial=connect
<stdin>:15: DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
replay ran 11.63s; 12 screencaps
0 t=+ -0.07s..+ 0.20s during=False nonblack=0.019 mean=1.7
1 t=+ 0.90s..+ 1.18s during=True nonblack=0.000 mean=0.0
2 t=+ 1.88s..+ 2.23s during=True nonblack=0.090 mean=5.4
3 t=+ 2.93s..+ 3.24s during=True nonblack=0.090 mean=5.4
4 t=+ 3.94s..+ 4.30s during=True nonblack=0.090 mean=5.4
5 t=+ 5.01s..+ 5.32s during=True nonblack=0.090 mean=5.4
6 t=+ 6.02s..+ 6.39s during=True nonblack=0.090 mean=5.4
7 t=+ 7.09s..+ 7.42s during=True nonblack=0.090 mean=5.4
8 t=+ 8.13s..+ 8.45s during=True nonblack=0.090 mean=5.4
9 t=+ 9.16s..+ 9.53s during=True nonblack=0.090 mean=5.4
10 t=+ 10.23s..+ 10.59s during=True nonblack=0.090 mean=5.4
11 t=+ 11.29s..+ 11.99s during=False nonblack=0.340 mean=32.4
BEST during-replay screencap: 02.png at +1.88s nonblack=0.090 mean=5.4 -> /home/swung/w7/logs/p12/device/1-onscreen-espryt/replay/evidence-during-replay.png
[00:44:59] :mglwin pid after: 19603
09-24 12:44:49.490 19603 19603 I MobileGL: [12:44:49] [Android w1.trace:mglwin/INFO]: MG_Remote server: this process owns a display (ServerDisplay installed); a ServerOwned window surface is served on its window
09-24 12:44:49.491 19603 19603 I MobileGLDisplay: starting the in-process display server on tcp://127.0.0.1:40613 (pid=19603, backend pinned by the first session)
09-24 12:44:49.491 19603 16847 E MobileGL: [12:44:49] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=19603 listening on tcp://127.0.0.1:40613 (in-process display server, display installed)
09-24 12:44:49.491 19603 16847 E MobileGL: [12:44:49] [Android mgl-display-ser/ERROR]: MG_Remote server: pre-auth deadline=2000 ms, at most 8 pending, backoff after 5 failures from 1000 ms (0 = off)
09-24 12:44:49.519 19603 19603 I MobileGL: [12:44:49] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac37380 attached at 1280x2620 (generation 1)
09-24 12:44:49.519 19603 19603 I MobileGLDisplay: surfaceCreated: server window 1280x2620 attached
09-24 12:44:49.519 19603 19603 I MobileGL: [12:44:49] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac37380 is now 1280x2620
09-24 12:44:49.519 19603 19603 I MobileGLDisplay: surfaceChanged: server window 1280x2620 attached
09-24 12:44:49.749 19603 16847 E MobileGL: [12:44:49] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #1 started on a thread (pid=19603)
09-24 12:44:49.750 19603 16867 I MobileGL: [12:44:49] [Android mgl-display-ser/INFO]: Config: Active backend type set to DirectGLES
09-24 12:44:49.750 19603 16867 E MobileGL: [12:44:49] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=19603 in-process display server pinned backend type 0 for the process lifetime (the first session's; MOBILEGL_BACKEND_TYPE unset)
09-24 12:44:49.751 19603 16867 I MobileGL: [12:44:49] [Android mgl-display-ser/INFO]: Loaded GL backend library: libEGL.so
09-24 12:44:49.751 19603 16867 F MobileGL: [12:44:49] [Android mgl-display-ser/FATAL]: Failed to load EGL function: eglSwapBuffersWithDamageEXT
09-24 12:44:49.757 19603 16867 E MobileGL: [12:44:49] [Android mgl-display-ser/ERROR]: Failed to load GLES function: glShaderStorageBlockBinding
09-24 12:44:49.773 19603 16867 I MobileGL: [12:44:49] [Android mgl-display-ser/INFO]: MG_Remote memory[accept/server]: peakRss=249241600 currentRss=249241600 roleMapped=58990592 allRolesMapped=58990592 (peakRss is the PROCESS's; under inproc both roles share it)
09-24 12:44:49.774 19603 16867 E MobileGL: [12:44:49] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=19603 transport=spawn role=server ready control=tcp data=stream
09-24 12:44:49.776 19603 16870 I MobileGL: [12:44:49] [Android mgl-srv-apply/INFO]: MG_Remote server: mgl-srv-apply started. MOBILEGL_IPC_SERVER_AFFINITY='auto' requested mask 0xc0, RESOLVED mask 0xc0 (0 = no affinity applied), spin 50 us
09-24 12:44:50.094 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: MG_Remote server: display geometry 640x480 requested (SurfaceHolder.setFixedSize)
09-24 12:44:50.094 19603 19603 I MobileGLDisplay: geometry request 640x480 (setFixedSize, aspect-fit)
09-24 12:44:50.096 19603 19603 I MobileGL: [12:44:50] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac37380 is now 640x480
09-24 12:44:50.096 19603 19603 I MobileGLDisplay: surfaceChanged: server window 640x480 attached
09-24 12:44:50.111 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac37380 generation 1)
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_VENDOR: Qualcomm
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_RENDERER: Adreno (TM) 830
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: Detected 125 OpenGL ES extensions:
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_EGL_image
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_EGL_image_external
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_EGL_sync
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_vertex_half_float
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_framebuffer_object
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_rgb8_rgba8
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_compressed_ETC1_RGB8_texture
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_AMD_compressed_ATC_texture
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_KHR_texture_compression_astc_sliced_3d
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_KHR_texture_compression_astc_ldr
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_KHR_texture_compression_astc_hdr
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_texture_compression_astc
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_EXT_texture_compression_s3tc
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_EXT_texture_compression_s3tc_srgb
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_EXT_texture_compression_rgtc
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_EXT_texture_compression_bptc
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_texture_npot
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_EXT_texture_filter_anisotropic
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_EXT_texture_format_BGRA8888
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_EXT_read_format_bgra
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_texture_3D
09-24 12:44:50.140 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_EXT_color_buffer_float
09-24 12:44:50.141 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_EXT_color_buffer_half_float
09-24 12:44:50.141 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_EXT_float_blend
09-24 12:44:50.141 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_QCOM_alpha_test
09-24 12:44:50.141 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_depth24
09-24 12:44:50.141 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_packed_depth_stencil
09-24 12:44:50.141 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_depth_texture
09-24 12:44:50.141 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_depth_texture_cube_map
09-24 12:44:50.141 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_EXT_sRGB
09-24 12:44:50.141 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_texture_float
09-24 12:44:50.141 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_texture_float_linear
09-24 12:44:50.141 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_texture_half_float
09-24 12:44:50.141 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_OES_texture_half_float_linear
09-24 12:44:50.141 19603 16870 I MobileGL: [12:44:50] [Android mgl-srv-apply/INFO]: GL_EXT_texture_type_2_10_10_10_REV
[00:45:00] done 1-onscreen-espryt
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

@@ -0,0 +1,32 @@
{
"passed": true,
"statusCode": 0,
"message": "retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/openra.0000031249.png",
"tracePath": "/home/swung/w7/logs/p12/device/1-onscreen-espryt/replay/input/openra.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/openra.0000031249.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/openra.0000031249.png",
"actualPath": "/home/swung/w7/logs/p12/device/1-onscreen-espryt/replay/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/1-onscreen-espryt/replay/output/OpenRA-diff.png",
"backend": "DirectGLES",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 31249,
"width": 640,
"height": 480,
"cropX": 1,
"cropY": 1,
"cropWidth": 638,
"cropHeight": 478,
"ssim": 1.000000000,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": false,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": 0
}
@@ -0,0 +1,3 @@
Starting: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGL MobileGLDisplay (MG_Remote server: ... listening on ... in-process display server, display installed)
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_SURFACE=server MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613 (trace_replay --window-surface)
@@ -0,0 +1,94 @@
[00:48:54] check 2-onscreen-magma: stamp p12w1-a4a940db backend DirectVulkan case OpenRA
[00:48:55] found: 19603 1666 top.mobilegl.plugin.p7w1.trace:mglwin top.mobilegl.plugin.p7w1.trace:mglwin;
Starting: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGL MobileGLDisplay (MG_Remote server: ... listening on ... in-process display server, display installed)
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_SURFACE=server MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613 (trace_replay --window-surface)
[00:48:56] READY
[00:48:56] :mglwin pid=20413
mCurrentFocus=Window{c7b1000 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity}
mFocusedApp=ActivityRecord{3013292 u0 top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity t658}
[00:48:57] replay OpenRA DirectVulkan --window-surface MOBILEGL_IPC_SURFACE=server
[00:49:09] replay rc=0
rc=0
result.json: {'passed': True, 'statusCode': 0, 'ssim': 1.0, 'message': 'retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/openra.0000031249.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/openra.0000031249.png'}
2 [00:48:57] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 640x480 owner=server (MOBILEGL_IPC_SURFACE=server, 640x480 requested)
1 [12:49:00] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 6, window 0xb40000789ac393b0 generation 1)
1 [12:49:00] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac393b0 generation 1)
1 [00:48:57] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=20413 dial=connect
<stdin>:15: DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
replay ran 11.60s; 12 screencaps
0 t=+ -0.07s..+ 0.19s during=False nonblack=0.018 mean=1.6
1 t=+ 0.89s..+ 1.20s during=True nonblack=0.000 mean=0.0
2 t=+ 1.90s..+ 2.22s during=True nonblack=0.090 mean=5.4
3 t=+ 2.92s..+ 3.23s during=True nonblack=0.090 mean=5.4
4 t=+ 3.93s..+ 4.24s during=True nonblack=0.090 mean=5.4
5 t=+ 4.94s..+ 5.27s during=True nonblack=0.090 mean=5.4
6 t=+ 5.98s..+ 6.29s during=True nonblack=0.090 mean=5.4
7 t=+ 7.00s..+ 7.34s during=True nonblack=0.090 mean=5.4
8 t=+ 8.04s..+ 8.36s during=True nonblack=0.090 mean=5.4
9 t=+ 9.06s..+ 9.40s during=True nonblack=0.090 mean=5.4
10 t=+ 10.10s..+ 10.43s during=True nonblack=0.090 mean=5.4
11 t=+ 11.14s..+ 11.84s during=False nonblack=0.340 mean=32.4
BEST during-replay screencap: 02.png at +1.90s nonblack=0.090 mean=5.4 -> /home/swung/w7/logs/p12/device/2-onscreen-magma/replay/evidence-during-replay.png
[00:49:10] :mglwin pid after: 20413
09-24 12:48:59.883 20413 20413 I MobileGL: [12:48:59] [Android w1.trace:mglwin/INFO]: MG_Remote server: this process owns a display (ServerDisplay installed); a ServerOwned window surface is served on its window
09-24 12:48:59.884 20413 20413 I MobileGLDisplay: starting the in-process display server on tcp://127.0.0.1:40613 (pid=20413, backend DirectVulkan)
09-24 12:48:59.884 20413 17575 E MobileGL: [12:48:59] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=20413 listening on tcp://127.0.0.1:40613 (in-process display server, display installed)
09-24 12:48:59.884 20413 17575 E MobileGL: [12:48:59] [Android mgl-display-ser/ERROR]: MG_Remote server: pre-auth deadline=2000 ms, at most 8 pending, backoff after 5 failures from 1000 ms (0 = off)
09-24 12:48:59.912 20413 20413 I MobileGL: [12:48:59] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac393b0 attached at 1280x2620 (generation 1)
09-24 12:48:59.912 20413 20413 I MobileGLDisplay: surfaceCreated: server window 1280x2620 attached
09-24 12:48:59.912 20413 20413 I MobileGL: [12:48:59] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac393b0 is now 1280x2620
09-24 12:48:59.912 20413 20413 I MobileGLDisplay: surfaceChanged: server window 1280x2620 attached
09-24 12:49:00.176 20413 17575 E MobileGL: [12:49:00] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #1 started on a thread (pid=20413)
09-24 12:49:00.176 20413 17597 I MobileGL: [12:49:00] [Android mgl-display-ser/INFO]: Config: Active backend type set to DirectVulkan
09-24 12:49:00.176 20413 17597 E MobileGL: [12:49:00] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=20413 in-process display server pinned backend type 1 for the process lifetime (the first session's; MOBILEGL_BACKEND_TYPE unset)
09-24 12:49:00.191 20413 17597 I MobileGL: [12:49:00] [Android mgl-display-ser/INFO]: MG_Remote memory[accept/server]: peakRss=247119872 currentRss=247119872 roleMapped=58990592 allRolesMapped=58990592 (peakRss is the PROCESS's; under inproc both roles share it)
09-24 12:49:00.191 20413 17597 E MobileGL: [12:49:00] [Android mgl-display-ser/ERROR]: MG_Remote server: pid=20413 transport=spawn role=server ready control=tcp data=stream
09-24 12:49:00.194 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: MG_Remote server: mgl-srv-apply started. MOBILEGL_IPC_SERVER_AFFINITY='auto' requested mask 0xc0, RESOLVED mask 0xc0 (0 = no affinity applied), spin 50 us
09-24 12:49:00.369 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: MG_Remote server: display geometry 640x480 requested (SurfaceHolder.setFixedSize)
09-24 12:49:00.369 20413 20413 I MobileGLDisplay: geometry request 640x480 (setFixedSize, aspect-fit)
09-24 12:49:00.374 20413 20413 I MobileGL: [12:49:00] [Android w1.trace:mglwin/INFO]: MG_Remote server: server window 0xb40000789ac393b0 is now 640x480
09-24 12:49:00.374 20413 20413 I MobileGLDisplay: surfaceChanged: server window 640x480 attached
09-24 12:49:00.374 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac393b0 generation 1)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: Got 14 Vulkan instance extensions:
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_surface (r.25)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_surface_protected_capabilities (r.1)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_android_surface (r.6)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_EXT_swapchain_colorspace (r.5)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_get_surface_capabilities2 (r.1)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_GOOGLE_surfaceless_query (r.2)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_EXT_surface_maintenance1 (r.1)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_EXT_debug_report (r.10)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_get_physical_device_properties2 (r.2)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_external_semaphore_capabilities (r.1)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_external_memory_capabilities (r.1)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_device_group_creation (r.1)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_EXT_debug_utils (r.2)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_external_fence_capabilities (r.1)
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: Validation layers not available.
09-24 12:49:00.430 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: Validation layers not requested.
09-24 12:49:00.431 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: Enabling 2 Vulkan instance extensions:
09-24 12:49:00.431 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_surface
09-24 12:49:00.431 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_android_surface
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: Found 1 physical device(s).
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: Adreno (TM) 830 (Vulkan 1.3.284, INTEGRATED_GPU)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: Got 165 Vulkan device extensions:
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_incremental_present (r.2)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_EXT_hdr_metadata (r.3)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_shared_presentable_image (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_GOOGLE_display_timing (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_EXT_image_compression_control (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_EXT_image_compression_control_swapchain (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_EXT_swapchain_maintenance1 (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_swapchain_mutable_format (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_EXT_depth_range_unrestricted (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_EXT_subgroup_size_control (r.2)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_ray_tracing_maintenance1 (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_external_memory (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_EXT_pipeline_creation_feedback (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_shader_float16_int8 (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_EXT_multisampled_render_to_single_sampled (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_get_memory_requirements2 (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_copy_commands2 (r.1)
09-24 12:49:00.438 20413 17599 I MobileGL: [12:49:00] [Android mgl-srv-apply/INFO]: VK_KHR_deferred_host_operations (r.4)
[00:49:10] done 2-onscreen-magma
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

@@ -0,0 +1,32 @@
{
"passed": true,
"statusCode": 0,
"message": "retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/openra.0000031249.png",
"tracePath": "/home/swung/w7/logs/p12/device/2-onscreen-magma/replay/input/openra.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/openra.0000031249.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/openra.0000031249.png",
"actualPath": "/home/swung/w7/logs/p12/device/2-onscreen-magma/replay/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/2-onscreen-magma/replay/output/OpenRA-diff.png",
"backend": "DirectVulkan",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 31249,
"width": 640,
"height": 480,
"cropX": 1,
"cropY": 1,
"cropWidth": 638,
"cropHeight": 478,
"ssim": 1.000000000,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": false,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": 0
}
@@ -0,0 +1,3 @@
Starting: Intent { cmp=top.mobilegl.plugin.p7w1.trace/top.mobilegl.plugin.MobileGLDisplayActivity (has extras) }
Read readiness: adb -s 2f7cbe2e logcat -s MobileGL MobileGLDisplay (MG_Remote server: ... listening on ... in-process display server, display installed)
Client: MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_SURFACE=server MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_CONTROL=tcp://<device-address>:40613 (trace_replay --window-surface)
@@ -0,0 +1,43 @@
[00:45:04] :mglwin pid now=19603 (check 1's session ran in pid=19603)
[00:45:04] === session 2 in the same process: OpenRA on-screen
[00:45:16] second session rc=0
rc=0
result.json: {'passed': True, 'statusCode': 0, 'ssim': 1.0, 'message': 'retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0, matchedGoldenPath=/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/openra.0000031249.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/openra.0000031249.png'}
2 [00:45:04] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 640x480 owner=server (MOBILEGL_IPC_SURFACE=server, 640x480 requested)
1 [12:45:07] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 6, window 0xb40000789ac37380 generation 1)
1 [12:45:07] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac37380 generation 1)
1 [00:45:04] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=19603 dial=connect
<stdin>:15: DeprecationWarning: Image.Image.getdata is deprecated and will be removed in Pillow 14 (2027-10-15). Use get_flattened_data instead.
9 t=+ 10.74s..+ 11.42s during=True nonblack=0.167 mean=14.0
BEST during-replay screencap: 01.png at +1.29s nonblack=0.340 mean=32.4 -> /home/swung/w7/logs/p12/device/3-sequential-and-busy/second/evidence-during-replay.png
[00:45:17] Welcome server pids seen by the two clients (check 1, this one):
2 control=tcp data=stream server=127.0.0.1:40613 pid=19603
[00:45:17] === Busy: a long on-screen session (minecraft-1.21.4-startup), then a second authenticated client
[00:45:17] long session is on screen
[00:45:19] long session still live - starting the second client
/home/swung/w7/notes/p12/android/dev.sh: line 60: 3968856 Aborted env -u DISPLAY -u WAYLAND_DISPLAY -u MOBILEGL_IPC_SURFACE MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_CONTROL="$ENDPOINT" MOBILEGL_IPC_DATA=stream MOBILEGL_IPC_TOKEN="$TOKEN" MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 MOBILEGL_IPC_LOG_FORWARD=1 MOBILEGL_LOG_FILE_PATH="$dir/output/mobilegl.log" "$@" timeout 900 "$HOST/mobilegl_trace_replay" --trace "$dir/input/$trace" --golden "$FIX/$golden" --diff "$dir/output/$case-diff.png" --output "$dir/output" --backend "$backend" --mobilegl-library "$HOST/libMobileGL.so" --target-call "$target" --width "$w" --height "$h" --ssim-threshold "$ssim" --crop-x "$cx" --crop-y "$cy" --crop-width "$cw" --crop-height "$ch" "$flag" > "$dir/replay.log" 2>&1
[00:45:20] concurrent client rc=134
1 [00:45:19] [Linux mobilegl_trace_/ERROR]: MGPipe: peer Refuse{Busy} one session is already active expected=0 actual=0
[00:45:25] long session rc=0
rc=0
result.json: {'passed': True, 'statusCode': 0, 'ssim': 0.999999511, 'message': 'retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=520, matchedGoldenPath=/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png', 'matchedGoldenPath': '/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png'}
2 [00:45:17] [Linux mobilegl_trace_/INFO]: MG_Remote client: surface=window 854x480 owner=server (MOBILEGL_IPC_SURFACE=server, 854x480 requested)
1 [12:45:20] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 6, window 0xb40000789ac37380 generation 1)
1 [12:45:20] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 2, window 0xb40000789ac37380 generation 1)
1 [00:45:17] [Linux mobilegl_trace_/INFO]: MG_Remote client: control=tcp data=stream server=127.0.0.1:40613 pid=19603 dial=connect
[00:45:25] :mglwin pid after: 19603
09-24 12:45:07.513 19603 16847 E MobileGL: [12:45:07] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #2 started on a thread (pid=19603)
09-24 12:45:07.676 19603 19603 I MobileGLDisplay: geometry request 640x480 (setFixedSize, aspect-fit)
09-24 12:45:07.679 19603 16987 I MobileGL: [12:45:07] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 2, window 0xb40000789ac37380 generation 1)
09-24 12:45:07.746 19603 19603 I MobileGLDisplay: geometry request 640x480 (setFixedSize, aspect-fit)
09-24 12:45:07.751 19603 16987 I MobileGL: [12:45:07] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 640x480 owner=server (ServerOwned seq 6, window 0xb40000789ac37380 generation 1)
09-24 12:45:19.303 19603 16847 E MobileGL: [12:45:19] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #2 pid=19603 reaped exit=0 sessionsFaulted=0
09-24 12:45:20.281 19603 16847 E MobileGL: [12:45:20] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #3 started on a thread (pid=19603)
09-24 12:45:20.472 19603 19603 I MobileGLDisplay: geometry request 854x480 (setFixedSize, aspect-fit)
09-24 12:45:20.493 19603 19603 I MobileGLDisplay: surfaceChanged: server window 854x480 attached
09-24 12:45:20.507 19603 17056 I MobileGL: [12:45:20] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 2, window 0xb40000789ac37380 generation 1)
09-24 12:45:20.569 19603 19603 I MobileGLDisplay: geometry request 854x480 (setFixedSize, aspect-fit)
09-24 12:45:20.579 19603 17056 I MobileGL: [12:45:20] [Android mgl-srv-apply/INFO]: MG_Remote server: surface=window 854x480 owner=server (ServerOwned seq 6, window 0xb40000789ac37380 generation 1)
09-24 12:45:23.062 19603 16847 E MobileGL: [12:45:23] [Android mgl-display-ser/ERROR]: MG_Remote server: Refuse{Busy} one session is already active
09-24 12:45:28.565 19603 16847 E MobileGL: [12:45:28] [Android mgl-display-ser/ERROR]: MG_Remote server: in-process session #3 pid=19603 reaped exit=0 sessionsFaulted=0
[00:45:25] done 3
@@ -0,0 +1,32 @@
{
"passed": true,
"statusCode": 0,
"message": "retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=520, matchedGoldenPath=/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png",
"tracePath": "/home/swung/w7/logs/p12/device/3-sequential-and-busy/long/input/trace.trace",
"goldenPath": "/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png",
"alternateGoldenPaths": [],
"matchedGoldenPath": "/home/swung/w7/p7w7-tree-a4a940db/tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png",
"actualPath": "/home/swung/w7/logs/p12/device/3-sequential-and-busy/long/output/actual.png",
"diffPath": "/home/swung/w7/logs/p12/device/3-sequential-and-busy/long/output/minecraft-1.21.4-startup-diff.png",
"backend": "DirectGLES",
"angleVariant": "",
"targetFrame": -1,
"targetCall": 92195,
"width": 854,
"height": 480,
"cropX": 0,
"cropY": 0,
"cropWidth": 0,
"cropHeight": 0,
"ssim": 0.999999511,
"ssimThreshold": 0.990000000,
"useAngle": false,
"usePbuffer": false,
"avoidAngleLlvmpipeSamplerMipmapMinFilter": false,
"avoidAngleLlvmpipeExplicitLodBias": false,
"fixIterationRPSubgroupScratch": false,
"deriveNumSubgroups": false,
"iterationRPFixBarrier": false,
"holdMs": 0,
"mismatchPixels": 520
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Some files were not shown because too many files have changed in this diff Show More