Bound slow native architecture startup with the existing UID window

This commit is contained in:
dh
2026-10-05 06:18:38 +02:00
parent 4b7fd160ef
commit 2e2d702e29
3 changed files with 10 additions and 1 deletions
+4
View File
@@ -101,6 +101,8 @@ static class NativeDiagnostic
nativeVersionMaximumBytes = 4096, nativeVersionResponseRequired = false,
nativeVersionCandidateIsQualifiedReadiness = false, nativeVersionBindingRequiredBeforePermit = true,
nativeVersionFixtures = "native-system-version-fixtures.json", nativeProductVersionCommandRemoved = true,
architectureCommandLimitSeconds = 180, uidCommandLimitSeconds = 180, ordinaryCommandLimitSeconds = 45,
architectureCommandExtendedAfterRun4195 = true,
diskReadinessAttemptLimit = 1, diskCommandLimitSeconds = 600, diskCommandExtendedForDiagnosticObservation = true,
diskObservationCommandLimitSeconds = 60, stackSamplingRequested = true, stackSamplingDurationSeconds = 1,
stackSamplingIntervalMilliseconds = 100, stackSamplingMayDie = false, stackSamplingRuntimeSucceeded = false,
@@ -297,6 +299,8 @@ static class NativeDiagnostic
throw new InvalidOperationException("Outside seven explicit diagnostic blocks, two explicit native SystemVersion getter blocks and one-attempt limit, baseline identity/service/disk gates and watchdogs must remain identical.");
foreach (var required in new[] { "command_limit=600; fi", "run_command sample_usage /usr/bin/sample", "run_command management_before /bin/launchctl print system/com.apple.storagekitd", "observe_live_command storagekit-live /bin/launchctl print system/com.apple.storagekitd", "observe_command diskutil-stack /usr/bin/sample \"$disk_process\" 1 100 -file \"$stack_output\"", "observe_live_command diskutil-native-before \"$STATE_DIR/native-process-probe-x86_64\" \"$disk_process\" \"$$\"", "observe_live_command diskutil-native-after \"$STATE_DIR/native-process-probe-x86_64\" \"$disk_process\" \"$$\"", "read -r -t 180 -u 9", "stack_output=\"$STATE_DIR/diskutil-stack.txt\"", "read -r -t 60 -u 9", "\"$BASH_VERSION\"" })
if (!readiness.Contains(required, StringComparison.Ordinal)) throw new InvalidOperationException("Owned optional disk observation contract changed: " + required);
foreach (var required in new[] { "command_limit=45", "[[ \"$name\" != uid ]] || command_limit=180", "[[ \"$name\" != architecture ]] || command_limit=180" })
if (!readiness.Contains(required, StringComparison.Ordinal)) throw new InvalidOperationException("Architecture/UID/ordinary command watchdog contract changed: " + required);
if (readiness.Contains("PENDING_OUTPUTS+=(\"$stack_output\")", StringComparison.Ordinal)) throw new InvalidOperationException("Stack reports must be bounded directly by the Linux host, without another guest copy.");
ReadProbeAssets();
if (Hash(File.ReadAllBytes(Path.Combine("tools", "ci", "macos-native-bootstrap.sh"))) != "94f069e116fdc7685a4d233cab6fa50df9f39274386bb82157674061e74fadb5")
+3
View File
@@ -248,6 +248,9 @@ run_command() {
# Isolate only the failed UID gate; every other watchdog remains unchanged.
[[ "$name" != uid ]] || command_limit=180
# BEGIN disk IPC diagnostic
# Run 4195: required uname -m exceeded 45s and returned 143 without output.
# Extend this architecture gate to the existing UID limit; ordinary commands stay 45s.
[[ "$name" != architecture ]] || command_limit=180
if [[ "$name" == disks && "${attempt:-0}" == 1 ]]; then command_limit=600; fi
# END disk IPC diagnostic
LAST_OUTPUT="/tmp/native-diagnostic-$name.out"