Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/evidence/FB1-CUT4B-88f3f59-probe/probe_gpu_open.sh # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / evidence / FB1-CUT4B-88f3f59-probe / probe_gpu_open.sh` 49 lines ยท 2779 bytes Raw Blame History 1 #!/bin/bash 2 # tools/probe_gpu_open.sh OUT_DIR [N] 3 # FB-1 cut 4b flake investigation: does the FIRST chip call of a fresh process fail 4 # in the device-open path (seen twice: cut 1b run 2, cut 3c attempt 1)? Each sample 5 # is a fresh process (build/gpu_session_probe). Variants, N samples each, in order: 6 # baseline one probe at a time, idle gap 200 ms between processes 7 # back_to_back the next probe starts the instant the previous one exits (the sighting: 8 # "another chip job had just used the chip") 9 # overlap a holder keeps a device open (hold 300 ms) while the probe opens its own 10 # after_latch NOT RUN (would need a deliberate stall; never leave the chip uncertain) 11 # Negative control first: the probe must report a failure when it cannot open the 12 # control nodes (file-descriptor limit 3 -> open() fails), with the stage named. 13 # Run through the heavy queue only (lanes.sh queue --heavy); never kill it. 14 set -u 15 OUT=${1:?out dir}; N=${2:-30} 16 cd "$(dirname "$0")/.." || exit 2 17 P=${PHYSICS_DIR:-../physics} 18 mkdir -p "$OUT" 19 make PHYSICS_DIR="$P" build/gpu_session_probe > "$OUT/build.log" 2>&1 || { echo "PROBE BUILD FAIL"; exit 1; } 20 PR=./build/gpu_session_probe 21 LOG="$OUT/probe.log"; : > "$LOG" 22 { uname -a; nvidia-smi --query-gpu=name,driver_version --format=csv,noheader 2>/dev/null; echo "omega $(git rev-parse HEAD) physics $(git -C "$P" rev-parse HEAD)"; date -u +%FT%TZ; } > "$OUT/device.txt" 23 echo "## negative_control (fd limit 3: /dev/nvidiactl cannot be opened)" | tee -a "$LOG" 24 ( ulimit -n 3; $PR --label negative_control ) 2>&1 | tee -a "$LOG" 25 neg_rc=${PIPESTATUS[0]} 26 echo "negative_control exit=$neg_rc (must be non-zero with a named stage)" | tee -a "$LOG" 27 fails=0; total=0 28 run_variant() { # name 29 local name=$1 f=0 30 echo "## $name N=$N" | tee -a "$LOG" 31 for i in $(seq 1 "$N"); do 32 if [ "$name" = overlap ]; then $PR --label holder --hold-ms 300 >> "$LOG" 2>&1 & sleep 0.05; fi 33 $PR --label "$name#$i" 2>&1 | tee -a "$LOG" | grep -q 'rc=OK' || f=$((f+1)) 34 [ "$name" = overlap ] && wait 35 [ "$name" = baseline ] && sleep 0.2 36 done 37 echo "$name: failures $f / $N" | tee -a "$LOG" 38 fails=$((fails+f)); total=$((total+N)) 39 } 40 run_variant baseline 41 run_variant back_to_back 42 run_variant overlap 43 grep -c 'rc=OK' "$LOG" > "$OUT/ok_count.txt" 44 grep 'rc=' "$LOG" | grep -v 'rc=OK' | grep -v negative_control > "$OUT/failures.txt" 45 echo "end $(date -u +%FT%TZ)" >> "$OUT/device.txt" 46 cp tests/gpu_session_probe.c src/omega_gpu_session.c tools/probe_gpu_open.sh "$OUT/" 47 (cd "$OUT" && sha256sum -- * > SHA256SUMS) 48 echo "PROBE_GPU_OPEN: negative_control_exit=$neg_rc first_call_failures=$fails/$total (details $OUT/failures.txt)" 49 [ "$neg_rc" != 0 ] || { echo "PROBE_GPU_OPEN: INSTRUMENT FAIL (negative control passed)"; exit 3; }