Let's try to revive this

This commit is contained in:
mathiascode 2020-10-18 06:43:20 +03:00
parent bec0aa9c97
commit e946acaf30
54 changed files with 1216 additions and 1951 deletions

View file

@ -2,7 +2,7 @@
# This is the core script that Heroku uses when booting up a dyno
PATH="$HOME/autossh/bin/:$HOME/dtach/bin/:$HOME/java/bin/:$PATH"
PATH="$HOME/dtach/bin/:$HOME/java/bin/:$PATH"
# Set up SSH for proxy server and schematics repository
# Load keys from environmental variables
@ -17,9 +17,9 @@ ssh-keyscan github.com >> .ssh/known_hosts
# checker in the background
while true; do
dtach -n server script/server.sh > /dev/null 2>&1
dtach -n proxy script/proxy.sh > /dev/null 2>&1
dtach -n schematics script/schematics.sh > /dev/null 2>&1
dtach -n server ~/script/server.sh > /dev/null 2>&1
dtach -n proxy ~/script/proxy.sh > /dev/null 2>&1
# dtach -n schematics ~/script/schematics.sh > /dev/null 2>&1
sleep 5
done &

View file

@ -1,22 +1,47 @@
#!/bin/sh
# The alive checker and Minecraft server is started at the same time. For performance reasons, the
# OpenJ9 JVM is used instead of Java's default Hotspot JVM.
# The alive checker and Minecraft server is started at the same time
chmod -R 500 $HOME/plugins/bStats/ $HOME/plugins/PluginMetrics/ $HOME/plugins/ProtocolLib/
dtach -n alivecheck $HOME/script/alivecheck.sh
# Make certain files read-only
chmod 400 bukkit.yml
chmod 400 commands.yml
chmod 400 eula.txt
chmod 400 permissions.yml
chmod 400 server-icon.png
chmod 400 wepif.yml
# Dump classes
java -Xshare:dump
while true; do
java -Xmx384M -Xtune:virtualized -Xaggressive -Xcompressedrefs -Xdump:heap+java+snap:none -Xdump:tool:events=throw+systhrow,filter=java/lang/OutOfMemoryError,exec="kill -9 %pid" -Xgc:concurrentScavenge -Xgc:dnssExpectedTimeRatioMaximum=3 -Xgc:scvNoAdaptiveTenure -Xdisableexplicitgc -Xshareclasses -Xshareclasses:noPersistentDiskSpaceCheck -XX:MaxDirectMemorySize=64M -XX:+ClassRelationshipVerifier -XX:+UseContainerSupport -DPaper.IgnoreJavaVersion=true -Dpaper.playerconnection.keepalive=360 -DIReallyKnowWhatIAmDoingISwear -jar server.jar
# Make certain files and folders read-only
chmod -R 500 plugins/bStats/
chmod -R 500 plugins/PluginMetrics/
chmod -R 500 plugins/ProtocolLib/
chmod 400 bukkit.yml
chmod 400 commands.yml
chmod 400 eula.txt
chmod 400 paper.yml
chmod 400 permissions.yml
chmod 400 server-icon.png
chmod 400 server.properties
chmod 400 spigot.yml
chmod 400 wepif.yml
# Start alive checker
dtach -n alivecheck ~/script/alivecheck.sh
# Start Minecraft server
java \
-Xmx384M \
-Xshare:on \
-Xss8M \
-XX:MaxDirectMemorySize=64M \
-XX:+UseContainerSupport \
-DPaper.IgnoreJavaVersion=true \
-Dpaper.playerconnection.keepalive=360 \
-DIReallyKnowWhatIAmDoingISwear \
-jar server.jar nogui
# Stop alive checker (will be started again on the next run)
pkill -9 alivecheck.sh
# Ensure we don't abuse the CPU in case of failure
sleep 1
done

View file

@ -1,15 +1,14 @@
#!/bin/sh
# This script is used as a reference to generate a stripped-down OpenJ9 JRE for the server
# This script is used as a reference to generate a stripped-down JRE for the server
rm -rf java/
wget https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14%2B36.1_openj9-0.19.0/OpenJDK14U-jdk_x64_linux_openj9_14_36_openj9-0.19.0.tar.gz
wget https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_linux_hotspot_14.0.2_12.tar.gz
tar -zxvf OpenJDK*
rm OpenJDK*
mv jdk* jdk/
jdk/bin/jlink --no-header-files --no-man-pages --compress=2 --strip-debug \
--exclude-files=**java_*.properties,**jrunscript,**keytool,**legal/** \
--add-modules \
java.desktop,java.logging,java.management,java.naming,java.net.http,java.scripting,java.sql,jdk.crypto.ec,jdk.unsupported,jdk.zipfs,openj9.sharedclasses \
--add-modules java.desktop,java.logging,java.management,java.naming,java.net.http,java.scripting,java.sql,jdk.crypto.ec,jdk.unsupported,jdk.zipfs \
--output java
rm -rf jdk/

BIN
vendor/java/bin/java vendored

Binary file not shown.

1167
vendor/java/lib/classlist vendored Normal file

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

BIN
vendor/java/lib/jexec vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
vendor/java/lib/libmanagement.so vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1 +0,0 @@
"-Xlockword:mode=default,noLockword=java/lang/String,noLockword=java/util/MapEntry,noLockword=java/util/HashMap$Entry,noLockword=org/apache/harmony/luni/util/ModifiedMap$Entry,noLockword=java/util/Hashtable$Entry,noLockword=java/lang/invoke/MethodType,noLockword=java/lang/invoke/MethodHandle,noLockword=java/lang/invoke/CollectHandle,noLockword=java/lang/invoke/ConstructorHandle,noLockword=java/lang/invoke/ConvertHandle,noLockword=java/lang/invoke/ArgumentConversionHandle,noLockword=java/lang/invoke/AsTypeHandle,noLockword=java/lang/invoke/ExplicitCastHandle,noLockword=java/lang/invoke/FilterReturnHandle,noLockword=java/lang/invoke/DirectHandle,noLockword=java/lang/invoke/ReceiverBoundHandle,noLockword=java/lang/invoke/DynamicInvokerHandle,noLockword=java/lang/invoke/FieldHandle,noLockword=java/lang/invoke/FieldGetterHandle,noLockword=java/lang/invoke/FieldSetterHandle,noLockword=java/lang/invoke/StaticFieldGetterHandle,noLockword=java/lang/invoke/StaticFieldSetterHandle,noLockword=java/lang/invoke/IndirectHandle,noLockword=java/lang/invoke/InterfaceHandle,noLockword=java/lang/invoke/VirtualHandle,noLockword=java/lang/invoke/PrimitiveHandle,noLockword=java/lang/invoke/InvokeExactHandle,noLockword=java/lang/invoke/InvokeGenericHandle,noLockword=java/lang/invoke/VarargsCollectorHandle,noLockword=java/lang/invoke/ThunkTuple"

Binary file not shown.

View file

@ -103,19 +103,6 @@ grant codeBase "jrt:/jdk.accessibility" {
permission java.lang.RuntimePermission "accessClassInPackage.sun.awt";
};
grant codeBase "jrt:/jdk.attach" {
permission java.lang.RuntimePermission "accessClassInPackage.com.ibm.oti.util";
permission java.lang.RuntimePermission "accessClassInPackage.openj9.internal.tools.attach.target";
permission java.lang.RuntimePermission "accessClassInPackage.openj9.internal.tools.attach.diagnostics.base";
permission java.util.PropertyPermission "com.ibm.tools.attach.*", "read";
// required by com.ibm.tools.attach.attacher.OpenJ9AttachProvider.listVirtualMachinesImp():commonDir.exists(),
// openj9.internal.tools.attach.target.Reply.writeReply():new RandomAccessFile(replyFile, "rw"),
// and openj9.internal.tools.attach.target.Reply.deleteReply():replyFile.delete()
permission java.io.FilePermission "<<ALL FILES>>", "read,write,delete";
// required by com.ibm.tools.attach.attacher.OpenJ9VirtualMachine.tryAttachTarget():targetServer.accept()
permission java.net.SocketPermission "localhost:1024-", "accept,resolve";
};
grant codeBase "jrt:/jdk.charsets" {
permission java.util.PropertyPermission "os.name", "read";
permission java.lang.RuntimePermission "charsetProvider";
@ -219,20 +206,6 @@ grant codeBase "jrt:/jdk.zipfs" {
permission java.util.PropertyPermission "user.name", "read";
};
grant codeBase "jrt:/openj9.cuda" {
permission java.util.PropertyPermission "com.ibm.oti.vm.library.version", "read";
permission java.lang.RuntimePermission "loadLibrary.cuda4j29";
};
grant codeBase "jrt:/openj9.gpu" {
permission java.lang.RuntimePermission "accessClassInPackage.com.ibm.gpu.spi";
permission com.ibm.gpu.GPUPermission "access";
permission java.util.PropertyPermission "com.ibm.gpu.verbose", "read";
permission java.util.PropertyPermission "com.ibm.gpu.enforce", "read";
permission java.util.PropertyPermission "com.ibm.gpu.enable", "read";
permission java.util.PropertyPermission "com.ibm.gpu.disable", "read";
};
// permissions needed by applications using java.desktop module
grant {
permission java.lang.RuntimePermission "accessClassInPackage.com.sun.beans";

Binary file not shown.

Binary file not shown.

Binary file not shown.

4
vendor/java/release vendored
View file

@ -1,2 +1,2 @@
JAVA_VERSION="14"
MODULES="java.base java.datatransfer java.xml java.prefs java.desktop java.logging java.management java.security.sasl java.naming java.net.http java.scripting java.transaction.xa java.sql jdk.crypto.ec jdk.unsupported jdk.zipfs openj9.sharedclasses"
JAVA_VERSION="14.0.2"
MODULES="java.base java.datatransfer java.xml java.prefs java.desktop java.logging java.management java.security.sasl java.naming java.net.http java.scripting java.transaction.xa java.sql jdk.crypto.ec jdk.unsupported jdk.zipfs"