DF-5730 / run4-control.sh
#!/bin/sh # Proper control: session-independent scheduled reboot + nohup marker, # then plain sysctl-entered DDB + immediate continue. set -eu cd "$(dirname "$0")" ./serial_vm.sh down || true ./serial_vm.sh up # Session-independent liveness probes (survive ssh session close): # (a) shutdown daemonizes under init -> reboots guest at +1min if scheduled # (b) nohup'd console marker at T+120s ssh -F ../../../dfbsd-qemu/config dfbsd \ 'shutdown -r +1; nohup sh -c "(sleep 120; echo POSTCONT2_LIVE > /dev/console)" </dev/null >/dev/null 2>&1 &' \ || true sleep 3 (ssh -F ../../../dfbsd-qemu/config dfbsd 'sysctl debug.enter_debugger=ddb' >/dev/null 2>&1 &) sleep 6 python3 drive3.py 2>&1 | tee session4-control.log echo "=== watching serial log 200s for marker/reboot ===" for i in $(seq 1 20); do sleep 10 if grep -aq "POSTCONT2_LIVE\|Rebooting\|reboot\|Fatal trap\|panic:" /tmp/opencode/df-5730-serial.log; then break fi done grep -an "POSTCONT2_LIVE\|Rebooting\|reboot\|Fatal trap\|panic:" /tmp/opencode/df-5730-serial.log | tail -8 | tee marker4.log echo "=== ssh attempt ===" ssh -F ../../../dfbsd-qemu/config -o ConnectTimeout=15 -o BatchMode=yes dfbsd \ 'echo SSH_ALIVE; uptime' 2>&1 || true |