@ai-ecoverse/slicc-kernel 1.134.0 → 1.134.2
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 +3 -3
- package/dist/kernel-worker.js +19 -9
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +9 -4
- package/dist/node-process-worker.js.map +3 -3
- package/dist/node.js +20 -9
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +9 -4
- package/dist/process-worker.js.map +3 -3
- package/dist/types/kernel/wasm-memories.d.ts +1 -0
- package/dist/types/node.d.ts +4 -0
- package/dist/types/process/js/js-context.d.ts +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1096,8 +1096,8 @@ The kernel writes `/etc/passwd` and `/etc/group` when it starts (see [Users](#us
|
|
|
1096
1096
|
### How many processes at once
|
|
1097
1097
|
|
|
1098
1098
|
In a browser every process worker of the page shares one renderer. V8 reserves about 8 GiB of address space for each 32-bit wasm memory, whatever its declared maximum, and its sandbox holds about 1 TiB. So a page runs about 125 wasm processes (or programs that own a wasm memory) at once, counting everything in the renderer (#970). Node has no such ceiling, and neither does Linux. The kernel keeps processes inside that ceiling:
|
|
1099
|
-
- **The ceiling:** 112 by default in a browser and none in Node. It's the kernel's count of live wasm processes, with the kernel's other wasm memories in the page left outside it. When an instantiation runs out of memory anyway, the kernel learns the real ceiling at that moment (the live count minus one), and that learned value wins over the default. A learned ceiling is never below 16, since an OOM at a low count means something outside it (another tab in the same renderer) filled the renderer. It's raised by 8 for each minute without another OOM, back to the default.
|
|
1100
|
-
- **Admission:** a spawn, fork, exec or `kernel.run` at the ceiling waits for another process to exit. It keeps waiting as long as processes exit or
|
|
1099
|
+
- **The ceiling:** 112 by default in a browser and none in Node (`createNodeKernel({ wasmMemories: { ceiling, idleMs } })` sets one in Node; `idleMs`, the quiet spell before `EAGAIN` below, 10 s by default, is there for tests). It's the kernel's count of live wasm processes, with the kernel's other wasm memories in the page left outside it. When an instantiation runs out of memory anyway, the kernel learns the real ceiling at that moment (the live count minus one), and that learned value wins over the default. A learned ceiling is never below 16, since an OOM at a low count means something outside it (another tab in the same renderer) filled the renderer. It's raised by 8 for each minute without another OOM, back to the default.
|
|
1100
|
+
- **Admission:** a spawn, fork, exec or `kernel.run` at the ceiling waits for another process to exit. It keeps waiting as long as processes exit, are admitted or finish starting (a process becoming ready counts, so a slow host that is still booting the processes ahead of it doesn't fail the spawn, #1196), and fails with `EAGAIN` only after 10 s with none of these. A long `make -j` or `xargs -P` therefore queues, and a pipeline that needs more live processes than the ceiling fails cleanly. bash's own retry on a fork's `EAGAIN` (`fork: retry: Resource temporarily unavailable`) handles the rest.
|
|
1101
1101
|
- **Close to the ceiling** (within 16 of it), the kernel waits for each new process to finish instantiating before the spawn returns. If it ran out of memory, the kernel starts it again, quietly, once there's room, so the caller sees no failure.
|
|
1102
1102
|
- **The rare residual case:** a process that fails to instantiate with nobody waiting on it, which happens only when something outside the count fills the renderer. It ends with status 126 and `<program>: cannot allocate memory for a new process (too many processes at once)` on its stderr, never a JS `RangeError`.
|
|
1103
1103
|
- **Below a learned ceiling,** a process that still runs out of memory is started again once another process exits, and the spawn fails with `EAGAIN` after 10 s with none.
|
|
@@ -1251,7 +1251,7 @@ The tools in `tools/cert-review/`:
|
|
|
1251
1251
|
- **FAIL:** a regression, or a failing test (by the counts, even without its rows) is **not certified**, and the group is red;
|
|
1252
1252
|
- **INCOMPLETE** blocks too: no result, a result from another bios than the pinned one, a missing shard, a shard that exited without a failing test, a refused candidate, 0 tests run, or no test passed;
|
|
1253
1253
|
- **not judged:** every failing test fails on `main`'s own pins too (`both`), so the canary is broken on `main`, not by this group. That passes with a note, as do `both` rows next to a pass. Either way, `pr notice` opens one issue, `downstream: bios canary failing on main (<bios sha>)`, or comments on the open one, and the next group that passes closes it. Flaky rows are advisory.
|
|
1254
|
-
-
|
|
1254
|
+
- **No downstream waiver.** A downstream FAIL or INCOMPLETE in the merge group is not certified; fix the regression or bios's side first (the coordinator-only `downstream-override` label was removed with the 2026-10-19 cert model). A pull request's own certification line ends `downstream: merge group`, since its downstream verdict comes in the group.
|
|
1255
1255
|
|
|
1256
1256
|
Not part of the run yet: the rest of bios's setup (the `rest` shard, the upgrade boot, the sudo rows under `enforce`). More shards plug in through the canary call's `shards`.
|
|
1257
1257
|
|
package/dist/kernel-worker.js
CHANGED
|
@@ -2570,15 +2570,21 @@ var OpfsFs = class {
|
|
|
2570
2570
|
let writable2;
|
|
2571
2571
|
let handle;
|
|
2572
2572
|
try {
|
|
2573
|
-
const
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
await this.
|
|
2573
|
+
const kept = created4 ? this.files.get(destination) : void 0;
|
|
2574
|
+
if (kept) {
|
|
2575
|
+
if (options.owner?.fifo || options.owner?.socket) throw fsError("ENXIO", to);
|
|
2576
|
+
handle = kept;
|
|
2577
|
+
} else {
|
|
2578
|
+
const [made2, existed, at] = await this.fileFor(destination);
|
|
2579
|
+
handle = made2;
|
|
2580
|
+
target = at;
|
|
2581
|
+
if (!existed && !created4) {
|
|
2582
|
+
created4 = true;
|
|
2583
|
+
await this.stampNew(target, options.owner, false);
|
|
2584
|
+
}
|
|
2585
|
+
const [entry] = await this.meta.get([target]);
|
|
2586
|
+
if (entry?.fifo || entry?.socket) throw fsError("ENXIO", to);
|
|
2579
2587
|
}
|
|
2580
|
-
const [entry] = await this.meta.get([target]);
|
|
2581
|
-
if (entry?.fifo || entry?.socket) throw fsError("ENXIO", to);
|
|
2582
2588
|
this.wrote(handle);
|
|
2583
2589
|
writable2 = await handle.createWritable();
|
|
2584
2590
|
await writable2.write(file);
|
|
@@ -7095,7 +7101,7 @@ function satisfies(version, range2) {
|
|
|
7095
7101
|
}
|
|
7096
7102
|
|
|
7097
7103
|
// src/version.ts
|
|
7098
|
-
var KERNEL_VERSION = true ? "1.134.
|
|
7104
|
+
var KERNEL_VERSION = true ? "1.134.2" : "0.0.0-dev";
|
|
7099
7105
|
var OS_RELEASE = "6.0.0-slicc";
|
|
7100
7106
|
function procVersion() {
|
|
7101
7107
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
@@ -24766,6 +24772,9 @@ var WasmMemories = class {
|
|
|
24766
24772
|
const source = this.learned ? "learned" : ceiling === void 0 ? "none" : "default";
|
|
24767
24773
|
return { live: this.live, ceiling: ceiling ?? 0, source };
|
|
24768
24774
|
}
|
|
24775
|
+
started() {
|
|
24776
|
+
this.progress();
|
|
24777
|
+
}
|
|
24769
24778
|
ended() {
|
|
24770
24779
|
this.live = Math.max(0, this.live - 1);
|
|
24771
24780
|
this.progress();
|
|
@@ -28082,6 +28091,7 @@ var Launcher = class {
|
|
|
28082
28091
|
});
|
|
28083
28092
|
const counted2 = (handle2) => {
|
|
28084
28093
|
void handle2.exited.finally(() => this.memories.ended());
|
|
28094
|
+
void Promise.resolve(handle2.ready).then(() => this.memories.started());
|
|
28085
28095
|
return handle2;
|
|
28086
28096
|
};
|
|
28087
28097
|
if (!this.memories.near()) {
|