File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change
1
+ Add extra protection against the SANY race conditions on the filesystem, see #3046
Original file line number Diff line number Diff line change 38
38
JVM_ARGS=" ${JVM_ARGS} -Xmx4096m"
39
39
fi
40
40
41
+ # Avoid SANY concurrency issues: https://github.com/tlaplus/tlaplus/issues/688
42
+ if [ -z " ${TMPDIR:- } " ]; then
43
+ TMPDIR=" $( pwd) /tmp"
44
+ mkdir -p " $TMPDIR "
45
+ fi
46
+ JAVA_IO_TMPDIR=` mktemp -d -t SANYXXXXXXXXXX`
47
+
41
48
# Check whether the CLI args contains the debug flag
42
49
if [[ " $* " =~ ' --debug' ]]
43
50
then
44
51
echo " # Tool home: $DIR "
45
52
echo " # Package: $APALACHE_JAR "
46
53
echo " # JVM args: $JVM_ARGS "
54
+ echo " # -Djava.io.tmpdir: $JAVA_IO_TMPDIR "
47
55
echo " #"
48
56
fi
49
57
50
58
# Run with `exec` to replace the PID, rather than running in a subshell.
51
59
# This saves one process, and ensures signals are sent to the replacement process
52
60
# C.f. https://github.com/sbt/sbt-native-packager/blob/e72f2f45b8cab5881add1cd62743bfc69c2b9b4d/src/main/resources/com/typesafe/sbt/packager/archetypes/scripts/bash-template#L141-L142
53
- exec java $JVM_ARGS -jar " $APALACHE_JAR " " $@ "
61
+ exec java $JVM_ARGS -Djava.io.tmpdir= $JAVA_IO_TMPDIR - jar " $APALACHE_JAR " " $@ "
You can’t perform that action at this time.
0 commit comments