Skip to content

Commit 783dfe2

Browse files
juntaoclaude
andcommitted
Add diagnostics for macOS MLX CLI crash (exit 255)
Capture stdout/stderr separately, add verbose logging (-vv), check crash reports, and print system info to debug the silent crash. Signed-off-by: Michael Yuan <michael@secondstate.io> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 98991ae commit 783dfe2

File tree

1 file changed

+45
-2
lines changed

1 file changed

+45
-2
lines changed

.github/workflows/integration-test.yml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,12 +392,55 @@ jobs:
392392
find target/release/build -name "mlx.metallib" -exec cp {} target/release/ \;
393393
ls -lh target/release/mlx.metallib
394394
395+
- name: Diagnostic — check binary and environment
396+
run: |
397+
echo "=== Binary info ==="
398+
file target/release/transcribe
399+
otool -L target/release/transcribe | head -20
400+
echo ""
401+
echo "=== Metallib ==="
402+
ls -lh target/release/mlx.metallib || echo "NO METALLIB FOUND"
403+
echo ""
404+
echo "=== Model files ==="
405+
ls -lh "$MODEL_DIR/"
406+
echo ""
407+
echo "=== System memory ==="
408+
sysctl hw.memsize
409+
vm_stat | head -10
410+
echo ""
411+
echo "=== Metal GPU ==="
412+
system_profiler SPDisplaysDataType 2>/dev/null | head -20 || true
413+
395414
- name: CLI — transcribe sample2.wav
396415
run: |
397-
result=$(./target/release/transcribe \
416+
set +e
417+
echo "Starting transcription..."
418+
./target/release/transcribe \
419+
-vv \
398420
--model-dir "$MODEL_DIR" \
399421
--language en \
400-
tests/fixtures/sample2.wav)
422+
tests/fixtures/sample2.wav \
423+
> /tmp/transcribe_stdout.txt 2> /tmp/transcribe_stderr.txt
424+
EXIT_CODE=$?
425+
echo "Exit code: $EXIT_CODE"
426+
echo ""
427+
echo "=== STDOUT ==="
428+
cat /tmp/transcribe_stdout.txt
429+
echo ""
430+
echo "=== STDERR ==="
431+
cat /tmp/transcribe_stderr.txt
432+
echo ""
433+
if [ $EXIT_CODE -ne 0 ]; then
434+
echo "Process crashed with exit code $EXIT_CODE"
435+
# Check for crash logs
436+
ls -lt ~/Library/Logs/DiagnosticReports/ 2>/dev/null | head -5
437+
for f in $(ls -t ~/Library/Logs/DiagnosticReports/transcribe* 2>/dev/null | head -1); do
438+
echo "=== Crash report ==="
439+
head -100 "$f"
440+
done
441+
exit $EXIT_CODE
442+
fi
443+
result=$(cat /tmp/transcribe_stdout.txt)
401444
echo "Transcript: $result"
402445
echo "$result" | grep -qi "fox\|lazy\|dog"
403446

0 commit comments

Comments
 (0)