mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-17 23:13:22 +09:00
Two things land together: the plan and contract draft P6 needs before it starts, and the
working notes that until now existed on exactly one machine.
1. P6's plan and contract draft (neither started; not one line of code)
docs/Disaggregated/P6-SPAWN-PLAN.md the package plan
docs/Disaggregated/P6-CONTRACT-DRAFT.md the contract draft (moves to
MG_Remote/CONTRACT-P6.md when c6 lands)
The three findings that mattered, all written into the documents:
a. P6 is SMALLER than its roadmap cell suggests. The transport primitives are already in
the tree and already tested: SocketDoorbell including hangup detection and the two
lost-wakeup fences (Doorbell.cpp:211-360, four cases in FdPassingTest), SCM_RIGHTS fd
passing, ShmSegment::Adopt, and the SurfaceOp / WindowKind schema already defined in
protocol.fbs. inproc uses a real second shm mapping rather than an alias, and
SessionRings.h:22-28 says that was done so today is not the first time it runs. P6 is
assembly plus a control plane plus a process, not "write a socket transport".
b. The evidence for "P6 is only a transport swap" has EXPIRED. It was bought by P5c, whose
audit found 59 direct memory accesses in a tree that already looked clean. P5e changed
the tree again. So the first package, a6, is a read-only audit that writes no code, and
every contract row that depends on it is marked PENDING a6 rather than decided in
advance.
c. P6 does not get a game running on the phone. ANativeWindow* is meaningless in the child,
and protocol.fbs:186-196's own comment says Android transfers the window out of band -
that band is P12. P6 lands pbuffer / surfaceless / offscreen, which is what HeadlessGL,
the split-equivalent lane and trace replay need, and which is exactly what P6's own exit
gate measures. A real window reaching the server is a named refusal. This gets its own
section because "P6 is done" would otherwise read as "the game runs now".
The contract adds rule G: a role may not name a process-local handle. It extends P5c's
rule E (a role may not name the other role's memory) from memory to identity - EGLDisplay /
EGLSurface / EGLContext / ANativeWindow* / fd number / pid / mapped address either cross as
a token this contract defines or they do not cross, and a descriptor crosses only through
SCM_RIGHTS, where the kernel renumbers it.
What P5e left for P6 gets its own section. The latch semantics are already designed
(ARCHITECTURE.md:504) and are copied unchanged. What is new is that after run-ahead the
client no longer waits while the peer process can DIE: the client holds records that were
published and will never be applied, and Android's freezer suspends the child without
closing anything. So slow and dead must be distinguishable WITHOUT a timeout threshold.
That is P6's only new design; everything else is carriage. It shares a predicate with E1's
outstanding re-specification (ID-122), and the two should be designed together.
Two gates carried over from P5e's lessons: G2 requires integration-spawn's test-name set to
match integration-split's name for name, because a differing set means the lane is quietly
running less; and the arm-proof gate requires every entry to record the child pid and
transport=spawn in its OWN private log - ID-124 established that this kind of false green
really happens, and a spawn lane that actually ran monolith would pass every other gate.
S2's shape must be settled before it is written, and the document says why: E1 is the
cautionary case.
2. The working notes move into the repository (docs/Disaggregated/notes/, 415 .md files)
ROADMAP / CURRENT_STAGE_PROGRESS / MEASUREMENTS cite ruling numbers, audit line numbers and
the provenance of gate figures from ~/w7/notes/, a directory that exists on one machine and
is under no version control. A record cited hundreds of times that lives only locally is not
a record, so it moves in whole, with its directory structure intact.
Only .md moves. Scripts, run logs, census and gate result JSON, patches, APKs and nm dumps
stay where they are: they are evidence DATA rather than documents - large, regenerated per
run, and mostly carrying absolute paths and device serials that mean something only on the
machine that produced them. The mapping and this split are written in
docs/Disaggregated/notes/README.md.
Two exceptions are recorded there too: P6's BRIEF has been promoted to a first-class
document and keeps no copy under notes/, so the two cannot drift apart; and recovered/ holds
material salvaged from failed workflow runs, which may duplicate the like-named phase
directories and is kept because a few of those were the only complete version at the time.
CI's citation lint takes docs/Disaggregated/*.md only (non-recursive), and notes/ is
deliberately outside it: those notes' file:line citations were written against their own
code heads, and resolving them against today's HEAD would fail wholesale - which is not an
error, it is their correct state as a historical record. To check one, use the revision it
declares (--rev).
3. Inconsistencies fixed in passing
- README.md's status line still said P5e was in progress while the stage table already said
closed.
- CURRENT_STAGE_PROGRESS's next-step item 1 still listed the exit gate as pending, though
(a) and (b) were run in the previous commit; rewritten to closed plus the one item that
actually remains (E1).
- ROADMAP's P6 row still had the pre-phase plan in three of its cells; it now carries the
package order, the scope boundary and the two new gates.
Checked with check_doc_citations.py: 125 citations across docs/Disaggregated/*.md, 0 problems.
554 lines
29 KiB
Markdown
554 lines
29 KiB
Markdown
# b1 — round 2: ID-41 (G5's eleventh row) and ID-42 (the membership assertion)
|
|
|
|
Branch `p5/b1`, worktree `~/w7/p5-b1`. Base: `git merge --no-edit feat/disaggregated` was a
|
|
**fast-forward** to `5e5bf7b9` — wave 1 already contains `505b5084`, so there was nothing to
|
|
resolve and no merge commit exists. `git var GIT_COMMITTER_IDENT` printed
|
|
`Swung0x48 <swung0x48@outlook.com>` before the first command (ID-40's standing rule).
|
|
|
|
Two commits, **`5e5bf7b9..6cabc6b0`**:
|
|
|
|
```
|
|
f63c9483 [Fix] (scripts): compare G5's eleventh row against its pin ALWAYS and re-pin it on the
|
|
reviewed P5 body, with a negative control that the pin itself can fail ID-41
|
|
6cabc6b0 [Fix, Test] (MG_IntegrationTest, MG_Test): make the persistent-map membership expectation
|
|
a function of the arm the map landed in, and pin the arm-independent half on
|
|
IsLivePersistentMap where both answers can be produced ID-42
|
|
```
|
|
|
|
Item 3 is not a repo change: it is one edit to `~/w7/notes/tools/wsl_p5_gate.sh`, argued in §3.
|
|
|
|
`MobileGL/MG_Backend/DirectGLES/Managers.cpp` is **untouched** (ID-41 says so in as many words,
|
|
and v1 owns that file this round).
|
|
|
|
---
|
|
|
|
## 1. ID-41 — the eleventh row is isolated and re-pinned
|
|
|
|
### 1.1 What the two scripts did, and what they do now
|
|
|
|
`scripts/p3a_untouched_regions.sh:40` has always claimed that the push arm "is compared against a
|
|
sha pinned at the commit where it was reviewed". The implementation consulted
|
|
`PINNED_SHA_FlushPendingRangesFrom` **only as a fallback**, after a strict extraction of all eleven
|
|
at `<ref-a>` had failed — i.e. only when `<ref-a>` did not define the function at all. At P3a's own
|
|
base ref it does not, so the two readings agreed and nobody noticed. From `ff2994d9` onward it
|
|
does, the fallback stopped firing, and the row silently reverted to ref-a-vs-ref-b. That is why
|
|
both scripts went red on the integration head.
|
|
|
|
The p4a twin had already found this and fixed it on its own side (its `DEVIATIONS D-N/2`), so this
|
|
round only re-pins it there and brings the parent into line. **After ID-41 the two scripts agree
|
|
and D-N/2 is no longer a deviation between them** — the note is kept as the record of which one got
|
|
there first.
|
|
|
|
**(a) always pinned.** `p3a`'s `extract_baseline` now extracts the **ten** strictly and then applies
|
|
the pin unconditionally. This *removed* a code path rather than adding one: the all-eleven strict
|
|
attempt is gone and the "ten strictly" spelling — which already existed as the fallback — is now the
|
|
only one. So the prompt's escape hatch ("if the extractor cannot express 'always pin' without
|
|
re-spelling the ten-row path") was not needed. The substitution itself is one function,
|
|
`apply_pinned_shas`, in **both** scripts, and both `extract_baseline` and `--self-test`'s new
|
|
controls call it — a control that re-implemented the substitution would only prove the copy agrees
|
|
with itself.
|
|
|
|
**(b) the pin is the reviewed P5 body**, with the commit and the decision beside it, in a table both
|
|
scripts carry identically:
|
|
|
|
```
|
|
# 3e298c9a 37fc94ff... ID-15, P3a: the two-arm shape, reviewed and accepted
|
|
# 3dadd4c1 172b0222... ID-41, P5 (b1): [Fix] (DirectGLES): make the extent hostBase is good
|
|
# for a parameter of the flush ladder ... <- CURRENT
|
|
PINNED_BASELINE_REF=3dadd4c1
|
|
PINNED_BASELINE_DECISION=ID-41
|
|
PINNED_SHA_FlushPendingRangesFrom=172b022273db01b16e772d15b269ffcd797fe38c767f7354d83ce113a66040d0
|
|
```
|
|
|
|
`3dadd4c1` was found, not assumed: walking `git rev-list --reverse ff2994d9..HEAD -- Managers.cpp`
|
|
and hashing the body at each commit gives exactly two movers —
|
|
|
|
```
|
|
02b3b5a0... 142bf921 [Fix] (DirectGLES): retire the probe's last frontend read under split ...
|
|
172b0222... 3dadd4c1 [Fix] (DirectGLES): make the extent hostBase is good for a parameter ...
|
|
```
|
|
|
|
— and `3dadd4c1` is where the current body appears. (`~/w7/p5-b1-r2-walk.sh`.)
|
|
|
|
**The admission is checkable, not asserted.** The same walk prints the PULL arm at both ends:
|
|
`FlushPendingRangesNow` hashes `c6557002...` at `ff2994d9` **and** at `HEAD`. It did not move. With
|
|
G1 at `.text +0` and 0/0/0/0 on the pull build (§4.1), the change is confined to the arm that
|
|
ships, which is what makes "re-pin" rather than "revert" the right answer.
|
|
|
|
**(c)** The other ten p3a rows and all seventeen p4a regions are untouched and stay
|
|
ref-a-vs-ref-b. Only `PINNED_FUNCTIONS` is consulted through the pin, and it has one member.
|
|
|
|
**(d) the pinned row has its own two controls, and its own message.** `compare_lists` in both
|
|
scripts now emits a distinct paragraph when the row that moved is a pinned one ("`... IS A PINNED
|
|
ROW (ID-41): its baseline is ALWAYS the sha PINNED in this script ... and never the body at
|
|
'<ref-a>'`"), because the two kinds of failure are fixed differently and a reader who gets only the
|
|
generic paragraph goes looking for a diff against `<ref-a>` that does not exist. `--self-test`
|
|
gained:
|
|
|
|
- **pin precedence (positive)** — a baseline carrying a *different* sha for the pinned row (which
|
|
is the shape of every `<ref-a>` CI passes today) must come out of `apply_pinned_shas` carrying the
|
|
pin. This is the control that would have caught the ID-41 defect itself.
|
|
- **a ONE-TOKEN edit to the pinned ladder (negative), AGAINST THE PIN** — a single `;` inserted at
|
|
the head of the body (a new `perturb-token` / `token` mode; the perturbed copy is only ever
|
|
hashed, never compiled, so an empty statement is legal there). The comparison must go red, must
|
|
name `FlushPendingRangesFrom`, **and** must carry the "IS A PINNED ROW" line. All three are
|
|
asserted separately, so a red for the wrong reason fails the control (R-16).
|
|
|
|
A third, non-fatal note fires when the working tree's ladder does not hash the pin. It is
|
|
deliberately **not** a failure: `--self-test` runs on the working tree and is about whether the
|
|
comparison works, while the two-ref gate is what fails when the *committed* ladder has left the pin.
|
|
|
|
**(e) green on both refs.** CI's `<ref-a>` is `BASELINE: "37da3c3a"` (`.github/workflows/test.yml:2228`),
|
|
used by `test.yml:2345` and `:2378` as `bash scripts/<n>_untouched_regions.sh "${BASELINE}" HEAD`,
|
|
with `--self-test` at `:2349` and `:2382`.
|
|
|
|
```
|
|
p3a --self-test rc=0 8 controls (3 positive, 3 perturbation, pin precedence, pinned one-token)
|
|
p3a ff2994d9 HEAD rc=0
|
|
p3a 37da3c3a HEAD rc=0
|
|
p4a --self-test rc=0 14 control lines (3 positive, 8 head/tail, pin precedence, pinned one-token)
|
|
p4a ff2994d9 HEAD rc=0
|
|
p4a 37da3c3a HEAD rc=0
|
|
```
|
|
|
|
Both refs now print a NOTE saying the ref defines the row differently from the pin. The wording was
|
|
rewritten this round because the inherited p4a sentence was one-directional ("the ladder moved
|
|
between `<pin>` and `<ref>` without this gate being re-pinned") and reads as an alarm in the case
|
|
that is *expected*: when `<ref-a>` **predates** the pin commit the two SHOULD disagree, because the
|
|
pinned body is the change ID-41 admitted. The note now says both directions and states that it is
|
|
not a verdict.
|
|
|
|
### 1.2 R-16 — "I made it red once, by doing X"
|
|
|
|
`~/w7/p5-b1-r2-g5red.sh`. **X = rewind `PINNED_SHA_FlushPendingRangesFrom` to the pre-P5
|
|
`37fc94ff...`, in a copy of each script placed beside the original so its `REPO_ROOT` still
|
|
resolves, and run `ff2994d9 HEAD`.** No source file is touched, so the red can only be the pin's.
|
|
|
|
```
|
|
p3a: FIRST FUNCTION THAT MOVED: FlushPendingRangesFrom
|
|
FlushPendingRangesFrom IS A PINNED ROW (ID-41): ... the body reviewed at 3dadd4c1 ... rc=1
|
|
p4a: FIRST REGION THAT MOVED: FlushPendingRangesFrom
|
|
FlushPendingRangesFrom IS A PINNED ROW (ID-41): ... the body reviewed at 3dadd4c1 ... rc=1
|
|
shipped scripts, same refs, immediately after: rc=0
|
|
no leftover copies in scripts/
|
|
```
|
|
|
|
### 1.3 What would overturn ID-41's landing here
|
|
|
|
A pull-build symbol diff (G1 says 0/0/0/0, `.text +0`), or `FlushPendingRangesNow` turning out to
|
|
have moved after all (it hashes `c6557002...` at both ends). Either would mean the change is not
|
|
confined to the shipping arm and the row should be reverted rather than re-pinned. Separately: a P5
|
|
caller found to depend on the widened `INVALIDATE_RANGE` behaviour the tier-1 refusal now blocks —
|
|
nothing in the tree does today, and the refusal is only reachable once w1 passes a real `SEG_STAGE`
|
|
extent.
|
|
|
|
### 1.4 A debt this round created and did not take
|
|
|
|
`.github/workflows/test.yml` now describes the two self-tests by a control count that is one short
|
|
(`:2340` "six canned controls" for p3a; `:2374-2377` "three positive controls ... and FOUR negative
|
|
ones" for p4a), and `:2328` still says the push ladder is pinned "at 3e298c9a". The file is not in
|
|
my grant (ID-41 grants the two scripts and says to *run* CI's argument shapes, not to edit the
|
|
workflow). The edit is three comment lines:
|
|
|
|
```
|
|
:2328 "... a sha pinned in the script at 3dadd4c1 (ID-41), because that one was born in P3a
|
|
and is compared against the reviewed body rather than against the base ref"
|
|
:2340 "six canned controls" -> "eight canned controls ... plus the pin-precedence control and a
|
|
one-token edit to the pinned ladder compared against the pin"
|
|
:2377 "FOUR negative ones" -> "NINE negative ones"
|
|
```
|
|
|
|
Nothing fails on it; the steps themselves are unchanged and green.
|
|
|
|
---
|
|
|
|
## 2. ID-42 — CONFIRMED, with evidence, and what the fix is
|
|
|
|
### 2.1 The provisional diagnosis, checked line by line
|
|
|
|
**Reproduced first**, exactly as asked:
|
|
|
|
```
|
|
cd ~/w7/p5-b1/build-split
|
|
MOBILEGL_TRANSPORT=monolith ctest -R 'DirectGLES.PersistentCoherentMapScenario.TwoWrites' --output-on-failure
|
|
PersistentCoherentMapScenario.cpp:270: Failure Value of: live Actual: false Expected: true
|
|
```
|
|
|
|
**Claim 1 — "the assertion never ran in the push build (tracker unavailable → early return)".
|
|
CONFIRMED.** `PersistentMapPeek.cpp:26` compiles the tracker half only when
|
|
`MGITEST_PERSISTENT_MAP_TRACKER` is defined, and `MG_IntegrationTest/CMakeLists.txt:1832-1843`
|
|
defines it **inside `if (MOBILEGL_BUILD_DISAGGREGATED)`**. A push build never compiles `MG_Remote`,
|
|
so `PersistentMapTrackerAvailable()` is false, and the old `AssertMembership` recorded
|
|
`"unavailable"` and returned at its first line. The seven entries went red the first time the
|
|
assertion ran at all.
|
|
|
|
**Claim 2 — "on the split build's monolith lane the map is ADOPTED (tier T1)". CONFIRMED, and the
|
|
tier name is the only thing I would correct.** Direct evidence, read from the production peek:
|
|
|
|
```
|
|
build-split/.../MobileGLIntegrationTest --gtest_filter=...TheMapLandsInTheArmItsLaneDeclares
|
|
--gtest_output=xml:...
|
|
<property name="persistent_map_arm" value="adopted"/>
|
|
```
|
|
|
|
The mechanism is `PipeApply.cpp:2005`: R-6's decline is
|
|
`if (MG_Config::Transport != Monolith && AdoptTierIsEmulate()) return nullptr;` — **ANDed with the
|
|
transport**. Under `MOBILEGL_TRANSPORT=monolith` the decline is skipped, `g_resourceOps->MapPersistent`
|
|
mints, `BufferObject.cpp:856` calls `AdoptPersistentMap`, and `IsBackendPersistentMapped()` is true.
|
|
So the store is adopted by the ordinary monolith path rather than by an adopt *tier*: `AdoptTier` is
|
|
still 2 the whole time. "Tier T1" in ID-42 should read "the monolith mint" — the conclusion is
|
|
unaffected, but the distinction matters for the next claim.
|
|
|
|
**Claim 3 — "`IsLivePersistentMap` answers false on its `IsBackendPersistentMapped()` row by
|
|
design". CONFIRMED verbatim**, `PersistentMapTracker.cpp:40-58`:
|
|
|
|
```cpp
|
|
Bool PersistentMapTracker::IsLivePersistentMap(const BufferObject& buffer) {
|
|
if (!buffer.IsMapped()) return false;
|
|
// ... At tier T2 this arm is unreachable - MapPersistent declines - but
|
|
// the predicate must still read the chain, not the tier ...
|
|
if (buffer.IsBackendPersistentMapped()) return false;
|
|
```
|
|
|
|
**Claim 4 — "the membership claim is only true on the emulated arm". CONFIRMED.** The set is the set
|
|
of maps the client still has to PUSH; an adopted store's bytes are already in coherent GPU memory
|
|
and there is nothing to ship, so it must *not* be a member.
|
|
|
|
### 2.2 The fix
|
|
|
|
`PersistentCoherentMapScenario.cpp`: `AssertOrRecordArm` now **remembers** the arm it observed in
|
|
`m_observedArm` (a three-state `ObservedArm{NotLookedAt, Adopted, Emulated}`), and `AssertMembership`
|
|
expects `live == (arm == emulated)` from **that same peek** — not a second one, which would be a
|
|
second question that could straddle a change. `NotLookedAt` records and does not assert, because
|
|
"could not look" is not "it was emulated" (`PersistentMapPeek.h`'s own rule); a lane that *declares*
|
|
an arm has already been skipped by `AssertOrRecordArm` in that state. The failure message names both
|
|
directions and points at the unit case for the arm-independent half.
|
|
|
|
`MG_Test/Buffer/SplitBufferTest.cpp`: the arm-independent statement is pinned by a new unit case,
|
|
**`SplitBufferSet.TheAdoptedArmIsNotAMemberAndItIsTheChainRowThatSaysSo`** — not by an integration
|
|
entry, because an integration entry only ever sees whichever arm its driver and transport hand it,
|
|
which is precisely how the old assertion came to state the emulated arm's property as universal.
|
|
|
|
The case produces both arms and compares them:
|
|
|
|
- a **declined twin** with no backend ops: not adopted, and a member;
|
|
- an **adopted** buffer produced by the *production* path — a `BufferBackendOps` table whose only
|
|
live member is `AcquirePersistentMap`, installed for exactly one `AcquireMemoryRange` call with
|
|
`Transport` flipped to `Monolith`, because `PipeApply.cpp:2005` means there is no other way to
|
|
reach a mint in this build. The case never sets a flag by hand: with the production adoption
|
|
deleted the buffer is simply not adopted and the case fails on its own `ASSERT_TRUE`, which is
|
|
R-16's rule.
|
|
|
|
The predicate is then asked with the tier back at **T2 / `InProcess`** — the configuration in which
|
|
R-6 says every acquisition declines — and must still answer "not a member". Two asserted
|
|
consequences follow: `NoteMapStateChanged` (the production set-maintenance entry point, not a
|
|
member read) refuses to enrol it, and `PushPersistentMapsBeforeVerb()` ships the declined twin's
|
|
4096 bytes and nothing else.
|
|
|
|
What I did **not** claim: the case does not pin `PushBlocksFor`'s re-check of a *stale* member,
|
|
because that state is not reachable through production paths on this tree —
|
|
`NotePersistentMapStateChanged` early-returns unless `PushIsArmed()` (`BufferObject.cpp:430`), and
|
|
`EnsureGpuResidentStorage` refuses a mapped buffer outright (`:783`). The re-check stays
|
|
belt-and-braces and unpinned; saying so is better than a case that pretends to drive it.
|
|
|
|
### 2.3 R-16 — the red-checks
|
|
|
|
`~/w7/p5-b1-r2-red2.sh`. **X = delete `IsLivePersistentMap`'s `IsBackendPersistentMapped()` row**,
|
|
which is the exact claim both gates make. (The file is restored from a byte copy, never from git, so
|
|
the other edits in the tree are never touched; the script asserts the row appears exactly once
|
|
before removing it.)
|
|
|
|
```
|
|
baseline, unmodified tree
|
|
SplitBufferSet.TheAdoptedArmIsNotAMember... 1/1 passed
|
|
PersistentCoherentMapScenario (split, monolith) 14/14 passed
|
|
|
|
with the row removed
|
|
SplitBufferSet.TheAdoptedArmIsNotAMember... 0/1 passed, three failures
|
|
SplitBufferTest.cpp:332 "... This answer must come from that ROW and not from the adopt
|
|
tier: the tier is T2 and the transport is InProcess right now ..."
|
|
SplitBufferTest.cpp:346 the set enrolled it
|
|
SplitBufferTest.cpp:354 the push shipped its bytes
|
|
PersistentCoherentMapScenario (split, monolith) 7 of 14 FAILED - the same seven:
|
|
DirectGLES.{TwoWrites, AWriteAfterAFrameBoundary, TheMapLands}
|
|
DirectVulkan.{TwoWrites, AWriteAfterAFrameBoundary, TheMapLands}
|
|
DirectGLES.PersistentMapArm.TheMapLands
|
|
PersistentCoherentMapScenario.cpp:318 Which is: true / Which is: false
|
|
"... This map landed in the adopted arm immediately after the map and the predicate made it
|
|
a member ... (ID-42 ...)"
|
|
|
|
after restore
|
|
1/1 and 14/14 again; `git diff --stat` on the file is empty
|
|
```
|
|
|
|
Both gates go red for their own reason and assert their own string.
|
|
|
|
### 2.4 The EMULATED-arm red-check: PENDING JOINT MERGE — not faked
|
|
|
|
**No knob reaches the emulated arm in a monolith lane, and I checked rather than assumed.** Measured
|
|
matrix (`~/w7/p5-b1-r2-armmatrix.sh`, reading the production `persistent_map_arm` property):
|
|
|
|
| configuration | arm |
|
|
|---|---|
|
|
| GLES, `MOBILEGL_TRANSPORT=monolith` (default) | adopted |
|
|
| GLES, monolith, `MOBILEGL_PIPE_PUSH=0` | adopted |
|
|
| GLES, monolith, `MOBILEGL_IPC_ADOPT_TIER=2` | adopted |
|
|
| GLES, monolith, `MOBILEGL_DISABLE_LARGE_BUFFER_ADOPTION=1` | adopted |
|
|
| DirectVulkan, monolith (default) | adopted |
|
|
| DirectVulkan, monolith, `MOBILEGL_PIPE_PUSH=0` | adopted |
|
|
|
|
Why: `MOBILEGL_IPC_ADOPT_TIER=2` is already the default and is ANDed with `Transport != Monolith`
|
|
(`PipeApply.cpp:2005`); 0 and 1 are a named `abort`. `MOBILEGL_DISABLE_LARGE_BUFFER_ADOPTION` guards
|
|
only `TryAdoptLargeStorage`'s 16 MiB path, which a scenario-sized buffer never reaches.
|
|
`MOBILEGL_PIPE_PUSH=0` merely moves the mint from the MGPipe arm to the legacy
|
|
`g_bufferBackendOps->AcquirePersistentMap` arm (`BufferObject.cpp:870-881`), which mints too. There
|
|
is no `MOBILEGL_IPC_*` knob for "decline under monolith", and inventing one would be a Config.h
|
|
change through the integrator (c0's file), not a red-check.
|
|
|
|
So the emulated arm is reachable **only** with `Transport != Monolith`, i.e. the `DirectGLES.Split.*`
|
|
lanes, and those skip today at `ScenarioFixture.h:143` — "`MG_Remote::Client::ClientSession::Active()`
|
|
is null" — until s1 and c1 land the session (ID-45).
|
|
|
|
**The exact commands the integrator runs on the joint merge** (the perturbation address was checked
|
|
against the tree this round: `PersistentMapTracker.cpp:40` matches exactly once):
|
|
|
|
```bash
|
|
cd ~/w7/p5-b1 && ~/w7/p5-b1-submodlinks.sh on
|
|
export GLIBC_TUNABLES=glibc.malloc.tcache_count=0
|
|
|
|
# 1. GREEN, and it must report arm=emulated rather than skip:
|
|
(cd build-split && ctest -R 'DirectGLES\.Split\.PersistentCoherentMapScenario' --output-on-failure)
|
|
|
|
# 2. RED, with the production predicate broken on the arm that is now reachable:
|
|
sed -i 's|^ Bool PersistentMapTracker::IsLivePersistentMap(const BufferObject& buffer) {|&\n return false; // R-16 red-check, ID-42|' \
|
|
MobileGL/MG_Remote/Client/PersistentMapTracker.cpp
|
|
cmake --build build-split -j 24
|
|
(cd build-split && ctest -R 'DirectGLES\.Split\.PersistentCoherentMapScenario' --output-on-failure)
|
|
# MUST fail at PersistentCoherentMapScenario.cpp with
|
|
# "This map landed in the emulated arm ... and the predicate did not make it a member"
|
|
|
|
# 3. restore
|
|
~/w7/p5-b1-submodlinks.sh off && git checkout -- MobileGL/MG_Remote/Client/PersistentMapTracker.cpp
|
|
~/w7/p5-b1-submodlinks.sh on && cmake --build build-split -j 24
|
|
```
|
|
|
|
Until step 2 has been observed, the emulated direction of `EXPECT_EQ(live, emulated)` is
|
|
**unverified**, and this report says so rather than counting the adopted-arm red twice.
|
|
|
|
### 2.5 What would overturn ID-42's ruling
|
|
|
|
`PeekBufferIsLivePersistentMap` answering **false on the EMULATED arm** once inproc arms — which is
|
|
exactly what step 2 above tests for, in the green direction. That would mean the push set and
|
|
`SyncPersistentMappedRange`'s early-out chain have genuinely drifted and the production side is
|
|
wrong, not the expectation. Also overturned by a decision that an adopted store *should* be a member
|
|
(it must not be: the push would read `m_resource.Bytes()`, which for an adopted store is the GPU
|
|
map, as if it were the shadow).
|
|
|
|
---
|
|
|
|
## 3. Item 3 — the split lane's evidence file
|
|
|
|
**The gate's expectation was the dishonest half, and that is the half I changed.** One edit, to
|
|
`~/w7/notes/tools/wsl_p5_gate.sh` (applied by writing a new file and `rename(2)`-ing it over the
|
|
original, so a copy of the gate that happened to be running would keep its inode; nothing was
|
|
running — checked).
|
|
|
|
### 3.1 Why the lane's file could not be made to say more
|
|
|
|
The split lane's log is **not** empty and it already carries a `pmap=`/`mpr=` line:
|
|
|
|
```
|
|
persistent-map-arm-split-DirectGLES.log:
|
|
MGPipe stats: frames=0 window=0 draws=0 ... bytes[... pmap=0 ...] ... cso[... mpr=0] ...
|
|
```
|
|
|
|
That is the library's teardown summary, and it is the honest answer: **the lane measured nothing,
|
|
because its case SKIPPED.** `ctest -R 'DirectGLES.Split.PersistentMapArm' -V` gives the reason in
|
|
the library's own words — `ScenarioFixture.h:143`, "`MG_Remote::Client::ClientSession::Active()` is
|
|
null: no client session exists in this process ... this is what 'packages s1 and c1 have not landed'
|
|
looks like from inside a running test".
|
|
|
|
The gate then does (correctly, review finding Q-2) `grep -v 'window=0'` to avoid reporting the union
|
|
of the real window and the teardown zeros — and on this lane that filter leaves **nothing**, which
|
|
it printed in the same shape as a measured pair. An empty value there reads identically to three
|
|
different facts: "it measured zero", "the stats channel never reached the process", and "the lane
|
|
did not run". That is R-16's defect class inside a gate's own echo.
|
|
|
|
I did **not** make the test binary write into the library's log. `MG_IntegrationTest` cannot link
|
|
`MG_Util::PipeStats` at all (`PipeStatsWindow.h:12-17`, and on Android it links the shipping
|
|
`libMobileGL.so` built `-fvisibility=hidden`), so the only way to put a line there would be for the
|
|
*test* to append to the *library's* file — a second, forgeable channel for a number the library
|
|
owns, which is the same mistake as a test constructing the state it should observe.
|
|
|
|
### 3.2 The edit
|
|
|
|
The echo now distinguishes three states:
|
|
|
|
```
|
|
persistent-map arm lanes: 100% tests passed, 0 tests failed out of 2
|
|
persistent-map-arm-DirectGLES.log: pmap=0.00 mpr=1
|
|
persistent-map-arm-split-DirectGLES.log: NO MEASUREMENT - every stats line in it is a TEARDOWN
|
|
window (window=0), i.e. the lane's case did no work. 1 of this run's PersistentMapArm entries
|
|
skipped; the split half skips on 'ClientSession::Active() is null' until s1 and c1 land the
|
|
client session (ID-45). Exit gate E3(c)'s pair is NOT closed while this line says NO
|
|
MEASUREMENT - it is closed when it carries mpr= and pmap=.
|
|
```
|
|
|
|
All three branches were observed: the measured one and the teardown-only one above, and the third
|
|
("the library emitted no `MGPipe stats:` line at all, so `MOBILEGL_PIPE_STATS` /
|
|
`MOBILEGL_PIPE_STATS_PERIOD` did not reach the process. This is NOT `pmap=0`.") against a throwaway
|
|
log in a temp directory (`~/w7/p5-b1-r2-pending.sh`). `bash -n` on the rewritten gate parses.
|
|
|
|
**What this costs the integrator to know:** exit gate E3(c) — "the split arm's `mpr` equals the
|
|
monolith arm's, and `pmap > 0`" — is **not** closed on this tree and was not closed at wave 1
|
|
either. The monolith half reads `pmap=0.00 mpr=1`; the split half has never produced a number. It
|
|
becomes a verdict on the commit that lands the last of c1/s1/v1, at which point the same gate line
|
|
will carry a pair or still say NO MEASUREMENT.
|
|
|
|
---
|
|
|
|
## 4. Acceptance
|
|
|
|
Worktree `~/w7/p5-b1` at `6cabc6b0`, `GLIBC_TUNABLES=glibc.malloc.tcache_count=0`, four build dirs
|
|
plus `build_verify_split`. Driver: `~/w7/p5-b1-r2-accept.sh`.
|
|
|
|
### 4.1 The four self-tests
|
|
|
|
**G1** — against the RE-TAKEN baseline `~/w7/p5-before-libMobileGL.so` (marker `.READY` =
|
|
`4595163c`, ID-44), `--threshold 0`:
|
|
|
|
```
|
|
.text 10806611 -> 10806611 (+0, +0.000%)
|
|
27814 -> 27814 defined symbols: 0 added, 0 removed, 0 resized, 0 renamed
|
|
nm pull MG_Remote: 0 nm split MG_Remote: 345
|
|
```
|
|
|
|
**Generators and purity**
|
|
|
|
```
|
|
gen_pipe.py --check : generated files are up to date
|
|
gen_pipe.py --self-test : 9 negative-control trips, positive control OK
|
|
gen_pipe_dirty_surface.py --check : reported (unchanged)
|
|
check_include_closure.py : 4 probes, 0 skipped, 0 problem(s)
|
|
```
|
|
|
|
**`ctest -L unit`**
|
|
|
|
| lane | integration head | here |
|
|
|---|---|---|
|
|
| build-linux | 1813 / 1813 | **1814 / 1814** |
|
|
| build-push | 1813 / 1813 | **1814 / 1814** |
|
|
| build-verify | 1813 / 1813 | **1814 / 1814** |
|
|
| build-split | 1974, 2 known reds | **1975, the SAME 2 known reds** |
|
|
|
|
The two split reds are `RingTest.TheTwoFlagSpacesAreDisjointByTranslation` (s1, ID-43) and
|
|
`PipeWireCodecTest.NoReplyIsWrittenForARowTheCatalogueGivesNoReplySlot` (c1, ID-31 fallout).
|
|
Neither is mine and neither moved.
|
|
|
|
The one new name is `SplitBufferSet.TheAdoptedArmIsNotAMemberAndItIsTheChainRowThatSaysSo`, present
|
|
in **all four** builds (it skips outside build-split), which is why G2 and G14 do not move.
|
|
|
|
**`ctest -L integration-gpu`, `MOBILEGL_TRANSPORT=monolith`** — §4.3.
|
|
|
|
### 4.2 Name sets
|
|
|
|
```
|
|
ctest -N, all labels: pull=2942 push=2942 split=3124
|
|
G2 pull vs push, diff lines: 0
|
|
G14 split vs push: 182 added, 0 REMOVED
|
|
```
|
|
|
|
### 4.3 The integration lanes
|
|
|
|
```
|
|
ctest -L integration-gpu, MOBILEGL_TRANSPORT=monolith
|
|
build-push 100% passed, 0 failed out of 1128
|
|
build-split 100% passed, 0 failed out of 1149 <- the seven reds are ZERO
|
|
```
|
|
|
|
`build-split` monolith was **1149 with exactly the seven `PersistentCoherentMapScenario` reds**; it
|
|
is now 1149 with none. `build-push` is unchanged at 1128/1128.
|
|
|
|
**Name identity against `~/w7/p5-before-ctest-names.txt`.** One correction to how this is computed:
|
|
that file is a **full** `ctest -N` list (2902 names), not an integration-gpu-only one, so comparing
|
|
1128 integration-gpu names against it directly subtracts two different populations (my first pass
|
|
did, and printed a meaningless "1785 missing"). Computed properly
|
|
(`~/w7/p5-b1-r2-nameid.sh`):
|
|
|
|
```
|
|
baseline (full ctest -N): 2902
|
|
my push build (full ctest -N): 2942
|
|
baseline names MISSING from my push build: 0 <- the gate that matters
|
|
names my push build adds over the baseline: 40 (all of wave 1's, plus my one unit name)
|
|
|
|
integration-gpu in my push build: 1128
|
|
of those, not present at the baseline: 11
|
|
```
|
|
|
|
The eleven are t1's wave-1 scenario entries and nothing of mine —
|
|
`{DirectGLES,DirectVulkan}.TriangleScenario.*` (2 each) and
|
|
`{DirectGLES,DirectVulkan}.PersistentCoherentMapScenario.*` (3 each), plus
|
|
`DirectGLES.PersistentMapArm.PersistentCoherentMapScenario.TheMapLandsInTheArmItsLaneDeclares`.
|
|
This round's diff is four files and adds **one** ctest name, a `unit` one:
|
|
|
|
```
|
|
MobileGL/MG_IntegrationTest/Scenarios/PersistentCoherentMapScenario.cpp | 76 +++-
|
|
MobileGL/MG_Test/Buffer/SplitBufferTest.cpp | 109 +++--
|
|
scripts/p3a_untouched_regions.sh | 214 ++++--
|
|
scripts/p4a_untouched_regions.sh | 215 ++++--
|
|
```
|
|
|
|
### 4.4 The verify + split matrix cell (round 1's M-8)
|
|
|
|
`~/w7/p5-b1-verifysplit.sh`, `build_verify_split` = `MOBILEGL_PIPE_VERIFY=ON` +
|
|
`MOBILEGL_PIPE_PUSH=ON` + `MOBILEGL_BUILD_DISAGGREGATED=ON` + `INPROC=ON` — the only configuration
|
|
in which `MGPSubData::HasLiveHostWrites` can be non-zero **and** the G4 field comparator is compiled.
|
|
|
|
```
|
|
cfg rc=0 build rc=0
|
|
unit: 1975, the same TWO known reds (RingTest -> s1; PipeWireCodecTest -> c1), none of them mine
|
|
```
|
|
|
|
---
|
|
|
|
## 5. Where I think the decisions were slightly wrong
|
|
|
|
1. **ID-42 says "tier T1".** It is not a tier at all: `MG_Config::Ipc.AdoptTier` is 2 throughout,
|
|
and the adoption happens because `PipeApply.cpp:2005` ANDs R-6's decline with
|
|
`Transport != Monolith`. Reading it as a tier sends the next person to
|
|
`MOBILEGL_IPC_ADOPT_TIER`, which cannot change this lane's answer (§2.4's table).
|
|
2. **ID-42's "if a knob forces adoption tier T2, use it" has no referent.** T2 *is* the default and
|
|
is already forced; the thing that is not forced under monolith is the DECLINE. The honest
|
|
spelling of what ID-42 wanted is "if a knob makes `MGPipeApplyMapPersistent` decline under
|
|
monolith" — and there is none.
|
|
3. **The wave-1 gate line for the split arm was never a measurement**, at wave 1 either. The empty
|
|
value it printed was reported as data in the integration notes; §3 is the correction.
|
|
|
|
---
|
|
|
|
## 6. The account left
|
|
|
|
- **The emulated-arm red-check (§2.4)** is the one debt this round hands forward, with the exact
|
|
commands. It is owned by whoever lands the last of c1/s1/v1.
|
|
- **E3(c) is open** and the gate now says so out loud (§3.2).
|
|
- **`.github/workflows/test.yml`'s three stale comment lines** (§1.4), with the diff.
|
|
- `PushBlocksFor`'s re-check of a stale member is unreachable through production paths and therefore
|
|
unpinned (§2.2). It becomes pinnable the day a tier mints one (P11).
|
|
- Everything §7 of `b1-v1.md` listed is unchanged: the image-unit high-water mark (P8), the 21
|
|
`SyncPersistentMappedRange` sites retiring into `PushPersistentMapsBeforeVerb()` (P8, c1's call
|
|
site), `MOBILEGL_IPC_ADOPT_TIER` 0/1 (P11), C-6's re-opening when the barrier retires, and
|
|
m-13's unsynchronised `m_livePersistentMaps` (v1's thread work).
|
|
|
|
---
|
|
|
|
## 7. Temp files kept
|
|
|
|
`~/w7/p5-b1-r2-accept.sh` (the acceptance driver), `~/w7/p5-b1-r2-g5red.sh` (ID-41's red-check),
|
|
`~/w7/p5-b1-r2-red2.sh` (ID-42's red-checks), `~/w7/p5-b1-r2-repro.sh` (the ID-42 reproduction),
|
|
`~/w7/p5-b1-r2-armmatrix.sh` (§2.4's table), `~/w7/p5-b1-r2-walk.sh` (the pin-commit search),
|
|
`~/w7/p5-b1-r2-nameid.sh` (§4.3), `~/w7/p5-b1-r2-gatefix.py` (§3's edit),
|
|
`~/w7/p5-b1-r2-pending.sh`, and the run logs `~/w7/p5-b1-r2-buildrun.log`,
|
|
`~/w7/p5-b1-r2-igpu-push.log`, `~/w7/p5-b1-r2-igpu-split.log`. Everything else this round created
|
|
has been deleted, by name and never by glob. The worktree is clean and its submodule links are
|
|
left **off**, so the next `git` command in it works without a toggle.
|