Skip to content

Commit a6364c5

Browse files
sbryngelsonclaude
andcommitted
Fix bash segfault in monitor_slurm_job.sh from fractional read timeout
read -t 0.1 (sub-second timeout) in a loop with process substitution file descriptors triggers a bash internal error (unwind_frame_run: read_builtin: frame not found) leading to a segfault. Use integer timeout (read -t 1) instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 21347c1 commit a6364c5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/scripts/monitor_slurm_job.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ while true; do
6464
# Try to read from tail output (non-blocking via timeout)
6565
# Read multiple lines if available to avoid falling behind
6666
lines_read=0
67-
while IFS= read -r -t 0.1 line <&3 2>/dev/null; do
67+
while IFS= read -r -t 1 line <&3 2>/dev/null; do
6868
echo "$line"
6969
lines_read=$((lines_read + 1))
7070
last_heartbeat=$(date +%s)
@@ -115,7 +115,7 @@ done
115115
# Drain any remaining output from tail after job completes
116116
echo "Draining remaining output..."
117117
drain_count=0
118-
while IFS= read -r -t 0.5 line <&3 2>/dev/null; do
118+
while IFS= read -r -t 1 line <&3 2>/dev/null; do
119119
echo "$line"
120120
drain_count=$((drain_count + 1))
121121
# Safety limit to avoid infinite loop

0 commit comments

Comments
 (0)