[MG_Remote] (P7): the spawn launcher passes MOBILEGL_IPC_WIRE_DEFERRED_MB through to the server child, the one MOBILEGL_IPC_* knob its environment scrub keeps

BuildChildEnv drops every MOBILEGL_IPC_* entry, so the server-owned watermark meant something
under inproc and silently nothing under spawn - measured: the spawn server parked 47 MiB against
a lane budget of 8 with zero forced syncs, because it had parsed the default out of an
environment that no longer carried the variable. The knob names no endpoint, role or segment
size, so neither anti-recursion catch (Dial=No, ServerMain's scrub check of TRANSPORT /
SERVER_PATH / RING_MB / STAGE_MB) is weakened; it is listed by name, not by widening the prefix.
This commit is contained in:
2026-09-22 21:44:06 -04:00
parent c569c916c0
commit 0acee60a3b
+14
View File
@@ -80,7 +80,21 @@ namespace MobileGL::MG_Remote::Server {
// Every MOBILEGL_TRANSPORT and MOBILEGL_IPC_* goes. Built BEFORE fork:
// between fork and execve only async-signal-safe calls are allowed, and
// allocating a vector of strings is not one of them.
//
// EXCEPT A KNOB ONLY THE SERVER READS, named here one by one. P7 wave 4 M2's
// MOBILEGL_IPC_WIRE_DEFERRED_MB bounds the server's own orphaned wire buffer stores;
// nothing in the client reads it, so scrubbing it did not make the child safer - it made
// the knob mean something under inproc and silently nothing under spawn, the worst of
// the three states (the tcp server reads its supervisor's environment, as for every
// knob). It names no endpoint, no role and no segment size, so neither anti-recursion
// catch has anything to say about it.
bool ShouldScrub(const char* entry) {
static constexpr const char* kServerOwned[] = {"MOBILEGL_IPC_WIRE_DEFERRED_MB="};
for (const char* kept : kServerOwned) {
if (std::strncmp(entry, kept, std::strlen(kept)) == 0) {
return false;
}
}
static constexpr const char* kPrefixes[] = {"MOBILEGL_TRANSPORT=", "MOBILEGL_IPC_"};
for (const char* prefix : kPrefixes) {
if (std::strncmp(entry, prefix, std::strlen(prefix)) == 0) {