Created
June 7, 2016 18:15
-
-
Save swgillespie/67d09df47ebf439587b4a1df46edfd9f to your computer and use it in GitHub Desktop.
Test crash reproduction for CoreCLR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ulimit -c unlimited | |
sudo sh -c 'echo "/home/ddcloud/coredumps/core_%e.%p" > /proc/sys/kernel/core_pattern' | |
export COMPlus_GCLogEnabled=1 | |
export COMPlus_GCLogFile=/home/ddcloud/Documents/gclog/gclog | |
export COMPlus_GCLogFileSize=1f0 | |
export COMPlus_SOEnableDefaultRWValidation=0 | |
export COMPlus_GCprnLvl=3 | |
export COMPlus_StressLog=1 | |
export COMPlus_LogLevel=15 | |
export COMPlus_LogFacility=84001 | |
export COMPlus_StressLogSize=5000000 | |
export COMPlus_TotalStressLogSize=500000000 | |
export COMPlus_HeapVerify=1 | |
echo "Crash dump save location: $(cat /proc/sys/kernel/core_pattern)" | |
echo "GC log save location: $COMPlus_GCLogFile" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
trap ctrl_c INT | |
PROC_ID=$1 | |
function ctrl_c() { | |
echo "[$PROC_ID] Interrupted, deleting log" | |
rm /home/ddcloud/Documents/gclog/gclog.$CHILD_PID.log | |
kill -9 $CHILD_PID | |
exit 0 | |
} | |
echo "[$PROC_ID] Spawning GCSimulator ..." | |
$CORE_ROOT/corerun GCSimulator.exe -t 10 -tp 0 -dz 17 -sdc 1024 -dc 10000 -sdz 17 -lt 2 -dp 0.3 -dw 0.0 -f & | |
CHILD_PID=$! | |
echo "[$PROC_ID] Waiting..." | |
wait $CHILD_PID | |
RETURN_CODE=$? | |
echo "[$PROC_ID] Return code was $RETURN_CODE" | |
if [ $RETURN_CODE -ne 139 ]; then | |
echo "[$PROC_ID] Not a SEGV, deleting log" | |
rm -f /home/ddcloud/Documents/gclog/gclog.$CHILD_PID.log | |
fi | |
if [ $RETURN_CODE -eq 134 ]; then | |
echo "[$PROC_ID] Is a SIGABRT, deleting crash dump" | |
rm -f /home/ddcloud/coredumps/core_corerun.$CHILD_PID | |
fi | |
echo "[$PROC_ID] Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment