Skip to content

Instantly share code, notes, and snippets.

@MichaelBelousov
Last active February 13, 2023 15:32
Show Gist options
  • Save MichaelBelousov/9069cbc26ed2acd596c65347a421bf12 to your computer and use it in GitHub Desktop.
Save MichaelBelousov/9069cbc26ed2acd596c65347a421bf12 to your computer and use it in GitHub Desktop.
catching flaky hangs with gdb
for i in {1..2};
do
echo "Run $i"
date
gdb node -ex 'python gdb.events.exited.connect(lambda t: t.exit_code == 0 and gdb.execute("q"))' \
-ex "run script.js --options 2>&1 > run_$i.log" \
|| echo "failed $?";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment