mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[Docs] (P11): ruling ID-P11-12 on pairing by PairBind nonce and revision 3 -> 4; B0 F2 corrected - the product TCP path already paired by identity, the defect was unix endpoints and the one-shot TCP server; the TCP fixture comment no longer names AcceptPair
This commit is contained in:
@@ -38,6 +38,6 @@
|
||||
## 顺带查出
|
||||
|
||||
- **F1 HyperOS 熄屏冻结整个 server uid**(`frozen uid = … reason=screen off`),FGS 进程、supervisor 与会话子进程同一 cgroup,在飞的会话 120 s 后 `Fatal{BarrierTimeout}`。FCL 的同机用法也会碰到。
|
||||
- **F2 `AcceptPair` 按到达顺序配对**(`SocketTransport.cpp:373-420`,TCP 与 unix 共用):`ServerControlActivity` 的就绪探测是一次空的 `connect()`+`close()`,2 s 内会与下一个真 client 的控制连接配成一对,会话读到探测的套接字后退出;两个 client 同时连也会交错。
|
||||
- **F2 `AcceptPair` 按到达顺序配对**(`SocketTransport.cpp:373-420`;产品的 TCP 路径本来就按身份配对——一条控制连接、数据连接按 nonce 绑定——受影响的是 unix 端点与非 `--serve` 的一次性 TCP server;**已修**,P11 PAIR,ID-P11-12):`ServerControlActivity` 的就绪探测是一次空的 `connect()`+`close()`,2 s 内会与下一个真 client 的控制连接配成一对,会话读到探测的套接字后退出;两个 client 同时连也会交错。
|
||||
- 构建:`-Pmobilegl.apkSuffix` 只改文件名;包名由 `-Pmobilegl.applicationIdSuffix` 决定。
|
||||
- 工具提交 `72926a88`(`p11/b0`):`tools/device_bench/disagg/fdrelay.c`,root 的字节 + `SCM_RIGHTS` 中继,B1 broker 的替身。
|
||||
|
||||
@@ -14,4 +14,5 @@
|
||||
| ID-P11-8 | 2026-09-29 | 本阶段查出、不在 P11 修的:Espryt 零散写入按并集框上传覆盖 GPU 纹素(dev 独立任务);Magma 单进程 rd12 耗尽 `vm.max_map_count`(dev 独立任务);client 与 server 共用日志前缀时截断 server 日志(小修);pull 构建没有门跑集成测试(需裁定);split 的线程落位(性能)。 | 按规矩不顺手修 dev 的缺陷;性能只记录。 | `DEBTS.md` |
|
||||
| ID-P11-9 | 2026-09-29 | **集成头 `82467823`**(dev 合并 + A-host + 计划文档)整套门:G1 对 P11 基线符号增 0 减 0、`.text` `0xa56413`;fatal census 79、refusal 词 4、link ratchet 171、spawn parity 0、协议修订 3、wire-declines 53/53;卫生 12/12;unit 2654;integration-split / spawn / tcp 392 / 309 / 321;integration-magma-split / spawn / tcp / full-split 214 / 193 / 177 / 613;integration-gpu monolith / inproc 2529 / 2529。verify 构建 unit / integration-verify / integration-verify-split 2654 / 1298 / 1232。主机 retrace 230 / 236(6 项仍是 iterationrp 的宿主 llvmpipe JIT 崩溃,monolith 同挂)。 | — | 全部 |
|
||||
| ID-P11-10 | 2026-09-29 | 推送前发现 origin 已前进到 `86dc38a0`(另一个会话把 Magma `eglSwapInterval` 的移植直接推到了本线)。它与已合并的 dev `c60639db` 在 9 个文件上逐字相同,另加 split 专属的 `ForgetRequestedSwapInterval`(`MOBILEGL_BUILD_DISAGGREGATED` 下;传输模式下 `~BackendObject_DirectVulkan` 调用它,结束的 server 会话不把交换间隔带给下一个,与 DirectGLES 同规则)。以合并吸收(`9176dcff`,净增 16 行),不改写 origin。 | origin 不能强推;两份实现只差这一处,取并集。 | `DirectVulkan.{h,cpp}`、`BackendObject_DirectVulkan.cpp` |
|
||||
| ID-P11-11 | 2026-09-29 | B0 的结论(`B0-CROSS-APP.md`):跨安全上下文连 server 的 unix 端点被 SELinux `connectto` 拒(shell 与另一个 app 都是),连上之后现有代码走共享段、7 个 fd 跨类别可用,数据面与协议不用改;B1 = 跨上下文的连接中介(导出的 bound Service 经 Binder 交出已连接的套接字)+ `fd:` 端点 + 按身份配对 + 防冻结 + 外部 client 的亲和 / 自旋策略 + 调用方认证。原生程序(Termux 一类)的引导方式交用户裁定。`AcceptPair` 按到达顺序配对(F2)是现有 server 的缺陷,TCP 也受影响,独立于 B1 先修。`p11/b0` 保留到 B 落地(证据引用 `72926a88`)。 | 用户点名的消费者是原生程序,而跨上下文只有 Binder 能带 fd;原生进程没有 `Context`。 | `B0-CROSS-APP.md`、`DEBTS.md` |
|
||||
| ID-P11-11 | 2026-09-29 | B0 的结论(`B0-CROSS-APP.md`):跨安全上下文连 server 的 unix 端点被 SELinux `connectto` 拒(shell 与另一个 app 都是),连上之后现有代码走共享段、7 个 fd 跨类别可用,数据面与协议不用改;B1 = 跨上下文的连接中介(导出的 bound Service 经 Binder 交出已连接的套接字)+ `fd:` 端点 + 按身份配对 + 防冻结 + 外部 client 的亲和 / 自旋策略 + 调用方认证。原生程序(Termux 一类)的引导方式交用户裁定。`AcceptPair` 按到达顺序配对(F2)是现有 server 的缺陷(unix 端点与非 `--serve` 的一次性 TCP server;产品 TCP 路径本已按身份配对),独立于 B1 先修(ID-P11-12)。`p11/b0` 保留到 B 落地(证据引用 `72926a88`)。 | 用户点名的消费者是原生程序,而跨上下文只有 Binder 能带 fd;原生进程没有 `Context`。 | `B0-CROSS-APP.md`、`DEBTS.md` |
|
||||
| ID-P11-12 | 2026-09-29 | **PAIR**:socket client 的控制与辅助连接按 nonce 配对。client 在两条连接上各先发一条 `PairBind{nonce, aux}`(控制连接上 Hello 紧随其后);server 用 `PairAcceptor` 取代 `SocketTransport::AcceptPair`(已删):跨调用保留未配对的连接,不读 `PairBind` 之后的字节,同 nonce、角色相反才配对;什么都不发就关的连接(就绪探测)静默关闭,2 s 内没有 `PairBind` 或没等到另一半的具名拒绝后关闭,最多 16 条待配对。`protocol.fbs` 追加一张表与联合末位成员,控制协议修订 **3 → 4**(按 pin 脚本的程序);rev-3 client 连新 server 得 `Refuse{WireFingerprint}`,不会被配对。门:`PairAcceptorTest` 8 例 × unix / tcp(探测后接真 client、四条连接交错、孤立辅助连接过期后下一个 client 正常、Hello 在前的旧 client 具名拒绝)加一个真 server 的端到端用例;按到达顺序配对放回后 8 例全红、端到端 rc=6(与设备上一致)。B1 注意:代 client 建连接的 Service 必须自己写这两条 `PairBind`。 | 就绪探测与并发连接会让会话配错;B1 的 broker 更会同时代多个 client 建连接。 | `MG_Remote/Transport/*`、`Server/PairAcceptor.*`、`ServerMain.cpp`、`protocol.fbs`、`CONTRACT-P11.md` |
|
||||
|
||||
@@ -50,8 +50,9 @@ def start(args):
|
||||
raise ValueError('the local fixture requires a numeric loopback TCP endpoint')
|
||||
family = socket.AF_INET6 if ':' in endpoint.hostname else socket.AF_INET
|
||||
address = (endpoint.hostname, endpoint.port)
|
||||
# Do not connect as a readiness probe: it would consume the first half of
|
||||
# AcceptPair, so the next real client would be paired with the probe.
|
||||
# Do not connect as a readiness probe: a server that is not under --serve takes
|
||||
# the first connection it accepts as control, so the probe would end it. (Unix
|
||||
# endpoints pair by the PairBind nonce since P11 and ignore such probes.)
|
||||
with socket.socket(family) as probe:
|
||||
probe.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
probe.bind(address)
|
||||
|
||||
Reference in New Issue
Block a user