@smoothbricks/nx-plugin 0.7.14 → 0.7.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -3
- package/dist/.build-inputs.json +7 -6
- package/dist/executors/bounded-exec/child-exit-diagnostics.d.ts +45 -0
- package/dist/executors/bounded-exec/child-exit-diagnostics.d.ts.map +1 -0
- package/dist/executors/bounded-exec/child-exit-diagnostics.js +188 -0
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +10 -1
- package/dist/executors/bounded-exec/host-memory.d.ts +11 -0
- package/dist/executors/bounded-exec/host-memory.d.ts.map +1 -1
- package/dist/executors/bounded-exec/host-memory.darwin.d.ts.map +1 -1
- package/dist/executors/bounded-exec/host-memory.darwin.js +1 -0
- package/dist/executors/bounded-exec/host-memory.linux.d.ts +3 -1
- package/dist/executors/bounded-exec/host-memory.linux.d.ts.map +1 -1
- package/dist/executors/bounded-exec/host-memory.linux.js +16 -1
- package/dist/executors/bounded-exec/ram-temp.d.ts.map +1 -1
- package/dist/executors/bounded-exec/ram-temp.js +5 -0
- package/dist/managed-files/publish-workflow.js +3 -1
- package/managed/templates/github/actions/setup-devenv/action.yml +31 -13
- package/package.json +6 -1
- package/src/executors/bounded-exec/child-exit-diagnostics.ts +87 -0
- package/src/executors/bounded-exec/executor.ts +10 -1
- package/src/executors/bounded-exec/host-memory.darwin.ts +1 -0
- package/src/executors/bounded-exec/host-memory.linux.ts +25 -2
- package/src/executors/bounded-exec/host-memory.ts +7 -0
- package/src/executors/bounded-exec/ram-temp.ts +4 -0
- package/src/managed-files/publish-workflow.ts +3 -0
- package/test-timings.json +138 -137
package/README.md
CHANGED
|
@@ -2391,9 +2391,10 @@ named in the task's error instead. The task finds these disks, and the one it de
|
|
|
2391
2391
|
Registry (an `IOHDIXHDDriveOutKernel` entry per RAM disk, with its size, its owner uid and the `FullName` of each of its
|
|
2392
2392
|
volumes) and their mounts in the mount table, never in `hdiutil info`: measured 2026-10-22, `hdiutil info` left an
|
|
2393
2393
|
attached RAM disk out of 2 of 10 listings while other images attached and detached, and a disk left out would read as
|
|
2394
|
-
absent.
|
|
2395
|
-
|
|
2396
|
-
|
|
2394
|
+
absent. Only registered drive entries count: a departed entry and its retained BSD names authorize no cleanup. A
|
|
2395
|
+
registry read that does not parse whole fails the task instead. A BSD name passes to the next disk once its disk goes,
|
|
2396
|
+
so every RAM detach is gateway-owned and bound to an exact device and registry entry: a provisioning rollback releases
|
|
2397
|
+
its `ram-lease`, or, when a gateway restart lost that lease, sends the typed `ram-detach` every other detach is
|
|
2397
2398
|
(specs/cowshed/05_gateway.md, "RAM disks"). The gateway revalidates that identity inside its own lease before spawning
|
|
2398
2399
|
the native tool. It uses no force; a busy owned staging volume stays in place with its named refusal. A requester or its
|
|
2399
2400
|
job ending cannot kill this protected mutation. Authoritative terminal, proven not-started and unknown outcomes remain
|
|
@@ -2493,6 +2494,15 @@ and says so. A host CI scope's first run of a task it holds no record of is the
|
|
|
2493
2494
|
release workflow's CI's) and takes, at each run, the record of every task the scope lacks
|
|
2494
2495
|
(`specs/cowshed/05_gateway.md`, "Without mbx, every Nx run budgets itself").
|
|
2495
2496
|
|
|
2497
|
+
A child-runtime owner can diagnose a death without guessing from its WebSocket close. `bounded-exec` passes the
|
|
2498
|
+
memory-bearing grant's immutable charge/bound and its installed observer module URL through
|
|
2499
|
+
`BOUNDED_EXEC_MEMORY_DIAGNOSTICS` / `BOUNDED_EXEC_DIAGNOSTICS_MODULE`. `observeChildMemory(pid, context)` returns a
|
|
2500
|
+
stop-and-snapshot function called at the child's exit: the last readable, timestamped RSS and the existing bound's live
|
|
2501
|
+
anon/shmem reading at exit. An unavailable reading carries its reason. Nested sub-pools retain the memory-bearing
|
|
2502
|
+
ancestor's facts; these fields never change admission, runner sizing or retry policy. The runtime owner adds the actual
|
|
2503
|
+
exit code/signal and prints its structured diagnostic before its existing crash handling. See 05_gateway's “A dead child
|
|
2504
|
+
keeps its diagnosis”; a SIGKILL without kernel evidence is not an OOM verdict.
|
|
2505
|
+
|
|
2496
2506
|
The pool runs on a worker thread of its own (`cpu-pool-thread.ts`). The process that serves the run, the Nx daemon when
|
|
2497
2507
|
installed plugins load in it or the Nx CLI without one, hashes tasks and builds the project graph in synchronous calls
|
|
2498
2508
|
on its main thread; a pool on that thread wrote no heartbeat behind a 14.2 s `hashPlans`, and every runner queued on it
|
|
@@ -2909,6 +2919,16 @@ profile directory containing its Cargo shim before launching real Cargo, so the
|
|
|
2909
2919
|
remain available for declared tools such as the macOS linker (`specs/cowshed/16_build_volumes.md`, "One Cargo
|
|
2910
2920
|
environment on every path").
|
|
2911
2921
|
|
|
2922
|
+
For host CI matrix jobs, pass `cache-scope` to `./.github/actions/setup-devenv`, for example
|
|
2923
|
+
`cache-scope: test-${{ matrix.id }}`. Use the same stable identity in the workflow's push and pull-request legs. A blank
|
|
2924
|
+
input preserves `github.job` and every existing nonmatrix path. The identity isolates Nx artifacts and metadata,
|
|
2925
|
+
devenv/direnv state, the stable work root and Cargo target; it is hashed, not used as a filesystem path. The generated
|
|
2926
|
+
macOS architecture matrix passes `macos-platform-${{ matrix.arch }}`. Task records seed from that same identity in the
|
|
2927
|
+
starting push scope, including when `records-workflow` selects another workflow; an explicit `records-job` selects a
|
|
2928
|
+
different source identity without changing this job's paths. Each scope keeps its own records once measured
|
|
2929
|
+
([CI cache ownership](../../specs/cowshed/10_ci.md#cache-and-setup-ownership-in-the-workflow),
|
|
2930
|
+
[host scheduling](../../specs/cowshed/05_gateway.md#host-scheduling)).
|
|
2931
|
+
|
|
2912
2932
|
### Workflow security and bounded execution
|
|
2913
2933
|
|
|
2914
2934
|
Managed action references use full commit SHAs with their release tags in comments. Read-only jobs explicitly set
|
package/dist/.build-inputs.json
CHANGED
|
@@ -37,16 +37,17 @@
|
|
|
37
37
|
"packages/nx-plugin/src/executors/all-verdicts/schema.ts": "2ca6bd8d2f19d851f291ab6a5227167399b9dc8ed0fda0248b69896d77e471f1",
|
|
38
38
|
"packages/nx-plugin/src/executors/bounded-exec/admission-queue.ts": "86664180f8296032f7c96022a790285799e666d92360a10b7a5cc6f3facd58eb",
|
|
39
39
|
"packages/nx-plugin/src/executors/bounded-exec/bounds.ts": "fecc48ea66df1c2ba526dc0322ab7760cfc1a4e85d99a72a7a43f040448970f0",
|
|
40
|
+
"packages/nx-plugin/src/executors/bounded-exec/child-exit-diagnostics.ts": "fdcd4e074577814d9b7b9d014d2c39297e9c763bd570d9fab0db172349e039b2",
|
|
40
41
|
"packages/nx-plugin/src/executors/bounded-exec/cpu-grant.ts": "c5217349c23be537d9b6a0a52445f3ee442402fdbd08f1d33a3095c52051616d",
|
|
41
42
|
"packages/nx-plugin/src/executors/bounded-exec/cpu-pool-thread.ts": "47697a9531df5fd6fcdf4e706fc7e5874bca1717c838496673bf148c691f1e9e",
|
|
42
43
|
"packages/nx-plugin/src/executors/bounded-exec/cpu-pool.ts": "bc122174ccf628b769c73197b7a78987d033b5e7ea6cb5ddbeac384310fdd22a",
|
|
43
44
|
"packages/nx-plugin/src/executors/bounded-exec/disk-lease.ts": "1a3f6a6fa590d9a2550490bb6906dc91b6c05fbef235b025eaf257eb5310e92d",
|
|
44
|
-
"packages/nx-plugin/src/executors/bounded-exec/executor.ts": "
|
|
45
|
+
"packages/nx-plugin/src/executors/bounded-exec/executor.ts": "0840b55ecbb2e12b0a9821513a786f5f027b93cf940606ca4f2a11fde4a38c31",
|
|
45
46
|
"packages/nx-plugin/src/executors/bounded-exec/gateway-lease.ts": "f3f73bd92db30e4857f98fb8bd2b9a75b2a5a2a318f094e075ed803c1f9a0117",
|
|
46
47
|
"packages/nx-plugin/src/executors/bounded-exec/hang-diagnostics.ts": "bcaa9e52384f6c481a9cc2835ba6e8ffe167afa3cb51623fdf8dc3493876f335",
|
|
47
|
-
"packages/nx-plugin/src/executors/bounded-exec/host-memory.darwin.ts": "
|
|
48
|
-
"packages/nx-plugin/src/executors/bounded-exec/host-memory.linux.ts": "
|
|
49
|
-
"packages/nx-plugin/src/executors/bounded-exec/host-memory.ts": "
|
|
48
|
+
"packages/nx-plugin/src/executors/bounded-exec/host-memory.darwin.ts": "fe89fc99f85f48caec7c614cfd976c362253b9707797c2c849a3aa9664e65dbe",
|
|
49
|
+
"packages/nx-plugin/src/executors/bounded-exec/host-memory.linux.ts": "752519893ed6fc3b9d7d17b0b0801d7103129f7a838743d129057debf043f0c1",
|
|
50
|
+
"packages/nx-plugin/src/executors/bounded-exec/host-memory.ts": "d3eef7fb06bf259f0f7f7dc67fc7f246a39adf5e4e80850fd4565e91626b1ec5",
|
|
50
51
|
"packages/nx-plugin/src/executors/bounded-exec/leaf-peak.ts": "0b1b94992b2cbb9e3759785424ceb202667053c5571edf3a79cdd0b206e54a1d",
|
|
51
52
|
"packages/nx-plugin/src/executors/bounded-exec/lease-wait.ts": "59d8ac94d0b8b75858971c5bb28ee421fca4f7685577274fe8bbaf0c01ba462a",
|
|
52
53
|
"packages/nx-plugin/src/executors/bounded-exec/lock-wait.ts": "b14a23b49759a777f4b3338ced003adaf76837c2c38462458f76a7fef1b95d9e",
|
|
@@ -66,7 +67,7 @@
|
|
|
66
67
|
"packages/nx-plugin/src/executors/bounded-exec/ram-detach.ts": "535d26114d14d0d94db76227ea7ba52b1ae0b590d7dbac22993b6796d255e666",
|
|
67
68
|
"packages/nx-plugin/src/executors/bounded-exec/ram-temp-fixtures.ts": "075da4ecfd1cf7dd98fc8c894599dcf2720faba07ac30b8e5592964178849359",
|
|
68
69
|
"packages/nx-plugin/src/executors/bounded-exec/ram-temp-held.ts": "7c32555bc6dab3f767925b55b68684d33a69393050342d06f055fb81e8e5332b",
|
|
69
|
-
"packages/nx-plugin/src/executors/bounded-exec/ram-temp.ts": "
|
|
70
|
+
"packages/nx-plugin/src/executors/bounded-exec/ram-temp.ts": "0364bc2a92baa3ae7febb7a2920df695cc56fe5956c79adfc7167e489efa78ec",
|
|
70
71
|
"packages/nx-plugin/src/executors/bounded-exec/run-cpu-pool.ts": "17148ca7a51aff54d9cbb01db558a828804b158f46e4d3d85d39449d2b644861",
|
|
71
72
|
"packages/nx-plugin/src/executors/bounded-exec/runner-hook.ts": "606eab5db826e571eb15df618315e01cc773d09fd647beb1c00f6434df58ffad",
|
|
72
73
|
"packages/nx-plugin/src/executors/bounded-exec/runner-lifecycle.ts": "b2a7c901296bb6c139909297bbdbab5bd00e94319c022307d006b0e1293f6454",
|
|
@@ -114,7 +115,7 @@
|
|
|
114
115
|
"packages/nx-plugin/src/managed-files/paths.ts": "0727cde9a3eea88420290b63cb4c9a3ffab857b39e0411eed3c4ddeb4e563745",
|
|
115
116
|
"packages/nx-plugin/src/managed-files/pr-preview-cleanup-workflow.ts": "0f34805a6d737f364c23801da62aefcd4afdc7ba87e911019dd6301be640b385",
|
|
116
117
|
"packages/nx-plugin/src/managed-files/private-npm-policy.ts": "795882f98b2c2434e7c0115e93a7b4c0da6142ae0602274b362893c49a46d5a7",
|
|
117
|
-
"packages/nx-plugin/src/managed-files/publish-workflow.ts": "
|
|
118
|
+
"packages/nx-plugin/src/managed-files/publish-workflow.ts": "4cb4a8417f09bbdd2aad1e3b5036d6f88c20c62ad64c3163cd0f0134de3e5170",
|
|
118
119
|
"packages/nx-plugin/src/managed-files/tree.ts": "a6b7dc515796a3824199938ce70af7d2b45347ed32064b487f3d5f381509dc54",
|
|
119
120
|
"packages/nx-plugin/src/manifest-hash.ts": "26cb2598853801cf70785386e1847feba7f04780b43809597004b7fb7ecbc2b6",
|
|
120
121
|
"packages/nx-plugin/src/nextest-code-bound.ts": "e1036934a35f1b65e0f43bddbea259e01a1100e553cdeaefc2db8823a4517340",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type LiveUsageReading, type ResidentUsageReading, type RunMemoryReading } from './host-memory.js';
|
|
2
|
+
/** Diagnostic facts, not configuration: neither value changes a grant or a runner's parallelism. */
|
|
3
|
+
export declare const DIAGNOSTIC_CONTEXT_ENV = "BOUNDED_EXEC_MEMORY_DIAGNOSTICS";
|
|
4
|
+
export declare const DIAGNOSTIC_MODULE_ENV = "BOUNDED_EXEC_DIAGNOSTICS_MODULE";
|
|
5
|
+
/** A sub-pool charges no memory: descendants retain the memory-bearing ancestor's facts. */
|
|
6
|
+
export declare function grantMemoryEnvironment(chargedBytes: number | null, inherited: Readonly<NodeJS.ProcessEnv>, readMemory?: () => Promise<RunMemoryReading>): Promise<Record<string, string>>;
|
|
7
|
+
export interface ResidentSample {
|
|
8
|
+
readonly sampledAtMs: number;
|
|
9
|
+
readonly reading: ResidentUsageReading;
|
|
10
|
+
}
|
|
11
|
+
/** The original grant plus the bound's live reading at exit, never a new accounting ledger. */
|
|
12
|
+
export declare function childExitMemory(contextText: string | undefined, lastResident: ResidentSample, readLive?: (bound: string) => LiveUsageReading): {
|
|
13
|
+
lastResident: ResidentSample;
|
|
14
|
+
pool: {
|
|
15
|
+
ok: false;
|
|
16
|
+
reason: string;
|
|
17
|
+
};
|
|
18
|
+
} | {
|
|
19
|
+
lastResident: ResidentSample;
|
|
20
|
+
pool: {
|
|
21
|
+
chargedBytes: number;
|
|
22
|
+
bound: RunMemoryReading;
|
|
23
|
+
reason?: undefined;
|
|
24
|
+
ok: true;
|
|
25
|
+
live: LiveUsageReading;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
/** Retains the last readable sample through PID exit; stop is called by the child's exit event. */
|
|
29
|
+
export declare function observeChildMemory(pid: number, contextText: string | undefined): () => {
|
|
30
|
+
lastResident: ResidentSample;
|
|
31
|
+
pool: {
|
|
32
|
+
ok: false;
|
|
33
|
+
reason: string;
|
|
34
|
+
};
|
|
35
|
+
} | {
|
|
36
|
+
lastResident: ResidentSample;
|
|
37
|
+
pool: {
|
|
38
|
+
chargedBytes: number;
|
|
39
|
+
bound: RunMemoryReading;
|
|
40
|
+
reason?: undefined;
|
|
41
|
+
ok: true;
|
|
42
|
+
live: LiveUsageReading;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=child-exit-diagnostics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"child-exit-diagnostics.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/child-exit-diagnostics.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EAGtB,MAAM,kBAAkB,CAAC;AAE1B,oGAAoG;AACpG,eAAO,MAAM,sBAAsB,oCAAoC,CAAC;AACxE,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AAQvE,4FAA4F;AAC5F,wBAAsB,sBAAsB,CAC1C,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,EACtC,UAAU,GAAE,MAAM,OAAO,CAAC,gBAAgB,CAAiB,GAC1D,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CASjC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;CACxC;AAED,+FAA+F;AAC/F,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,YAAY,EAAE,cAAc,EAC5B,QAAQ,GAAE,CAAC,KAAK,EAAE,MAAM,KAAK,gBAAgC;;;QAG5B,EAAE;QAAkB,MAAM;;;;;sBAjCpC,MAAM;eACb,gBAAgB;;;;;EAiDjC;AAED,mGAAmG;AACnG,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS;;;QApB5C,EAAE;QAAkB,MAAM;;;;;sBAjCpC,MAAM;eACb,gBAAgB;;;;;EAsEjC"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import * as _assertGuard_1 from "typia/lib/internal/_assertGuard";
|
|
2
|
+
import typia from 'typia';
|
|
3
|
+
import { HOST_MEMORY, readLiveUsage, readRunMemory, } from './host-memory.js';
|
|
4
|
+
/** Diagnostic facts, not configuration: neither value changes a grant or a runner's parallelism. */
|
|
5
|
+
export const DIAGNOSTIC_CONTEXT_ENV = 'BOUNDED_EXEC_MEMORY_DIAGNOSTICS';
|
|
6
|
+
export const DIAGNOSTIC_MODULE_ENV = 'BOUNDED_EXEC_DIAGNOSTICS_MODULE';
|
|
7
|
+
const parseContext = (() => {
|
|
8
|
+
let _errorFactory;
|
|
9
|
+
const _ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.chargedBytes || _assertGuard_1._assertGuard(_exceptionable, {
|
|
10
|
+
method: "typia.json.createAssertParse",
|
|
11
|
+
path: _path + ".chargedBytes",
|
|
12
|
+
expected: "number",
|
|
13
|
+
value: input.chargedBytes
|
|
14
|
+
}, _errorFactory)) && (("object" === typeof input.bound && null !== input.bound || _assertGuard_1._assertGuard(_exceptionable, {
|
|
15
|
+
method: "typia.json.createAssertParse",
|
|
16
|
+
path: _path + ".bound",
|
|
17
|
+
expected: "({ readonly ok: false; readonly error: RunMemoryError; } | { readonly ok: true; readonly memory: RunMemory; })",
|
|
18
|
+
value: input.bound
|
|
19
|
+
}, _errorFactory)) && _au0(input.bound, _path + ".bound", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
20
|
+
method: "typia.json.createAssertParse",
|
|
21
|
+
path: _path + ".bound",
|
|
22
|
+
expected: "({ readonly ok: false; readonly error: RunMemoryError; } | { readonly ok: true; readonly memory: RunMemory; })",
|
|
23
|
+
value: input.bound
|
|
24
|
+
}, _errorFactory));
|
|
25
|
+
const _ao1 = (input, _path, _exceptionable = true) => (true === input.ok || _assertGuard_1._assertGuard(_exceptionable, {
|
|
26
|
+
method: "typia.json.createAssertParse",
|
|
27
|
+
path: _path + ".ok",
|
|
28
|
+
expected: "true",
|
|
29
|
+
value: input.ok
|
|
30
|
+
}, _errorFactory)) && (("object" === typeof input.memory && null !== input.memory || _assertGuard_1._assertGuard(_exceptionable, {
|
|
31
|
+
method: "typia.json.createAssertParse",
|
|
32
|
+
path: _path + ".memory",
|
|
33
|
+
expected: "RunMemory",
|
|
34
|
+
value: input.memory
|
|
35
|
+
}, _errorFactory)) && _ao2(input.memory, _path + ".memory", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
36
|
+
method: "typia.json.createAssertParse",
|
|
37
|
+
path: _path + ".memory",
|
|
38
|
+
expected: "RunMemory",
|
|
39
|
+
value: input.memory
|
|
40
|
+
}, _errorFactory));
|
|
41
|
+
const _ao2 = (input, _path, _exceptionable = true) => ("number" === typeof input.bytes || _assertGuard_1._assertGuard(_exceptionable, {
|
|
42
|
+
method: "typia.json.createAssertParse",
|
|
43
|
+
path: _path + ".bytes",
|
|
44
|
+
expected: "number",
|
|
45
|
+
value: input.bytes
|
|
46
|
+
}, _errorFactory)) && ("string" === typeof input.source || _assertGuard_1._assertGuard(_exceptionable, {
|
|
47
|
+
method: "typia.json.createAssertParse",
|
|
48
|
+
path: _path + ".source",
|
|
49
|
+
expected: "string",
|
|
50
|
+
value: input.source
|
|
51
|
+
}, _errorFactory));
|
|
52
|
+
const _ao3 = (input, _path, _exceptionable = true) => (false === input.ok || _assertGuard_1._assertGuard(_exceptionable, {
|
|
53
|
+
method: "typia.json.createAssertParse",
|
|
54
|
+
path: _path + ".ok",
|
|
55
|
+
expected: "false",
|
|
56
|
+
value: input.ok
|
|
57
|
+
}, _errorFactory)) && (("object" === typeof input.error && null !== input.error || _assertGuard_1._assertGuard(_exceptionable, {
|
|
58
|
+
method: "typia.json.createAssertParse",
|
|
59
|
+
path: _path + ".error",
|
|
60
|
+
expected: "RunMemoryError",
|
|
61
|
+
value: input.error
|
|
62
|
+
}, _errorFactory)) && _ao4(input.error, _path + ".error", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
63
|
+
method: "typia.json.createAssertParse",
|
|
64
|
+
path: _path + ".error",
|
|
65
|
+
expected: "RunMemoryError",
|
|
66
|
+
value: input.error
|
|
67
|
+
}, _errorFactory));
|
|
68
|
+
const _ao4 = (input, _path, _exceptionable = true) => ("read-run-memory" === input.operation || _assertGuard_1._assertGuard(_exceptionable, {
|
|
69
|
+
method: "typia.json.createAssertParse",
|
|
70
|
+
path: _path + ".operation",
|
|
71
|
+
expected: "\"read-run-memory\"",
|
|
72
|
+
value: input.operation
|
|
73
|
+
}, _errorFactory)) && ("malformed" === input.code || "unmounted" === input.code || "unreadable" === input.code || "unsupported-platform" === input.code || _assertGuard_1._assertGuard(_exceptionable, {
|
|
74
|
+
method: "typia.json.createAssertParse",
|
|
75
|
+
path: _path + ".code",
|
|
76
|
+
expected: "(\"malformed\" | \"unmounted\" | \"unreadable\" | \"unsupported-platform\")",
|
|
77
|
+
value: input.code
|
|
78
|
+
}, _errorFactory)) && ("string" === typeof input.subject || _assertGuard_1._assertGuard(_exceptionable, {
|
|
79
|
+
method: "typia.json.createAssertParse",
|
|
80
|
+
path: _path + ".subject",
|
|
81
|
+
expected: "string",
|
|
82
|
+
value: input.subject
|
|
83
|
+
}, _errorFactory)) && ("string" === typeof input.cause || _assertGuard_1._assertGuard(_exceptionable, {
|
|
84
|
+
method: "typia.json.createAssertParse",
|
|
85
|
+
path: _path + ".cause",
|
|
86
|
+
expected: "string",
|
|
87
|
+
value: input.cause
|
|
88
|
+
}, _errorFactory));
|
|
89
|
+
const _au0 = (input, _path, _exceptionable = true) => (() => {
|
|
90
|
+
if (true === input.ok)
|
|
91
|
+
return _ao1(input, _path, true && _exceptionable);
|
|
92
|
+
else if (false === input.ok)
|
|
93
|
+
return _ao3(input, _path, true && _exceptionable);
|
|
94
|
+
else
|
|
95
|
+
return _assertGuard_1._assertGuard(_exceptionable, {
|
|
96
|
+
method: "typia.json.createAssertParse",
|
|
97
|
+
path: _path,
|
|
98
|
+
expected: "({ readonly ok: true; readonly memory: RunMemory; } | { readonly ok: false; readonly error: RunMemoryError; })",
|
|
99
|
+
value: input
|
|
100
|
+
}, _errorFactory);
|
|
101
|
+
})();
|
|
102
|
+
const _io0 = input => "number" === typeof input.chargedBytes && ("object" === typeof input.bound && null !== input.bound && _iu0(input.bound));
|
|
103
|
+
const _io1 = input => true === input.ok && ("object" === typeof input.memory && null !== input.memory && _io2(input.memory));
|
|
104
|
+
const _io2 = input => "number" === typeof input.bytes && "string" === typeof input.source;
|
|
105
|
+
const _io3 = input => false === input.ok && ("object" === typeof input.error && null !== input.error && _io4(input.error));
|
|
106
|
+
const _io4 = input => "read-run-memory" === input.operation && ("malformed" === input.code || "unmounted" === input.code || "unreadable" === input.code || "unsupported-platform" === input.code) && "string" === typeof input.subject && "string" === typeof input.cause;
|
|
107
|
+
const _iu0 = input => (() => {
|
|
108
|
+
if (true === input.ok)
|
|
109
|
+
return _io1(input);
|
|
110
|
+
else if (false === input.ok)
|
|
111
|
+
return _io3(input);
|
|
112
|
+
else
|
|
113
|
+
return false;
|
|
114
|
+
})();
|
|
115
|
+
const __is = input => "object" === typeof input && null !== input && _io0(input);
|
|
116
|
+
const __assert = (input, errorFactory) => {
|
|
117
|
+
if (false === __is(input)) {
|
|
118
|
+
_errorFactory = errorFactory;
|
|
119
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _assertGuard_1._assertGuard(true, {
|
|
120
|
+
method: "typia.json.createAssertParse",
|
|
121
|
+
path: _path + "",
|
|
122
|
+
expected: "GrantMemoryContext",
|
|
123
|
+
value: input
|
|
124
|
+
}, _errorFactory)) && _ao0(input, _path + "", true) || _assertGuard_1._assertGuard(true, {
|
|
125
|
+
method: "typia.json.createAssertParse",
|
|
126
|
+
path: _path + "",
|
|
127
|
+
expected: "GrantMemoryContext",
|
|
128
|
+
value: input
|
|
129
|
+
}, _errorFactory))(input, "$input", true);
|
|
130
|
+
}
|
|
131
|
+
return input;
|
|
132
|
+
};
|
|
133
|
+
return (input, errorFactory) => __assert(JSON.parse(input), errorFactory);
|
|
134
|
+
})();
|
|
135
|
+
/** A sub-pool charges no memory: descendants retain the memory-bearing ancestor's facts. */
|
|
136
|
+
export async function grantMemoryEnvironment(chargedBytes, inherited, readMemory = readRunMemory) {
|
|
137
|
+
if (chargedBytes === null) {
|
|
138
|
+
return {
|
|
139
|
+
[DIAGNOSTIC_CONTEXT_ENV]: inherited[DIAGNOSTIC_CONTEXT_ENV] ?? '',
|
|
140
|
+
[DIAGNOSTIC_MODULE_ENV]: inherited[DIAGNOSTIC_MODULE_ENV] ?? '',
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
const context = { chargedBytes, bound: await readMemory() };
|
|
144
|
+
return { [DIAGNOSTIC_CONTEXT_ENV]: JSON.stringify(context), [DIAGNOSTIC_MODULE_ENV]: import.meta.url };
|
|
145
|
+
}
|
|
146
|
+
/** The original grant plus the bound's live reading at exit, never a new accounting ledger. */
|
|
147
|
+
export function childExitMemory(contextText, lastResident, readLive = readLiveUsage) {
|
|
148
|
+
if (!contextText)
|
|
149
|
+
return { lastResident, pool: { ok: false, reason: 'no memory-bearing CPU grant was inherited' } };
|
|
150
|
+
let context;
|
|
151
|
+
try {
|
|
152
|
+
context = parseContext(contextText);
|
|
153
|
+
}
|
|
154
|
+
catch (error) {
|
|
155
|
+
return {
|
|
156
|
+
lastResident,
|
|
157
|
+
pool: {
|
|
158
|
+
ok: false,
|
|
159
|
+
reason: `invalid inherited memory diagnostic: ${error instanceof Error ? error.message : String(error)}`,
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
const live = context.bound.ok
|
|
164
|
+
? readLive(context.bound.memory.source)
|
|
165
|
+
: { ok: false, reason: `${context.bound.error.subject}: ${context.bound.error.cause}` };
|
|
166
|
+
return { lastResident, pool: { ok: true, ...context, live } };
|
|
167
|
+
}
|
|
168
|
+
/** Retains the last readable sample through PID exit; stop is called by the child's exit event. */
|
|
169
|
+
export function observeChildMemory(pid, contextText) {
|
|
170
|
+
const sample = () => ({
|
|
171
|
+
sampledAtMs: Date.now(),
|
|
172
|
+
reading: HOST_MEMORY?.residentUsage(pid) ?? {
|
|
173
|
+
ok: false,
|
|
174
|
+
reason: `${process.platform} has no per-process RSS reader`,
|
|
175
|
+
},
|
|
176
|
+
});
|
|
177
|
+
let lastResident = sample();
|
|
178
|
+
const timer = setInterval(() => {
|
|
179
|
+
const next = sample();
|
|
180
|
+
if (next.reading.ok || !lastResident.reading.ok)
|
|
181
|
+
lastResident = next;
|
|
182
|
+
}, 250);
|
|
183
|
+
timer.unref();
|
|
184
|
+
return () => {
|
|
185
|
+
clearInterval(timer);
|
|
186
|
+
return childExitMemory(contextText, lastResident);
|
|
187
|
+
};
|
|
188
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/executor.ts"],"names":[],"mappings":"AAeA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/executor.ts"],"names":[],"mappings":"AAeA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAM5E,OAAO,EAAE,sBAAsB,EAAmB,MAAM,uBAAuB,CAAC;AAahF,OAAO,EAAqB,KAAK,UAAU,EAA8B,MAAM,mBAAmB,CAAC;AAEnG,OAAO,EAOL,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAgB,KAAK,gBAAgB,EAAwB,MAAM,uBAAuB,CAAC;AAElG,OAAO,EASL,aAAa,EAEd,MAAM,eAAe,CAAC;AAIvB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAEL,KAAK,eAAe,EAcrB,MAAM,cAAc,CAAC;AAwBtB,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,wFAAwF;IACxF,MAAM,CAAC,EAAE;QAAE,IAA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;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAc5B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,kBAAkB,EAC3B,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,UAAU,GAAG,IAAI,GACzD,OAAO,CAAC,iBAAiB,CAAC,CAsB5B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,kBAAkB,CAiBxE;AAED;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,kBAAkB,EAC3B,MAAM,EAAE,iBAAiB,EACzB,UAAU,EAAE,UAAU,GAAG,IAAI,EAC7B,SAAS,GAAE,gBAAgB,GAAG,IAAW,EACzC,kBAAkB,GAAE,OAAO,sBAA+C,EAC1E,KAAK,GAAE,YAAY,GAAG,IAAW,EACjC,SAAS,CAAC,EAAE,SAAS,GACpB,OAAO,CAAC,iBAAiB,CAAC,CAe5B;AA0lCD,wBAAgB,uBAAuB,IAAI,iBAAiB,CAM3D"}
|
|
@@ -9,6 +9,7 @@ import { workspaceDataDirectoryForWorkspace } from 'nx/src/utils/cache-directory
|
|
|
9
9
|
import { DEADLINE_PATIENCE, describeMembersLeft, killProcessGroup, processGroupHasMembers, signalProcessGroup, } from '../../process-group.js';
|
|
10
10
|
import { AdmissionObservation } from './admission-queue.js';
|
|
11
11
|
import { earliestBound, stepBounds, UNARMED } from './bounds.js';
|
|
12
|
+
import { DIAGNOSTIC_CONTEXT_ENV, DIAGNOSTIC_MODULE_ENV, grantMemoryEnvironment } from './child-exit-diagnostics.js';
|
|
12
13
|
import { createCpuPool } from './cpu-pool.js';
|
|
13
14
|
import { GATEWAY_SOCKET } from './gateway-lease.js';
|
|
14
15
|
import { captureHangDiagnostics, HANG_CAPTURE_MS } from './hang-diagnostics.js';
|
|
@@ -37,7 +38,14 @@ const POOL_ENV = [CPU_TOKENS_ENV, CPU_POOL_ENV];
|
|
|
37
38
|
* itself inherits, a parent make's or its cowshed job's, still reaches an ungranted command by Cargo's own rule; a
|
|
38
39
|
* granted one's sub-pool names its own fifo over it.
|
|
39
40
|
*/
|
|
40
|
-
const BUDGET_ENV = [
|
|
41
|
+
const BUDGET_ENV = [
|
|
42
|
+
...POOL_ENV,
|
|
43
|
+
'CARGO_MAKEFLAGS',
|
|
44
|
+
'MAKEFLAGS',
|
|
45
|
+
'MFLAGS',
|
|
46
|
+
DIAGNOSTIC_CONTEXT_ENV,
|
|
47
|
+
DIAGNOSTIC_MODULE_ENV,
|
|
48
|
+
];
|
|
41
49
|
/** Workspace-provided cowshed launchers, in the order a workspace that provides one names them. */
|
|
42
50
|
const WORKSPACE_COWSHED_LAUNCHERS = [
|
|
43
51
|
'packages/cowshed/bin/cowshed',
|
|
@@ -535,6 +543,7 @@ async function runCommand(options, context, killer, tempVolume, inherited, captu
|
|
|
535
543
|
...sized.env,
|
|
536
544
|
...native.env,
|
|
537
545
|
...(pool?.environment ?? {}),
|
|
546
|
+
...(await grantMemoryEnvironment(grant?.charged ?? null, process.env)),
|
|
538
547
|
...(leaf?.kind === 'cargo' ? { MBX_GRANT_FD: String(MBX_GRANT_FD) } : {}),
|
|
539
548
|
};
|
|
540
549
|
// A fixture rides as segment 0 of the lifecycle. Without the channel (Windows) it is plain shell text ahead
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
export interface HostMemory {
|
|
7
7
|
/** The memory the run's pool charges its leaves' peaks against. */
|
|
8
8
|
readRunMemory(): Promise<RunMemoryReading>;
|
|
9
|
+
/** One process's resident set for an exit diagnostic; unavailable is never a zero RSS sample. */
|
|
10
|
+
residentUsage(pid: number): ResidentUsageReading;
|
|
9
11
|
/**
|
|
10
12
|
* A leaf's peak in bytes, from the `maxRSS` that Bun's `Subprocess.resourceUsage()` on `bunVersion` reports for
|
|
11
13
|
* it: the exited leaf's `ru_maxrss`.
|
|
@@ -39,6 +41,15 @@ export type LiveUsageReading = {
|
|
|
39
41
|
readonly ok: false;
|
|
40
42
|
readonly reason: string;
|
|
41
43
|
};
|
|
44
|
+
/** A process's resident bytes and source, or why no sample could be read. */
|
|
45
|
+
export type ResidentUsageReading = {
|
|
46
|
+
readonly ok: true;
|
|
47
|
+
readonly bytes: number;
|
|
48
|
+
readonly source: string;
|
|
49
|
+
} | {
|
|
50
|
+
readonly ok: false;
|
|
51
|
+
readonly reason: string;
|
|
52
|
+
};
|
|
42
53
|
/** The run's memory in bytes, and where it was read: the file or sysctl that holds it. */
|
|
43
54
|
export interface RunMemory {
|
|
44
55
|
readonly bytes: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-memory.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/host-memory.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,mEAAmE;IACnE,aAAa,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC3C;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IACtD;;;;;OAKG;IACH,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD;;;;;OAKG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAAC;CAC5C;AAED,wEAAwE;AACxE,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAA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AAE,MAAM,CAAC;CACzB;AAED,4FAA4F;AAC5F,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;IACtC;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,sBAAsB,CAAC;IACjF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAAE,GACjD;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAA;CAAE,CAAC;AAE3D,sFAAsF;AACtF,qBAAa,mBAAoB,SAAQ,KAAK;IAChC,QAAQ,CAAC,KAAK,EAAE,cAAc;IAA1C,YAAqB,KAAK,EAAE,cAAc,EAKzC;CACF;AAID,kGAAkG;AAClG,eAAO,MAAM,WAAW,EAAE,UAAU,GAAG,IAA0C,CAAC;AAElF,mEAAmE;AACnE,wBAAgB,aAAa,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAazD;AAED,4GAA4G;AAC5G,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAI7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-memory.darwin.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/host-memory.darwin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AAqIrE,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"host-memory.darwin.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/host-memory.darwin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,kBAAkB,CAAC;AAqIrE,eAAO,MAAM,YAAY,EAAE,UAO1B,CAAC"}
|
|
@@ -103,6 +103,7 @@ export const darwinMemory = {
|
|
|
103
103
|
readRunMemory,
|
|
104
104
|
peakBytes: (maxRss) => maxRss,
|
|
105
105
|
treeResidentBytes,
|
|
106
|
+
residentUsage: () => ({ ok: false, reason: 'Node has no macOS per-process RSS reader' }),
|
|
106
107
|
// macOS has no cgroup, and its anonymous and shared pages are not read from a file the pool may open.
|
|
107
108
|
liveUsage: () => ({ ok: false, reason: 'macOS keeps no anonymous and shared memory of a run to read' }),
|
|
108
109
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HostMemory, LiveUsageReading, RunMemoryReading } from './host-memory.js';
|
|
1
|
+
import type { HostMemory, LiveUsageReading, ResidentUsageReading, RunMemoryReading } from './host-memory.js';
|
|
2
2
|
/** A file's text, or the errno code and message its read failed with. */
|
|
3
3
|
export type FileRead = {
|
|
4
4
|
readonly ok: true;
|
|
@@ -12,5 +12,7 @@ export type FileRead = {
|
|
|
12
12
|
export declare function linuxRunMemory(read: (path: string) => Promise<FileRead>): Promise<RunMemoryReading>;
|
|
13
13
|
/** The memory a bound holds live: `memory.stat`'s `anon` and `shmem` beside a cgroup's `memory.max`, meminfo's `AnonPages` and `Shmem` for the host's. */
|
|
14
14
|
export declare function linuxLiveUsage(read: (path: string) => FileRead, bound: string): LiveUsageReading;
|
|
15
|
+
/** The same VmRSS field the peak waiter reads, without turning an unreadable or exited PID into zero. */
|
|
16
|
+
export declare function linuxResidentUsage(read: (path: string) => FileRead, pid: number): ResidentUsageReading;
|
|
15
17
|
export declare const linuxMemory: HostMemory;
|
|
16
18
|
//# sourceMappingURL=host-memory.linux.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-memory.linux.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/host-memory.linux.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"host-memory.linux.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/host-memory.linux.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EAGpB,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAc1B,yEAAyE;AACzE,MAAM,MAAM,QAAQ,GAChB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC5C;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AA2B5E,2DAA2D;AAC3D,wBAAsB,cAAc,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA8CzG;AAWD,0JAA0J;AAC1J,wBAAgB,cAAc,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAuBhG;AAuDD,yGAAyG;AACzG,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAQtG;AAED,eAAO,MAAM,WAAW,EAAE,UAMzB,CAAC"}
|
|
@@ -168,12 +168,27 @@ async function residentBytes(pid) {
|
|
|
168
168
|
return 0;
|
|
169
169
|
throw error;
|
|
170
170
|
}
|
|
171
|
-
const kib =
|
|
171
|
+
const kib = residentKib(status);
|
|
172
172
|
return kib === undefined ? 0 : Number(kib) * 1024;
|
|
173
173
|
}
|
|
174
|
+
function residentKib(status) {
|
|
175
|
+
return /^VmRSS:\s+(\d+) kB$/m.exec(status)?.[1];
|
|
176
|
+
}
|
|
177
|
+
/** The same VmRSS field the peak waiter reads, without turning an unreadable or exited PID into zero. */
|
|
178
|
+
export function linuxResidentUsage(read, pid) {
|
|
179
|
+
const source = `/proc/${pid}/status`;
|
|
180
|
+
const status = read(source);
|
|
181
|
+
if (!status.ok)
|
|
182
|
+
return { ok: false, reason: `${source}: ${status.code}: ${status.message}` };
|
|
183
|
+
const kib = residentKib(status.text);
|
|
184
|
+
return kib === undefined
|
|
185
|
+
? { ok: false, reason: `${source} names no VmRSS in kB` }
|
|
186
|
+
: { ok: true, bytes: Number(kib) * 1024, source };
|
|
187
|
+
}
|
|
174
188
|
export const linuxMemory = {
|
|
175
189
|
readRunMemory: () => linuxRunMemory(readText),
|
|
176
190
|
peakBytes,
|
|
177
191
|
treeResidentBytes,
|
|
192
|
+
residentUsage: (pid) => linuxResidentUsage(readTextSync, pid),
|
|
178
193
|
liveUsage: (bound) => linuxLiveUsage(readTextSync, bound),
|
|
179
194
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ram-temp.d.ts","sourceRoot":"","sources":["../../../src/executors/bounded-exec/ram-temp.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAe,KAAK,UAAU,EAAgC,MAAM,iBAAiB,CAAC;AAE7F,OAAO,EAEL,KAAK,WAAW,EAEhB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAW5B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAqIpD;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,QAA6C,CAAC;AASlF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,8EAA8E;AAC9E,eAAO,MAAM,8BAA8B,QAA2C,CAAC;AAEvF,yFAAyF;AACzF,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3E;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AG,YAAY,CAAC,EAC1E,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,GACnC,OAAO,EAAE,CAWX;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,EACzC,IAAI,EAAE,eAAe,EACrB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAGxC;AA2BD,8FAA8F;AAC9F,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,aAAa,EACvB,aAAa,CAAC,EAAE,MAAM,GACrB;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,WAAW,GAAG,cAAc,CAAA;CAAE,GAAG,IAAI,CAenE;AAeD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,MAAM,EACrB,iBAAiB,GAAE,MAAiC,EACpD,WAAW,GAAE,UAA4B,EACzC,OAAO,SAAmD,GACzD,YAAY,CAoDd"}
|
|
@@ -2051,6 +2051,11 @@ export function ramDisksIn(registry, table) {
|
|
|
2051
2051
|
if (!header.startsWith('+-o ') || entryId === undefined) {
|
|
2052
2052
|
return { ok: false, error: `not an IOHDIXHDDriveOutKernel entry: ${header.slice(0, 160)}` };
|
|
2053
2053
|
}
|
|
2054
|
+
if (/, !registered,/.test(header))
|
|
2055
|
+
continue;
|
|
2056
|
+
if (!/, registered,/.test(header)) {
|
|
2057
|
+
return { ok: false, error: `an entry has no registration state: ${header.slice(0, 160)}` };
|
|
2058
|
+
}
|
|
2054
2059
|
// The entry's own properties end at its first child; only they name its image and owner.
|
|
2055
2060
|
const firstChild = entry.indexOf('+-o ', header.length);
|
|
2056
2061
|
const own = entry.slice(header.length, firstChild === -1 ? undefined : firstChild);
|
|
@@ -829,7 +829,9 @@ function renderMacosPlatformSteps(options) {
|
|
|
829
829
|
if (siblingSourceCheckouts.length > 0) {
|
|
830
830
|
lines.push('', ` # Step ${stepNumber++}`, ...siblingSourceCheckouts);
|
|
831
831
|
}
|
|
832
|
-
lines.push('', ` # Step ${stepNumber++}. Composite action internals do not affect top-level job step`, ' # anchors; update these comments if top-level steps move.', ' - name: 🧱 Setup Nix/devenv', ' id: setup', ...setupDevenvUsesLines())
|
|
832
|
+
lines.push('', ` # Step ${stepNumber++}. Composite action internals do not affect top-level job step`, ' # anchors; update these comments if top-level steps move.', ' - name: 🧱 Setup Nix/devenv', ' id: setup', ...setupDevenvUsesLines(), ...(macosPlatformArchitectures(options).length >= 2
|
|
833
|
+
? [` cache-scope: macos-platform-${githubExpression('matrix.arch')}`]
|
|
834
|
+
: []));
|
|
833
835
|
if (isSmoothBricksCodebasePackageName(options.repoName)) {
|
|
834
836
|
lines.push('', ` # Step ${stepNumber++}`, ' - name: 🏗️ Build smoo Nx version actions', ' # Nx Release loads @smoothbricks/nx-plugin/version-actions through the', ' # export map in its own node process, and versioning runs before the', ' # build phase, so the hook must exist in dist first. Downstream', ' # consumers install the published package and skip this bootstrap.', ' #', ' # `nx` cannot do it: the project graph loads this very plugin, so', ' # `nx build nx-plugin` deadlocks on the executor it is building.', ' # ttsc needs only the package tsconfig -- the bootstrap the shell entry', ' # runs (tooling/direnv/enter-shell.ts) -- and emits as the typescript-emit', ' # executor does (EMIT_OVERRIDES), so dist holds no build info.', ' working-directory: packages/nx-plugin', ' run: bun ../../tooling/ttsc-emit.ts');
|
|
835
837
|
}
|
|
@@ -6,6 +6,14 @@ description: >
|
|
|
6
6
|
actions cache: store paths and the Nix database come back as files, so no NAR is imported and no daemon is needed.
|
|
7
7
|
|
|
8
8
|
inputs:
|
|
9
|
+
cache-scope:
|
|
10
|
+
description: >
|
|
11
|
+
The job identity for mutable host caches and stable workspace paths. Set a distinct stable identity per matrix
|
|
12
|
+
leg. Blank means github.job, preserving existing paths. Starting push records use the same identity unless
|
|
13
|
+
records-job names another one. Identities contain only ASCII letters, digits, underscores, dots, slashes and
|
|
14
|
+
hyphens.
|
|
15
|
+
required: false
|
|
16
|
+
default: ''
|
|
9
17
|
records-workflow:
|
|
10
18
|
description: >
|
|
11
19
|
The workflow whose pushes keep the bounded-exec task records this job's scope starts from, for a workflow whose
|
|
@@ -13,7 +21,7 @@ inputs:
|
|
|
13
21
|
required: false
|
|
14
22
|
default: ''
|
|
15
23
|
records-job:
|
|
16
|
-
description: The job of that workflow. Blank means this job.
|
|
24
|
+
description: The job or cache-scope identity of that workflow. Blank means this job's cache scope.
|
|
17
25
|
required: false
|
|
18
26
|
default: ''
|
|
19
27
|
|
|
@@ -115,7 +123,7 @@ runs:
|
|
|
115
123
|
env:
|
|
116
124
|
NX_CACHE_BIND: /var/cache/ci/nx
|
|
117
125
|
NX_CACHE_REPO: ${{ github.repository }}
|
|
118
|
-
|
|
126
|
+
CACHE_SCOPE: ${{ inputs.cache-scope || github.job }}
|
|
119
127
|
SCOPE_REF: ${{ github.event.pull_request.number || github.ref }}
|
|
120
128
|
# A pull request's base branch, whose pushes run under refs/heads/<it>;
|
|
121
129
|
# empty for a push.
|
|
@@ -125,24 +133,24 @@ runs:
|
|
|
125
133
|
RECORDS_WORKFLOW: ${{ inputs.records-workflow }}
|
|
126
134
|
RECORDS_JOB: ${{ inputs.records-job }}
|
|
127
135
|
run: |
|
|
136
|
+
if [[ ! "$CACHE_SCOPE" =~ ^[a-zA-Z0-9_./-]+$ ]]; then
|
|
137
|
+
printf '%s\n' 'cache-scope must be a single-line job or matrix identity (letters, digits, _ . / -)' >&2
|
|
138
|
+
exit 2
|
|
139
|
+
fi
|
|
128
140
|
# A workflow's directory under the shared bind: its name, slugged.
|
|
129
141
|
lane_of() { printf '%s' "$1" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9._-' '-'; }
|
|
130
|
-
|
|
131
|
-
# The cache root of the run identity SCOPE_REF names.
|
|
142
|
+
# The cache root of workflow $1, job or matrix identity $2, and ref $3.
|
|
132
143
|
scope_root() {
|
|
133
|
-
|
|
144
|
+
lane=$(lane_of "$1")
|
|
145
|
+
scope=$(printf '%s\0%s\0%s\0%s\0%s' "$1" "$3" "$2" "$RUNNER_OS" "$RUNNER_ARCH" | git hash-object --stdin)
|
|
134
146
|
printf '%s' "$NX_CACHE_BIND/$NX_CACHE_REPO/${lane:-default}/$scope"
|
|
135
147
|
}
|
|
136
|
-
NX_CACHE_ROOT=$(scope_root)
|
|
148
|
+
NX_CACHE_ROOT=$(scope_root "$GITHUB_WORKFLOW" "$CACHE_SCOPE" "$SCOPE_REF")
|
|
137
149
|
records="$NX_CACHE_ROOT/workspace-data/bounded-exec"
|
|
138
|
-
# The cache root of the scope that job $2 of workflow $1 runs the pushes to ref $3 in.
|
|
139
|
-
scope_root_of() {
|
|
140
|
-
lane=$(lane_of "$1") GITHUB_WORKFLOW="$1" GITHUB_JOB="$2" SCOPE_REF="$3" scope_root
|
|
141
|
-
}
|
|
142
150
|
from_workflow=${RECORDS_WORKFLOW:-$GITHUB_WORKFLOW}
|
|
143
151
|
from_ref=${BASE_REF:+refs/heads/$BASE_REF}
|
|
144
152
|
from_ref=${from_ref:-$SCOPE_REF}
|
|
145
|
-
from=$(
|
|
153
|
+
from=$(scope_root "$from_workflow" "${RECORDS_JOB:-$CACHE_SCOPE}" "$from_ref")
|
|
146
154
|
if [ "$from" != "$NX_CACHE_ROOT" ]; then
|
|
147
155
|
copied=0
|
|
148
156
|
for verdict in "$from"/workspace-data/bounded-exec/*/verdict.json; do
|
|
@@ -212,10 +220,15 @@ runs:
|
|
|
212
220
|
DEVENV_STATE_REPO: ${{ github.repository }}
|
|
213
221
|
DEVENV_STATE_LANE: ${{ github.workflow }}
|
|
214
222
|
DEVENV_STATE_JOB: ${{ github.job }}
|
|
223
|
+
CACHE_SCOPE: ${{ inputs.cache-scope || github.job }}
|
|
215
224
|
SCOPE_REF: ${{ github.event.pull_request.number || github.ref }}
|
|
216
225
|
run: |
|
|
226
|
+
if [[ ! "$CACHE_SCOPE" =~ ^[a-zA-Z0-9_./-]+$ ]]; then
|
|
227
|
+
printf '%s\n' 'cache-scope must be a single-line job or matrix identity (letters, digits, _ . / -)' >&2
|
|
228
|
+
exit 2
|
|
229
|
+
fi
|
|
217
230
|
lane=$(printf '%s' "$DEVENV_STATE_LANE" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9._-' '-')
|
|
218
|
-
scope=$(printf '%s\0%s\0%s\0%s\0%s' "$GITHUB_WORKFLOW" "$SCOPE_REF" "$
|
|
231
|
+
scope=$(printf '%s\0%s\0%s\0%s\0%s' "$GITHUB_WORKFLOW" "$SCOPE_REF" "$CACHE_SCOPE" "$RUNNER_OS" "$RUNNER_ARCH" | git hash-object --stdin)
|
|
219
232
|
root="/var/cache/ci/devenv/$DEVENV_STATE_REPO/${lane:-default}/$DEVENV_STATE_JOB/$scope"
|
|
220
233
|
mkdir -p "$root/.devenv" "$root/.direnv"
|
|
221
234
|
rm -rf tooling/direnv/.devenv tooling/direnv/.direnv
|
|
@@ -251,10 +264,15 @@ runs:
|
|
|
251
264
|
CARGO_TARGET_BIND: /var/cache/ci/cargo-target
|
|
252
265
|
CARGO_TARGET_REPO: ${{ github.repository }}
|
|
253
266
|
CARGO_TARGET_LANE: ${{ github.workflow }}
|
|
267
|
+
CACHE_SCOPE: ${{ inputs.cache-scope || github.job }}
|
|
254
268
|
SCOPE_REF: ${{ github.event.pull_request.number || github.ref }}
|
|
255
269
|
run: |
|
|
270
|
+
if [[ ! "$CACHE_SCOPE" =~ ^[a-zA-Z0-9_./-]+$ ]]; then
|
|
271
|
+
printf '%s\n' 'cache-scope must be a single-line job or matrix identity (letters, digits, _ . / -)' >&2
|
|
272
|
+
exit 2
|
|
273
|
+
fi
|
|
256
274
|
lane=$(printf '%s' "$CARGO_TARGET_LANE" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9._-' '-')
|
|
257
|
-
scope=$(printf '%s\0%s\0%s\0%s\0%s' "$GITHUB_WORKFLOW" "$SCOPE_REF" "$
|
|
275
|
+
scope=$(printf '%s\0%s\0%s\0%s\0%s' "$GITHUB_WORKFLOW" "$SCOPE_REF" "$CACHE_SCOPE" "$RUNNER_OS" "$RUNNER_ARCH" | git hash-object --stdin)
|
|
258
276
|
root="$CARGO_TARGET_BIND/$CARGO_TARGET_REPO/${lane:-default}/$scope"
|
|
259
277
|
target="$DEVENV_WORKDIR/target"
|
|
260
278
|
if mkdir -p "$root" "$target" && sudo mount --bind "$root" "$target"; then
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smoothbricks/nx-plugin",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./loader.js",
|
|
@@ -33,6 +33,11 @@
|
|
|
33
33
|
"import": "./dist/bounded-test-policy.js",
|
|
34
34
|
"default": "./dist/bounded-test-policy.js"
|
|
35
35
|
},
|
|
36
|
+
"./bounded-exec-diagnostics": {
|
|
37
|
+
"types": "./dist/executors/bounded-exec/child-exit-diagnostics.d.ts",
|
|
38
|
+
"import": "./dist/executors/bounded-exec/child-exit-diagnostics.js",
|
|
39
|
+
"default": "./dist/executors/bounded-exec/child-exit-diagnostics.js"
|
|
40
|
+
},
|
|
36
41
|
"./test-results": {
|
|
37
42
|
"types": "./dist/executors/bounded-exec/test-results.d.ts",
|
|
38
43
|
"import": "./dist/executors/bounded-exec/test-results.js",
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import typia from 'typia';
|
|
2
|
+
import {
|
|
3
|
+
HOST_MEMORY,
|
|
4
|
+
type LiveUsageReading,
|
|
5
|
+
type ResidentUsageReading,
|
|
6
|
+
type RunMemoryReading,
|
|
7
|
+
readLiveUsage,
|
|
8
|
+
readRunMemory,
|
|
9
|
+
} from './host-memory.js';
|
|
10
|
+
|
|
11
|
+
/** Diagnostic facts, not configuration: neither value changes a grant or a runner's parallelism. */
|
|
12
|
+
export const DIAGNOSTIC_CONTEXT_ENV = 'BOUNDED_EXEC_MEMORY_DIAGNOSTICS';
|
|
13
|
+
export const DIAGNOSTIC_MODULE_ENV = 'BOUNDED_EXEC_DIAGNOSTICS_MODULE';
|
|
14
|
+
|
|
15
|
+
interface GrantMemoryContext {
|
|
16
|
+
readonly chargedBytes: number;
|
|
17
|
+
readonly bound: RunMemoryReading;
|
|
18
|
+
}
|
|
19
|
+
const parseContext = typia.json.createAssertParse<GrantMemoryContext>();
|
|
20
|
+
|
|
21
|
+
/** A sub-pool charges no memory: descendants retain the memory-bearing ancestor's facts. */
|
|
22
|
+
export async function grantMemoryEnvironment(
|
|
23
|
+
chargedBytes: number | null,
|
|
24
|
+
inherited: Readonly<NodeJS.ProcessEnv>,
|
|
25
|
+
readMemory: () => Promise<RunMemoryReading> = readRunMemory,
|
|
26
|
+
): Promise<Record<string, string>> {
|
|
27
|
+
if (chargedBytes === null) {
|
|
28
|
+
return {
|
|
29
|
+
[DIAGNOSTIC_CONTEXT_ENV]: inherited[DIAGNOSTIC_CONTEXT_ENV] ?? '',
|
|
30
|
+
[DIAGNOSTIC_MODULE_ENV]: inherited[DIAGNOSTIC_MODULE_ENV] ?? '',
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const context: GrantMemoryContext = { chargedBytes, bound: await readMemory() };
|
|
34
|
+
return { [DIAGNOSTIC_CONTEXT_ENV]: JSON.stringify(context), [DIAGNOSTIC_MODULE_ENV]: import.meta.url };
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ResidentSample {
|
|
38
|
+
readonly sampledAtMs: number;
|
|
39
|
+
readonly reading: ResidentUsageReading;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** The original grant plus the bound's live reading at exit, never a new accounting ledger. */
|
|
43
|
+
export function childExitMemory(
|
|
44
|
+
contextText: string | undefined,
|
|
45
|
+
lastResident: ResidentSample,
|
|
46
|
+
readLive: (bound: string) => LiveUsageReading = readLiveUsage,
|
|
47
|
+
) {
|
|
48
|
+
if (!contextText)
|
|
49
|
+
return { lastResident, pool: { ok: false as const, reason: 'no memory-bearing CPU grant was inherited' } };
|
|
50
|
+
let context: GrantMemoryContext;
|
|
51
|
+
try {
|
|
52
|
+
context = parseContext(contextText);
|
|
53
|
+
} catch (error) {
|
|
54
|
+
return {
|
|
55
|
+
lastResident,
|
|
56
|
+
pool: {
|
|
57
|
+
ok: false as const,
|
|
58
|
+
reason: `invalid inherited memory diagnostic: ${error instanceof Error ? error.message : String(error)}`,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
const live: LiveUsageReading = context.bound.ok
|
|
63
|
+
? readLive(context.bound.memory.source)
|
|
64
|
+
: { ok: false, reason: `${context.bound.error.subject}: ${context.bound.error.cause}` };
|
|
65
|
+
return { lastResident, pool: { ok: true as const, ...context, live } };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** Retains the last readable sample through PID exit; stop is called by the child's exit event. */
|
|
69
|
+
export function observeChildMemory(pid: number, contextText: string | undefined) {
|
|
70
|
+
const sample = (): ResidentSample => ({
|
|
71
|
+
sampledAtMs: Date.now(),
|
|
72
|
+
reading: HOST_MEMORY?.residentUsage(pid) ?? {
|
|
73
|
+
ok: false,
|
|
74
|
+
reason: `${process.platform} has no per-process RSS reader`,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
let lastResident = sample();
|
|
78
|
+
const timer = setInterval(() => {
|
|
79
|
+
const next = sample();
|
|
80
|
+
if (next.reading.ok || !lastResident.reading.ok) lastResident = next;
|
|
81
|
+
}, 250);
|
|
82
|
+
timer.unref();
|
|
83
|
+
return () => {
|
|
84
|
+
clearInterval(timer);
|
|
85
|
+
return childExitMemory(contextText, lastResident);
|
|
86
|
+
};
|
|
87
|
+
}
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
} from '../../process-group.js';
|
|
16
16
|
import { AdmissionObservation, type QueueHost } from './admission-queue.js';
|
|
17
17
|
import { type BoundEvent, type BoundKind, type Bounds, earliestBound, stepBounds, UNARMED } from './bounds.js';
|
|
18
|
+
import { DIAGNOSTIC_CONTEXT_ENV, DIAGNOSTIC_MODULE_ENV, grantMemoryEnvironment } from './child-exit-diagnostics.js';
|
|
18
19
|
import { type CpuPool, createCpuPool } from './cpu-pool.js';
|
|
19
20
|
import { GATEWAY_SOCKET } from './gateway-lease.js';
|
|
20
21
|
import type { HangDiagnostics } from './hang-diagnostics.js';
|
|
@@ -94,7 +95,14 @@ const POOL_ENV = [CPU_TOKENS_ENV, CPU_POOL_ENV];
|
|
|
94
95
|
* itself inherits, a parent make's or its cowshed job's, still reaches an ungranted command by Cargo's own rule; a
|
|
95
96
|
* granted one's sub-pool names its own fifo over it.
|
|
96
97
|
*/
|
|
97
|
-
const BUDGET_ENV = [
|
|
98
|
+
const BUDGET_ENV = [
|
|
99
|
+
...POOL_ENV,
|
|
100
|
+
'CARGO_MAKEFLAGS',
|
|
101
|
+
'MAKEFLAGS',
|
|
102
|
+
'MFLAGS',
|
|
103
|
+
DIAGNOSTIC_CONTEXT_ENV,
|
|
104
|
+
DIAGNOSTIC_MODULE_ENV,
|
|
105
|
+
];
|
|
98
106
|
|
|
99
107
|
export interface BoundedExecContext {
|
|
100
108
|
root: string;
|
|
@@ -730,6 +738,7 @@ async function runCommand(
|
|
|
730
738
|
...sized.env,
|
|
731
739
|
...native.env,
|
|
732
740
|
...(pool?.environment ?? {}),
|
|
741
|
+
...(await grantMemoryEnvironment(grant?.charged ?? null, process.env)),
|
|
733
742
|
...(leaf?.kind === 'cargo' ? { MBX_GRANT_FD: String(MBX_GRANT_FD) } : {}),
|
|
734
743
|
};
|
|
735
744
|
// A fixture rides as segment 0 of the lifecycle. Without the channel (Windows) it is plain shell text ahead
|
|
@@ -136,6 +136,7 @@ export const darwinMemory: HostMemory = {
|
|
|
136
136
|
readRunMemory,
|
|
137
137
|
peakBytes: (maxRss) => maxRss,
|
|
138
138
|
treeResidentBytes,
|
|
139
|
+
residentUsage: () => ({ ok: false, reason: 'Node has no macOS per-process RSS reader' }),
|
|
139
140
|
// macOS has no cgroup, and its anonymous and shared pages are not read from a file the pool may open.
|
|
140
141
|
liveUsage: () => ({ ok: false, reason: 'macOS keeps no anonymous and shared memory of a run to read' }),
|
|
141
142
|
};
|
|
@@ -2,7 +2,14 @@ import { readFileSync } from 'node:fs';
|
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
3
|
import { posix } from 'node:path';
|
|
4
4
|
import { childPids } from '../../process-children.linux.js';
|
|
5
|
-
import type {
|
|
5
|
+
import type {
|
|
6
|
+
HostMemory,
|
|
7
|
+
LiveUsageReading,
|
|
8
|
+
ResidentUsageReading,
|
|
9
|
+
RunMemory,
|
|
10
|
+
RunMemoryError,
|
|
11
|
+
RunMemoryReading,
|
|
12
|
+
} from './host-memory.js';
|
|
6
13
|
|
|
7
14
|
/**
|
|
8
15
|
* Linux's memory mechanisms. The run's memory is the least of the host's `MemTotal` and every finite `memory.max` of
|
|
@@ -175,13 +182,29 @@ async function residentBytes(pid: number): Promise<number> {
|
|
|
175
182
|
if (error instanceof Error && 'code' in error && (error.code === 'ENOENT' || error.code === 'ESRCH')) return 0;
|
|
176
183
|
throw error;
|
|
177
184
|
}
|
|
178
|
-
const kib =
|
|
185
|
+
const kib = residentKib(status);
|
|
179
186
|
return kib === undefined ? 0 : Number(kib) * 1024;
|
|
180
187
|
}
|
|
181
188
|
|
|
189
|
+
function residentKib(status: string): string | undefined {
|
|
190
|
+
return /^VmRSS:\s+(\d+) kB$/m.exec(status)?.[1];
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/** The same VmRSS field the peak waiter reads, without turning an unreadable or exited PID into zero. */
|
|
194
|
+
export function linuxResidentUsage(read: (path: string) => FileRead, pid: number): ResidentUsageReading {
|
|
195
|
+
const source = `/proc/${pid}/status`;
|
|
196
|
+
const status = read(source);
|
|
197
|
+
if (!status.ok) return { ok: false, reason: `${source}: ${status.code}: ${status.message}` };
|
|
198
|
+
const kib = residentKib(status.text);
|
|
199
|
+
return kib === undefined
|
|
200
|
+
? { ok: false, reason: `${source} names no VmRSS in kB` }
|
|
201
|
+
: { ok: true, bytes: Number(kib) * 1024, source };
|
|
202
|
+
}
|
|
203
|
+
|
|
182
204
|
export const linuxMemory: HostMemory = {
|
|
183
205
|
readRunMemory: () => linuxRunMemory(readText),
|
|
184
206
|
peakBytes,
|
|
185
207
|
treeResidentBytes,
|
|
208
|
+
residentUsage: (pid) => linuxResidentUsage(readTextSync, pid),
|
|
186
209
|
liveUsage: (bound) => linuxLiveUsage(readTextSync, bound),
|
|
187
210
|
};
|
|
@@ -9,6 +9,8 @@ import { linuxMemory } from './host-memory.linux.js';
|
|
|
9
9
|
export interface HostMemory {
|
|
10
10
|
/** The memory the run's pool charges its leaves' peaks against. */
|
|
11
11
|
readRunMemory(): Promise<RunMemoryReading>;
|
|
12
|
+
/** One process's resident set for an exit diagnostic; unavailable is never a zero RSS sample. */
|
|
13
|
+
residentUsage(pid: number): ResidentUsageReading;
|
|
12
14
|
/**
|
|
13
15
|
* A leaf's peak in bytes, from the `maxRSS` that Bun's `Subprocess.resourceUsage()` on `bunVersion` reports for
|
|
14
16
|
* it: the exited leaf's `ru_maxrss`.
|
|
@@ -41,6 +43,11 @@ export type LiveUsageReading =
|
|
|
41
43
|
| { readonly ok: true; readonly usage: LiveUsage }
|
|
42
44
|
| { readonly ok: false; readonly reason: string };
|
|
43
45
|
|
|
46
|
+
/** A process's resident bytes and source, or why no sample could be read. */
|
|
47
|
+
export type ResidentUsageReading =
|
|
48
|
+
| { readonly ok: true; readonly bytes: number; readonly source: string }
|
|
49
|
+
| { readonly ok: false; readonly reason: string };
|
|
50
|
+
|
|
44
51
|
/** The run's memory in bytes, and where it was read: the file or sysctl that holds it. */
|
|
45
52
|
export interface RunMemory {
|
|
46
53
|
readonly bytes: number;
|
|
@@ -2612,6 +2612,10 @@ export function ramDisksIn(registry: string, table: string): Result<RamDisk[], s
|
|
|
2612
2612
|
if (!header.startsWith('+-o ') || entryId === undefined) {
|
|
2613
2613
|
return { ok: false, error: `not an IOHDIXHDDriveOutKernel entry: ${header.slice(0, 160)}` };
|
|
2614
2614
|
}
|
|
2615
|
+
if (/, !registered,/.test(header)) continue;
|
|
2616
|
+
if (!/, registered,/.test(header)) {
|
|
2617
|
+
return { ok: false, error: `an entry has no registration state: ${header.slice(0, 160)}` };
|
|
2618
|
+
}
|
|
2615
2619
|
// The entry's own properties end at its first child; only they name its image and owner.
|
|
2616
2620
|
const firstChild = entry.indexOf('+-o ', header.length);
|
|
2617
2621
|
const own = entry.slice(header.length, firstChild === -1 ? undefined : firstChild);
|
|
@@ -1169,6 +1169,9 @@ function renderMacosPlatformSteps(options: PublishWorkflowDefinitionOptions): st
|
|
|
1169
1169
|
' - name: 🧱 Setup Nix/devenv',
|
|
1170
1170
|
' id: setup',
|
|
1171
1171
|
...setupDevenvUsesLines(),
|
|
1172
|
+
...(macosPlatformArchitectures(options).length >= 2
|
|
1173
|
+
? [` cache-scope: macos-platform-${githubExpression('matrix.arch')}`]
|
|
1174
|
+
: []),
|
|
1172
1175
|
);
|
|
1173
1176
|
if (isSmoothBricksCodebasePackageName(options.repoName)) {
|
|
1174
1177
|
lines.push(
|
package/test-timings.json
CHANGED
|
@@ -2,149 +2,150 @@
|
|
|
2
2
|
"version": 1,
|
|
3
3
|
"files": {
|
|
4
4
|
"src/executors/bounded-exec/go-progress-host.test.ts": 113358,
|
|
5
|
-
"src/
|
|
6
|
-
"src/
|
|
7
|
-
"src/
|
|
5
|
+
"src/ensure-built.test.ts": 70082,
|
|
6
|
+
"src/executors/typescript-emit/executor.test.ts": 44826,
|
|
7
|
+
"src/nx-daemon-validity.test.ts": 43285,
|
|
8
|
+
"src/executors/bounded-exec/executor.test.ts": 40109,
|
|
8
9
|
"src/executors/bounded-exec/cargo-progress-host.test.ts": 38973,
|
|
9
|
-
"src/
|
|
10
|
-
"src/
|
|
11
|
-
"src/executors/bounded-exec/run-cpu-pool.test.ts":
|
|
12
|
-
"src/
|
|
13
|
-
"src/ensure-built-receipt.test.ts":
|
|
14
|
-
"src/
|
|
15
|
-
"src/
|
|
16
|
-
"src/cargo-
|
|
17
|
-
"src/
|
|
18
|
-
"src/cargo-
|
|
19
|
-
"src/
|
|
20
|
-
"src/
|
|
21
|
-
"src/
|
|
22
|
-
"src/task-
|
|
23
|
-
"src/
|
|
24
|
-
"src/nx-
|
|
25
|
-
"src/
|
|
26
|
-
"src/
|
|
27
|
-
"src/
|
|
28
|
-
"src/
|
|
29
|
-
"src/
|
|
30
|
-
"src/
|
|
31
|
-
"src/
|
|
32
|
-
"src/
|
|
33
|
-
"src/
|
|
34
|
-
"src/
|
|
35
|
-
"src/nx-
|
|
36
|
-
"src/
|
|
37
|
-
"src/
|
|
38
|
-
"src/
|
|
39
|
-
"src/nx-
|
|
40
|
-
"src/
|
|
41
|
-
"src/
|
|
42
|
-
"src/nx-
|
|
43
|
-
"src/
|
|
44
|
-
"src/
|
|
45
|
-
"src/nx-critical-path-schedule.test.ts":
|
|
46
|
-
"src/
|
|
47
|
-
"src/
|
|
48
|
-
"src/
|
|
49
|
-
"src/
|
|
50
|
-
"src/
|
|
51
|
-
"src/
|
|
52
|
-
"src/
|
|
53
|
-
"src/
|
|
54
|
-
"src/
|
|
55
|
-
"src/
|
|
56
|
-
"src/
|
|
57
|
-
"src/
|
|
58
|
-
"src/
|
|
59
|
-
"src/
|
|
60
|
-
"src/
|
|
61
|
-
"src/
|
|
62
|
-
"src/
|
|
63
|
-
"src/
|
|
64
|
-
"src/
|
|
65
|
-
"src/
|
|
66
|
-
"src/
|
|
67
|
-
"src/
|
|
68
|
-
"src/
|
|
69
|
-
"src/
|
|
70
|
-
"src/nx-
|
|
71
|
-
"src/
|
|
72
|
-
"src/
|
|
73
|
-
"src/
|
|
74
|
-
"src/
|
|
75
|
-
"src/
|
|
76
|
-
"src/
|
|
77
|
-
"src/
|
|
78
|
-
"src/
|
|
79
|
-
"src/
|
|
80
|
-
"src/
|
|
81
|
-
"src/
|
|
82
|
-
"src/
|
|
83
|
-
"src/
|
|
84
|
-
"src/
|
|
85
|
-
"src/
|
|
86
|
-
"src/
|
|
87
|
-
"src/executors/
|
|
88
|
-
"src/
|
|
89
|
-
"src/
|
|
90
|
-
"src/
|
|
91
|
-
"src/
|
|
92
|
-
"src/
|
|
93
|
-
"src/
|
|
94
|
-
"src/
|
|
95
|
-
"src/executors/bounded-exec/
|
|
96
|
-
"src/
|
|
97
|
-
"src/
|
|
98
|
-
"src/
|
|
99
|
-
"src/
|
|
100
|
-
"src/workspace-config-policy.test.ts":
|
|
101
|
-
"src/
|
|
102
|
-
"src/
|
|
103
|
-
"src/
|
|
104
|
-
"src/
|
|
105
|
-
"src/managed-files/
|
|
106
|
-
"src/executors/bounded-exec/
|
|
107
|
-
"src/
|
|
108
|
-
"src/
|
|
109
|
-
"src/
|
|
110
|
-
"src/
|
|
111
|
-
"src/executors/bounded-exec/
|
|
112
|
-
"src/
|
|
10
|
+
"src/nextest-partitions.test.ts": 36611,
|
|
11
|
+
"src/cargo-resolve-cache.test.ts": 20025,
|
|
12
|
+
"src/executors/bounded-exec/run-cpu-pool.test.ts": 19052,
|
|
13
|
+
"src/linked-snapshots.nx.test.ts": 17026,
|
|
14
|
+
"src/ensure-built-receipt.test.ts": 15880,
|
|
15
|
+
"src/process-group.test.ts": 15352,
|
|
16
|
+
"src/index.test.ts": 15133,
|
|
17
|
+
"src/cargo-source-hash.test.ts": 12215,
|
|
18
|
+
"src/cargo-retention.test.ts": 10686,
|
|
19
|
+
"src/cargo-closure-input.test.ts": 9328,
|
|
20
|
+
"src/managed-files/repo-path.test.ts": 8962,
|
|
21
|
+
"src/nx-daemon-claim.test.ts": 8359,
|
|
22
|
+
"src/managed-files/forgejo-artifact.test.ts": 7370,
|
|
23
|
+
"src/managed-files/setup-devenv-task-records.test.ts": 6855,
|
|
24
|
+
"src/nx-daemon-idle-policy.test.ts": 6475,
|
|
25
|
+
"src/nx-daemon-start-never.test.ts": 5775,
|
|
26
|
+
"src/executors/bounded-exec/ram-temp.test.ts": 5690,
|
|
27
|
+
"src/bounded-test-policy.test.ts": 5522,
|
|
28
|
+
"src/task-results.test.ts": 4930,
|
|
29
|
+
"src/nx-dot-input-policy.test.ts": 4878,
|
|
30
|
+
"src/serial-group-wiring.test.ts": 4764,
|
|
31
|
+
"src/bin/smoo-nx-bound-failures.test.ts": 4406,
|
|
32
|
+
"src/nx-daemon-ignore-files.test.ts": 3890,
|
|
33
|
+
"src/executors/bounded-exec/hang-diagnostics.test.ts": 3781,
|
|
34
|
+
"src/cargo-closure-key.test.ts": 3482,
|
|
35
|
+
"src/testing.test.ts": 3249,
|
|
36
|
+
"src/nx-task-output-lease.test.ts": 3242,
|
|
37
|
+
"src/managed-files/generator.test.ts": 2902,
|
|
38
|
+
"src/cargo-workspace.test.ts": 2843,
|
|
39
|
+
"src/nx-cache-restore-mtime.test.ts": 2722,
|
|
40
|
+
"src/nx-remote-cache-outage.test.ts": 2702,
|
|
41
|
+
"src/runtime-input.test.ts": 2595,
|
|
42
|
+
"src/managed-files/unserved-workspace-hooks.test.ts": 2550,
|
|
43
|
+
"src/nx-daemon-watch-filter.test.ts": 2538,
|
|
44
|
+
"src/executors/bounded-exec/verdict.test.ts": 2499,
|
|
45
|
+
"src/task-history-namespace.test.ts": 2420,
|
|
46
|
+
"src/nx-critical-path-schedule.test.ts": 2283,
|
|
47
|
+
"src/nx-skipped-task-exit.test.ts": 2280,
|
|
48
|
+
"src/nx-project-graph-errors.test.ts": 2264,
|
|
49
|
+
"src/nx-daemon-env-identity.test.ts": 2260,
|
|
50
|
+
"src/managed-files/managed-format-json.test.ts": 2169,
|
|
51
|
+
"src/managed-files/github-host-cache-isolation.test.ts": 2149,
|
|
52
|
+
"src/typecheck-test-policy.test.ts": 1691,
|
|
53
|
+
"src/nx-cache-kept-outputs.test.ts": 1656,
|
|
54
|
+
"src/nx-plugin-load-errors.test.ts": 1563,
|
|
55
|
+
"src/nx-foreign-workspace-env.test.ts": 1536,
|
|
56
|
+
"src/typescript-resolution.test.ts": 1463,
|
|
57
|
+
"src/owned-installation.test.ts": 1458,
|
|
58
|
+
"src/cargo-build-script-env.test.ts": 1451,
|
|
59
|
+
"src/graph-input-contract.test.ts": 1423,
|
|
60
|
+
"src/cargo-child-kill.test.ts": 1412,
|
|
61
|
+
"src/nx-resident-graph-workers.test.ts": 1394,
|
|
62
|
+
"src/nx-use-local.test.ts": 1393,
|
|
63
|
+
"src/cross-check-policy.test.ts": 1322,
|
|
64
|
+
"src/executors/bounded-exec/test-results-run.test.ts": 1300,
|
|
65
|
+
"src/task-graph-policy.nx.test.ts": 1242,
|
|
66
|
+
"src/managed-files/cache-ttsc-plugins.test.ts": 1113,
|
|
67
|
+
"src/executors/all-verdicts/executor.test.ts": 957,
|
|
68
|
+
"src/nextest-code-bound.test.ts": 957,
|
|
69
|
+
"src/nx-files-archive-racy.test.ts": 869,
|
|
70
|
+
"src/nx-local-plugin-hook-env.test.ts": 657,
|
|
71
|
+
"src/nx-raw-inputs.test.ts": 622,
|
|
72
|
+
"src/nx-daemon-root-normalization.test.ts": 561,
|
|
73
|
+
"src/test-walk-policy.test.ts": 561,
|
|
74
|
+
"src/nx-cache-bound.test.ts": 529,
|
|
75
|
+
"src/bun-bootstrap.test.ts": 521,
|
|
76
|
+
"src/nx-incomplete-run-summary.test.ts": 515,
|
|
77
|
+
"src/package-target-policy.test.ts": 515,
|
|
78
|
+
"src/test-timings.test.ts": 468,
|
|
79
|
+
"src/executors/bounded-exec/runner-hook.test.ts": 433,
|
|
80
|
+
"src/built-output-packages.test.ts": 432,
|
|
81
|
+
"src/managed-files/devenv-wrapper.test.ts": 423,
|
|
82
|
+
"src/ensure-built-witness.test.ts": 394,
|
|
83
|
+
"src/nx-store-resolution.test.ts": 376,
|
|
84
|
+
"src/nx-failure-life-cycles.test.ts": 360,
|
|
85
|
+
"src/lock-scope.test.ts": 313,
|
|
86
|
+
"src/managed-files/setup-devenv-stable-path.test.ts": 289,
|
|
87
|
+
"src/test-clock-policy.test.ts": 284,
|
|
88
|
+
"src/executors/bounded-exec/cpu-pool.test.ts": 270,
|
|
89
|
+
"src/forbidden-spelling-policy.test.ts": 250,
|
|
90
|
+
"src/executors/cargo-zigbuild/executor.test.ts": 245,
|
|
91
|
+
"src/executors/bounded-exec/pool-sim.property.test.ts": 223,
|
|
92
|
+
"src/cargo-closure-filesets.test.ts": 163,
|
|
93
|
+
"src/managed-files/setup-devenv-free-disk.test.ts": 131,
|
|
94
|
+
"src/executors/bounded-exec/mbx-pool.test.ts": 128,
|
|
95
|
+
"src/executors/bounded-exec/runtime-pin.test.ts": 115,
|
|
96
|
+
"src/executors/bounded-exec/host-memory.test.ts": 107,
|
|
97
|
+
"src/executors/scriptc-native/executor.test.ts": 101,
|
|
98
|
+
"src/release-config-policy.test.ts": 80,
|
|
99
|
+
"src/generators/make-public/generator.test.ts": 78,
|
|
100
|
+
"src/producer-receipts.test.ts": 77,
|
|
101
|
+
"src/workspace-config-policy.test.ts": 75,
|
|
102
|
+
"src/nx-state-location.test.ts": 72,
|
|
103
|
+
"src/executors/wrangler-deploy/executor.test.ts": 67,
|
|
104
|
+
"src/version-actions.test.ts": 65,
|
|
105
|
+
"src/manifest-hash.test.ts": 63,
|
|
106
|
+
"src/managed-files/tree-permissions.test.ts": 62,
|
|
107
|
+
"src/executors/bounded-exec/runner-sizing.test.ts": 59,
|
|
108
|
+
"src/eslint-sources.test.ts": 52,
|
|
109
|
+
"src/wait-why-policy.test.ts": 47,
|
|
110
|
+
"src/executors/wrangler-deploy/hasher.test.ts": 46,
|
|
111
|
+
"src/executors/bounded-exec/ram-detach.test.ts": 44,
|
|
112
|
+
"src/executors/bounded-exec/mbx-reservations.test.ts": 43,
|
|
113
|
+
"src/executors/bounded-exec/pool-admission.test.ts": 43,
|
|
114
|
+
"src/executors/bounded-exec/ram-provenance.test.ts": 41,
|
|
115
|
+
"src/managed-files/trace-db-artifact.test.ts": 40,
|
|
116
|
+
"src/cargo-toolchain-paths.test.ts": 28,
|
|
113
117
|
"src/executors/nextest-group/executor.test.ts": 28,
|
|
114
|
-
"src/generators/
|
|
115
|
-
"src/
|
|
116
|
-
"src/managed-files/
|
|
117
|
-
"src/executors/bounded-exec/disk-lease.test.ts":
|
|
118
|
-
"src/
|
|
119
|
-
"src/
|
|
120
|
-
"src/
|
|
121
|
-
"src/
|
|
122
|
-
"src/executors/bounded-exec/
|
|
123
|
-
"src/executors/bounded-exec/
|
|
124
|
-
"src/
|
|
125
|
-
"src/
|
|
126
|
-
"src/executors/bounded-exec/
|
|
127
|
-
"src/executors/bounded-exec/
|
|
128
|
-
"src/executors/bounded-exec/
|
|
129
|
-
"src/
|
|
130
|
-
"src/
|
|
131
|
-
"src/
|
|
132
|
-
"src/
|
|
133
|
-
"src/host-controller-wiring.test.ts": 13,
|
|
118
|
+
"src/generators/bun-test-tracing/generator.test.ts": 25,
|
|
119
|
+
"src/generators/create-package/generator.test.ts": 24,
|
|
120
|
+
"src/managed-files/tree.test.ts": 22,
|
|
121
|
+
"src/executors/bounded-exec/disk-lease.test.ts": 21,
|
|
122
|
+
"src/generators/bounded-test-targets/generator.test.ts": 21,
|
|
123
|
+
"src/managed-files/json-edit.test.ts": 21,
|
|
124
|
+
"src/build-state-output-policy.test.ts": 20,
|
|
125
|
+
"src/executors/bounded-exec/mbx-queue.test.ts": 19,
|
|
126
|
+
"src/executors/bounded-exec/lock-wait.test.ts": 18,
|
|
127
|
+
"src/executors/bounded-exec/test-results.test.ts": 18,
|
|
128
|
+
"src/cargo-closure-input.property.test.ts": 17,
|
|
129
|
+
"src/nx-daemon-idle-cpu.test.ts": 17,
|
|
130
|
+
"src/executors/bounded-exec/executor-key.test.ts": 15,
|
|
131
|
+
"src/executors/bounded-exec/progress.test.ts": 15,
|
|
132
|
+
"src/executors/bounded-exec/runner-lifecycle.test.ts": 15,
|
|
133
|
+
"src/host-controller-wiring.test.ts": 14,
|
|
134
|
+
"src/nx-task-graph-cycles.test.ts": 14,
|
|
135
|
+
"src/task-graph-policy.test.ts": 14,
|
|
136
|
+
"src/cargo-retention-hook.test.ts": 12,
|
|
134
137
|
"src/disk-command-policy.test.ts": 12,
|
|
135
|
-
"src/
|
|
136
|
-
"src/executors/bounded-exec/
|
|
138
|
+
"src/nx-project-resolution-cache.test.ts": 12,
|
|
139
|
+
"src/executors/bounded-exec/ram-fixture.test.ts": 11,
|
|
137
140
|
"src/nx-run-information.test.ts": 11,
|
|
141
|
+
"src/test-program.test.ts": 11,
|
|
142
|
+
"src/bun-file-packages.test.ts": 10,
|
|
143
|
+
"src/executors/bounded-exec/child-exit-diagnostics.test.ts": 10,
|
|
144
|
+
"src/managed-files/managed-content.test.ts": 10,
|
|
138
145
|
"src/nx-depends-on-configuration.test.ts": 10,
|
|
139
|
-
"src/
|
|
140
|
-
"src/nx-task-graph-cycles.test.ts": 9,
|
|
141
|
-
"src/bun-file-packages.test.ts": 8,
|
|
142
|
-
"src/executors/bounded-exec/host-memory.linux.test.ts": 8,
|
|
143
|
-
"src/executors/bounded-exec/pool-admission.test.ts": 8,
|
|
144
|
-
"src/managed-files/tree-permissions.test.ts": 8,
|
|
145
|
-
"src/managed-files/tree.test.ts": 8,
|
|
146
|
+
"src/executors/bounded-exec/ram-temp-held.test.ts": 8,
|
|
146
147
|
"src/executors/bounded-exec/bounds.test.ts": 7,
|
|
147
148
|
"src/executors/bounded-exec/owned-subtree.test.ts": 7,
|
|
148
|
-
"src/
|
|
149
|
+
"src/executors/bounded-exec/host-memory.linux.test.ts": 6
|
|
149
150
|
}
|
|
150
151
|
}
|