@mark1russell7/harness 0.16.19 → 0.16.21
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/build/{image-S18_TQfQ.js → image-Dzofp1ab.js} +14 -6
- package/build/image-Dzofp1ab.js.map +1 -0
- package/build/index.d.ts +5 -1
- package/build/index.js +1 -1
- package/build/schema.js +1 -1
- package/image/native/src/bin/memory.rs +19 -1
- package/package.json +1 -1
- package/build/image-S18_TQfQ.js.map +0 -1
package/build/index.d.ts
CHANGED
|
@@ -261,9 +261,13 @@ export declare const estimateOf: (requests: ReadonlyArray<{
|
|
|
261
261
|
readonly sent: number;
|
|
262
262
|
readonly done: number | null;
|
|
263
263
|
}>, end: number, interval: number) => RunEstimate | undefined;
|
|
264
|
-
/**
|
|
264
|
+
/**
|
|
265
|
+
* A load spread is a part of the distribution of one measure of an open-loop cell, over its counted runs.
|
|
266
|
+
* Each quantile is the nearest rank. The p95 and the p99 of the nights give the limits of a quantile budget.
|
|
267
|
+
*/
|
|
265
268
|
interface LoadSpread {
|
|
266
269
|
readonly p50: Quantity;
|
|
270
|
+
readonly p95: Quantity;
|
|
267
271
|
readonly p99: Quantity;
|
|
268
272
|
readonly max: Quantity;
|
|
269
273
|
}
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as hostLimitsOf, A as targetSourceOf, B as versionsOf, C as programOf, D as subjectClient, E as sources, F as goVersions, G as requestFirst, H as environmentProblems, I as jarVersions, J as cgroupKeyed, K as RESOURCES_EVENT, L as locksOf, M as unpinnedBases, N as LOCK_NAMES, O as subjectProblems, P as cargoVersions, Q as cpuStatOf, R as npmDrift, S as planOf, T as shippedSource, U as isHopPlace, V as CLIENT_CAPABILITIES, W as latestEndOf, X as cgroupNumber, Y as cgroupLimit, Z as cpuMaxOf, _ as kafkaClientImage, _t as loadPlanOf, a as SHIPPED_NAMES, at as resourceReadingIn, b as nodeHttpImage, bt as streamsLoadOf, c as buildRecordOf, ct as LOAD_FORMAT, d as harnessImage, dt as SCHEDULE_PATH, et as limitsProblems, f as harnessVersion, ft as connectionsProblems, g as inContext, gt as loadOf, h as imageProblems, ht as loadEnds, i as SHIPPED_CLIENTS, it as resourceChange, j as unlockedManifests, k as targetImageOf, l as goHttpImage, lt as LOAD_PATH, m as imageOf, mt as estimateVerdict, n as PINNED, nt as networkOf, o as amqpClientImage, ot as resourceReadingOf, p as hikariClientImage, pt as estimateOf, q as RESOURCES_PROGRAM, r as REPOSITORY, rt as resourceArgs, s as basesOf, st as CLOSED_TOLERANCE, t as CLIENT_NAMES, tt as memoryStatOf, u as grpcClientImage, ut as LOAD_POOL_LIMIT, v as mongoClientImage, vt as loadVerdict, w as routerImage, x as pgClientImage, y as nodeClientImage, yt as poolOf, z as npmVersions } from "./image-
|
|
1
|
+
import { $ as hostLimitsOf, A as targetSourceOf, B as versionsOf, C as programOf, D as subjectClient, E as sources, F as goVersions, G as requestFirst, H as environmentProblems, I as jarVersions, J as cgroupKeyed, K as RESOURCES_EVENT, L as locksOf, M as unpinnedBases, N as LOCK_NAMES, O as subjectProblems, P as cargoVersions, Q as cpuStatOf, R as npmDrift, S as planOf, T as shippedSource, U as isHopPlace, V as CLIENT_CAPABILITIES, W as latestEndOf, X as cgroupNumber, Y as cgroupLimit, Z as cpuMaxOf, _ as kafkaClientImage, _t as loadPlanOf, a as SHIPPED_NAMES, at as resourceReadingIn, b as nodeHttpImage, bt as streamsLoadOf, c as buildRecordOf, ct as LOAD_FORMAT, d as harnessImage, dt as SCHEDULE_PATH, et as limitsProblems, f as harnessVersion, ft as connectionsProblems, g as inContext, gt as loadOf, h as imageProblems, ht as loadEnds, i as SHIPPED_CLIENTS, it as resourceChange, j as unlockedManifests, k as targetImageOf, l as goHttpImage, lt as LOAD_PATH, m as imageOf, mt as estimateVerdict, n as PINNED, nt as networkOf, o as amqpClientImage, ot as resourceReadingOf, p as hikariClientImage, pt as estimateOf, q as RESOURCES_PROGRAM, r as REPOSITORY, rt as resourceArgs, s as basesOf, st as CLOSED_TOLERANCE, t as CLIENT_NAMES, tt as memoryStatOf, u as grpcClientImage, ut as LOAD_POOL_LIMIT, v as mongoClientImage, vt as loadVerdict, w as routerImage, x as pgClientImage, y as nodeClientImage, yt as poolOf, z as npmVersions } from "./image-Dzofp1ab.js";
|
|
2
2
|
import { LAYERS, LAYER_FACTS, LIMITS, layerOf, limitsOf } from "./layers.js";
|
|
3
3
|
import { quantity, valueIn } from "@mark1russell7/quantity";
|
|
4
4
|
import { checkDiskFault, schedule, stopTriggerOf } from "@mark1russell7/rigor-chaos";
|
package/build/schema.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as subjectProblems, V as CLIENT_CAPABILITIES, a as SHIPPED_NAMES, h as imageProblems, t as CLIENT_NAMES } from "./image-
|
|
1
|
+
import { O as subjectProblems, V as CLIENT_CAPABILITIES, a as SHIPPED_NAMES, h as imageProblems, t as CLIENT_NAMES } from "./image-Dzofp1ab.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
// src/schema.ts
|
|
4
4
|
/** This function adds each problem that a check finds as an issue of a schema. */
|
|
@@ -243,6 +243,13 @@ fn lock() -> bool {
|
|
|
243
243
|
unsafe { libc::mlockall(libc::MCL_CURRENT) == 0 }
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
+
/// Linux gives `EINVAL` for `MADV_NOHUGEPAGE` when the kernel has no transparent huge pages
|
|
247
|
+
/// (`CONFIG_TRANSPARENT_HUGEPAGE` is not set). Then the fault of each page takes one page, and the
|
|
248
|
+
/// advice has nothing to turn off. The range of a new mapping is aligned, thus `EINVAL` has no other cause here.
|
|
249
|
+
fn no_huge_pages(error: &std::io::Error) -> bool {
|
|
250
|
+
error.raw_os_error() == Some(libc::EINVAL)
|
|
251
|
+
}
|
|
252
|
+
|
|
246
253
|
/// Anonymous memory with no huge pages: the fault of each page charges one page to the cgroup.
|
|
247
254
|
struct Region {
|
|
248
255
|
base: *mut u8,
|
|
@@ -269,7 +276,10 @@ impl Region {
|
|
|
269
276
|
}
|
|
270
277
|
// SAFETY: the range is the mapping above
|
|
271
278
|
if unsafe { libc::madvise(base, bytes, libc::MADV_NOHUGEPAGE) } != 0 {
|
|
272
|
-
|
|
279
|
+
let error = std::io::Error::last_os_error();
|
|
280
|
+
if !no_huge_pages(&error) {
|
|
281
|
+
return Err(error.into());
|
|
282
|
+
}
|
|
273
283
|
}
|
|
274
284
|
Ok(Region { base: base.cast(), pages, page })
|
|
275
285
|
}
|
|
@@ -457,4 +467,12 @@ mod tests {
|
|
|
457
467
|
// SAFETY: the page is inside the mapping
|
|
458
468
|
assert_eq!(unsafe { std::ptr::read_volatile(region.base.add((7 * page) as usize)) }, 1);
|
|
459
469
|
}
|
|
470
|
+
|
|
471
|
+
#[test]
|
|
472
|
+
fn einval_of_the_advice_is_a_kernel_with_no_huge_pages_and_each_other_error_stays() {
|
|
473
|
+
assert!(no_huge_pages(&std::io::Error::from_raw_os_error(libc::EINVAL)));
|
|
474
|
+
assert!(!no_huge_pages(&std::io::Error::from_raw_os_error(libc::ENOMEM)));
|
|
475
|
+
assert!(!no_huge_pages(&std::io::Error::from_raw_os_error(libc::EPERM)));
|
|
476
|
+
assert!(!no_huge_pages(&std::io::Error::other("no code")));
|
|
477
|
+
}
|
|
460
478
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@mark1russell7/harness",
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.21",
|
|
5
5
|
"description": "Network labs in Docker, declared as data. A cell builds a topology of networks, routers and proxies around a stock target. It injects a fault at layer 3 or 4 from a NET_ADMIN sidecar, measures the records of the kernel and judges a prediction. The faults are black holes, resets, ICMP unreachable, one-way and MTU drops, tc netem, the toxics of Toxiproxy and frozen processes. Its disk tier cuts the power of a program on LazyFS: the disk loses each write after the last fsync. Its memory tier sets the limits of the cgroup of a client, and judges its throttle above memory.high and the choice of the OOM killer. Its egress tier puts a netem or tbf qdisc on the interface of a client, and judges the departure of each datagram from the stamps of the kernel. Its replicated groups are Redis with Sentinels, MongoDB replica sets, PostgreSQL standbys, Kafka, RabbitMQ and BGP fabrics with BFD. A lab can also operate in a QEMU guest. Its first use is connection timers: keep-alive, TCP retransmission, heartbeats and reconnects.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"fault-injection",
|