summaryrefslogtreecommitdiffstats
path: root/core/modules/pvs2
diff options
context:
space:
mode:
authorSimon Rettberg2018-05-22 14:24:47 +0200
committerSimon Rettberg2018-05-22 14:24:47 +0200
commitb2e1ce6b9e2ae1ed5806a697402b32d220d664c3 (patch)
treed4871021b6e30ab357438fed93c9e09456b0dcfa /core/modules/pvs2
parent[vbox-src] create vboxusers before chown stuff to it (diff)
downloadmltk-b2e1ce6b9e2ae1ed5806a697402b32d220d664c3.tar.gz
mltk-b2e1ce6b9e2ae1ed5806a697402b32d220d664c3.tar.xz
mltk-b2e1ce6b9e2ae1ed5806a697402b32d220d664c3.zip
[pvs2] Catch and send core dumps
Diffstat (limited to 'core/modules/pvs2')
-rwxr-xr-xcore/modules/pvs2/data/opt/openslx/bin/pvsstartup15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/modules/pvs2/data/opt/openslx/bin/pvsstartup b/core/modules/pvs2/data/opt/openslx/bin/pvsstartup
index 16a01708..80db6f13 100755
--- a/core/modules/pvs2/data/opt/openslx/bin/pvsstartup
+++ b/core/modules/pvs2/data/opt/openslx/bin/pvsstartup
@@ -9,11 +9,24 @@ if [ -n "$SLX_EXAM" ]; then
EXAM="--exam-mode"
fi
+# Report core dumps
+URL="http://132.230.8.113/error_report.php"
+DIR=$(mktemp -d)
+[ -n "$DIR" ] && cd "$DIR"
+
+ulimit -c unlimited
+
while [ $timediff -gt 3 ]; do
start="$(date +%s)"
pvsclient $EXAM "$@"
ret=$?
end="$(date +%s)"
+ for c in core*; do
+ [ -f "$c" ] || continue
+ tar ckzf "cmp-${c}.tgz" "$c"
+ curl -m 3 -H "Expect:" -f -s -S -F "file=@cmp-${c}.tgz;filename=report" "$URL" &> /dev/null
+ rm -f -- "$c" "cmp-${c}.tgz"
+ done
/opt/openslx/pvs2/kb-unlock.sh
[ "$ret" == "0" ] && break
timediff=$(( end - start ))
@@ -21,5 +34,7 @@ while [ $timediff -gt 3 ]; do
[ $counter -gt 8 ] && break
done
+rm -rf -- "$DIR"
+
exit $ret