Concurrent Chunk Management Engine (Fabric)

Concurrent Chunk Management Engine (Fabric)

231k Downloads

newly generated world crashing on openj9 with the -xaggressive flag

linux-leo opened this issue ยท 4 comments

commented
version = 2
# (Default: 4) Configures the parallelism of global executor
globalExecutorParallelism = "default"

# Configuration for io system
[ioSystem]
	# (Default: true) Whether to use async chunk loading & unloading
	async = "default"
	# (Default: false) Whether to use optimized implementation of IO system
	replaceImpl = true
	# (Default: 1536) Soft limit for io worker nbt cache
	chunkDataCacheSoftLimit = "default"
	# (Default: 6144) Hard limit for io worker nbt cache
	chunkDataCacheLimit = "default"

# Configuration for threaded world generation
[threadedWorldGen]
	# (Default: true) Whether to allow feature generation (world decorations like trees, ores and etc.) run in parallel 
	# (may cause incompatibility with other mods)
	allowThreadedFeatures = "default"
	# (Default: true) Whether to allow reducing lock radius 
	# (may cause incompatibility with other mods)
	reduceLockRadius = "default"
	# (Default: true) Whether to enable this feature
	enabled = true

# Configuration for async scheduling system
[asyncScheduling]
	# (Default: false) (Experimental) Whether to enable this feature 
	# (may cause incompatibility with other mods)
	enabled = true

# Configuration for vanilla worldgen optimizations
[vanillaWorldGenOptimizations]
	# (Default: true) Whether to enable aquifer optimizations to accelerate overworld worldgen 
	# (may cause incompatibility with other mods) 
	optimizeAquifer = "default"
	# (Default: true) Whether to enable End Biome Cache to accelerate The End worldgen 
	# This is no longer included in lithium-fabric 
	# (may cause incompatibility with other mods) 
	useEndBiomeCache = "default"

# Configuration for general optimizations
[generalOptimizations]
	# (Default: -1) Defines which chunk compression should be used 
	# -1 for Vanilla default (also prevents mixin modifying vanilla default  
	# from being applied) 
	# 1  for GZip (RFC1952) (Vanilla compatible) 
	# 2  for Zlib (RFC1950) (Vanilla default) (Vanilla compatible) 
	# 3  for Uncompressed (Fastest, but higher disk usage) (Vanilla compatible) 
	#  
	# Original chunk data will still readable after modifying this option  
	# as this option only affects newly stored chunks 
	# Other values can result in crashes when starting minecraft  
	# to prevent further damage
	#
	chunkStreamVersion = "default"
	# (Default: true) Whether to enable mid-tick chunk tasks  
	# Mid-tick chunk tasks is to execute chunk tasks during server tick loop  
	# to speed up chunk loading and generation  
	# This helps chunks loading and generating under high MSPT but may raise  
	# MSPT when chunks are loading or generating  
	#  
	# Incompatible with Dimensional Threading (dimthread)
	#
	doMidTickChunkTasks = "default"
	# (Default: true) Whether to let async chunk request no longer block server thread 
	# (may cause incompatibility with other mods) 
	optimizeAsyncChunkRequest = "default"

	# Configuration for auto-save
	[generalOptimizations.autoSave]
		# (Default: ENHANCED) Defines how auto save should be handled  
		# VANILLA: Use vanilla auto-save behavior (auto-save performed every tick during ticking)  
		# ENHANCED: Use C2ME enhanced auto-save (auto-save performed when the server have spare time after ticking)  
		# PERIODIC: Use pre-1.18 vanilla auto-save behavior (auto-save performed every 6000 ticks during ticking)  
		#  
		# Please preserve quotes so this config don't break
		#
		mode = "default"
		# (Default: 20000) Defines the delay in milliseconds between performing auto-save for a chunk  
		# This is only used when mode is set to ENHANCED
		#
		delay = "default"

# Configuration for no-tick view distance
[noTickViewDistance]
	# (Default: false) Whether to use compatibility mode to send chunks 
	# This may fix some mod compatibility issues
	compatibilityMode = "default"
	# (Default: false) Whether to ensure correct chunks within normal render distance 
	# This will send chunks twice increasing network load
	ensureChunkCorrectness = "default"
	# (Default: 6) No-tick view distance updates per tick 
	# Lower this for a better latency and higher this for a faster loading
	updatesPerTick = "default"
	# (Default: true) Weather to enable no-tick view distance
	enabled = "default"

# Configuration for clientside functions
[clientSide]

	# Configuration for modifying clientside max view distance
	[clientSide.modifyMaxVDConfig]
		# (Default: true) Weather to enable this feature
		enabled = false
		# (Default: 128) Max render distance allowed in game options
		maxViewDistance = "default"

It seems to work fine for about a second before crashing.

commented

I'm also using -Xgcpolicy:optavgpause and -Xdisableexplicitgc

commented

The balanced Xgc policy doesnt have this issue.

EDIT: This Issue seems to be present in lots of cases. It looks like general instability to me.

commented

Please provide crash reports and logs.

It looks like general instability to me.

This kind of instability can be caused by the JVM optimizations and it is unrelated to the mod itself.

commented

---- Minecraft Crash Report ----
// Why did you do that?

Time: 24/03/2022, 20:09
Description: Exception in server tick loop

java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot read the array length because "$$0" is null
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
at com.ishland.c2me.common.util.InvokingExecutorService.execute(InvokingExecutorService.java:94)
at java.base/java.util.concurrent.CompletableFuture.asyncSupplyStage(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.supplyAsync(Unknown Source)
at net.minecraft.class_3754.method_12088(class_3754.java:348)
at net.minecraft.class_2806.method_38284(class_2806.java:101)
at net.minecraft.class_2806$$Lambda$2661/0x00000000d2fb6938.doWork(Unknown Source)
at net.minecraft.class_2806.mdc237fd$lambda$runGenerationTask$0$3(class_2806.java:1091)
at net.minecraft.class_2806$$Lambda$6783/0x0000000032a73170.get(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Cannot read the array length because "$$0" is null
at net.minecraft.class_6916$class_6917.method_40470(class_6916.java:1175)
at net.minecraft.class_6916$class_6932.method_40470(class_6916.java:271)
at net.minecraft.class_6916$class_6932.method_40470(class_6916.java:271)
at net.minecraft.class_6916$class_6917.method_40470(class_6916.java:1165)
at net.minecraft.class_6916$class_6933.method_40470(class_6916.java:705)
at net.minecraft.class_6916$class_6943.method_40470(class_6916.java:252)
at net.minecraft.class_6916$class_6943.method_40470(class_6916.java:252)
at net.minecraft.class_6568$class_5917.method_40470(class_6568.java:648)
at net.minecraft.class_6568.method_40532(class_6568.java:288)
at net.minecraft.class_6568.method_38339(class_6568.java:312)
at net.minecraft.class_3754.method_33754(class_3754.java:385)
at net.minecraft.class_3754.method_38332(class_3754.java:349)
at net.minecraft.class_3754$$Lambda$6900/0x0000000032be9cb0.get(Unknown Source)
... 16 more

A detailed walkthrough of the error, its code path and all known details is as follows:

-- System Details --
Details:
Minecraft Version: 1.18.2
Minecraft Version ID: 1.18.2
Operating System: Windows 11 (amd64) version 10.0
Java Version: 17.0.2, IBM Corporation
Java VM Version: Eclipse OpenJ9 VM (JRE 17 Windows 11 amd64-64-Bit Compressed References 20220128_95 (JIT enabled, AOT enabled)
OpenJ9 - 9dccbe076
OMR - dac962a28
JCL - 64cd399ca28 based on jdk-17.0.2+8), Eclipse OpenJ9
Memory: 1052925128 bytes (1004 MiB) / 2401501184 bytes (2290 MiB) up to 8589934592 bytes (8192 MiB)
CPUs: 16
Processor Vendor: AuthenticAMD
Processor Name: AMD Ryzen 7 5700G with Radeon Graphics
Identifier: AuthenticAMD Family 25 Model 80 Stepping 0
Microarchitecture: Zen 3
Frequency (GHz): 3,79
Number of physical packages: 1
Number of physical CPUs: 8
Number of logical CPUs: 16
Graphics card #0 name: AMD Radeon(TM) Graphics
Graphics card #0 vendor: Advanced Micro Devices, Inc. (0x1002)
Graphics card #0 VRAM (MB): 512,00
Graphics card #0 deviceId: 0x1638
Graphics card #0 versionInfo: DriverVersion=30.0.13026.3
Memory slot #0 capacity (MB): 16384,00
Memory slot #0 clockSpeed (GHz): 3,20
Memory slot #0 type: DDR4
Virtual memory max (MB): 18143,21
Virtual memory used (MB): 12216,29
Swap memory total (MB): 2432,00
Swap memory used (MB): 285,77
JVM Flags: 11 total; -Xoptionsfile=C:\Users\leo\Downloads\ibm-semeru-open-jre_x64_windows_17.0.2_8_openj9-0.30.0\jdk-17.0.2+8-jre\lib\options.default -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 -Xjcl:jclse29 -Xgc:concurrentScavenge -Xdisableexplicitgc -Xconmeter:dynamic -Xnuma:none -Xaggressive -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms2048m -Xmx8192m
Fabric Mods:
blue_endless_jankson: jankson 1.2.1
breakfree: Break Free 1.0.1
c2me: Concurrent Chunk Management Engine 0.2.0+alpha.7.0
canvas: Canvas Renderer 1.0.2308
cloth-basic-math: cloth-basic-math 0.6.0
cloth-config: Cloth Config v6 6.2.57
com_ishland_c2me_libs_: libs 0.2.0+alpha.7.0
cullleaves: Cull Leaves 2.3.2
enhanced_attack_indicator: Enhanced Attack Indicator 1.0.2+1.18
fabric: Fabric API 0.48.0+1.18.2
fabric-api-base: Fabric API Base 0.4.4+d7c144a860
fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.5.7+d7c144a860
fabric-biome-api-v1: Fabric Biome API (v1) 8.0.3+801ec85b60
fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.12+3ac43d9560
fabric-command-api-v1: Fabric Command API (v1) 1.1.9+d7c144a860
fabric-commands-v0: Fabric Commands (v0) 0.2.8+b4f4f6cd60
fabric-containers-v0: Fabric Containers (v0) 0.1.21+d7c144a860
fabric-content-registries-v0: Fabric Content Registries (v0) 3.0.2+d82b939260
fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.11+3ac43d9560
fabric-dimensions-v1: Fabric Dimensions API (v1) 2.1.17+2540745460
fabric-entity-events-v1: Fabric Entity Events (v1) 1.4.8+d7c144a860
fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.19+d7c144a860
fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.13+d7c144a860
fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.13+d7c144a860
fabric-item-api-v1: Fabric Item API (v1) 1.3.3+691a79b560
fabric-item-groups-v0: Fabric Item Groups (v0) 0.3.10+3ac43d9560
fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.12+54e5b2ec60
fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.10+b4f4f6cd60
fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.0.2+2540745460
fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.11+d7c144a860
fabric-mining-level-api-v1: Fabric Mining Level API (v1) 2.0.4+d1027f7d60
fabric-models-v0: Fabric Models (v0) 0.3.6+d7c144a860
fabric-networking-api-v1: Fabric Networking API (v1) 1.0.21+d882b91560
fabric-networking-v0: Fabric Networking (v0) 0.3.8+b4f4f6cd60
fabric-object-builder-api-v1: Fabric Object Builder API (v1) 2.0.3+40c91ec860
fabric-particles-v1: Fabric Particles (v1) 0.2.12+526dc1ac60
fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.9.8+0d9ab37260
fabric-renderer-api-v1: Fabric Renderer API (v1) 0.4.13+d882b91560
fabric-renderer-indigo: Fabric Renderer - Indigo 0.4.17+d8c7b9ae60
fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.11+b4f4f6cd60
fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.7+d7c144a860
fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 2.0.2+54e5b2ec60
fabric-rendering-v0: Fabric Rendering (v0) 1.1.13+b4f4f6cd60
fabric-rendering-v1: Fabric Rendering (v1) 1.10.7+54e5b2ec60
fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 2.0.2+d1027f7d60
fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.4.18+2de5574560
fabric-screen-api-v1: Fabric Screen API (v1) 1.0.10+d882b91560
fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.14+40c91ec860
fabric-textures-v0: Fabric Textures (v0) 1.0.12+3ac43d9560
fabric-transfer-api-v1: Fabric Transfer API (v1) 1.5.14+cca23f9360
fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 1.0.0+40c91ec860
fabricloader: Fabric Loader 0.13.3
ferritecore: FerriteCore 4.2.0
forcecloseloadingscreen: kennytv's epic force close loading screen mod for Fabric 1.1.0
fpsdisplay: FPS-Display 1.4.2+1.18.2
frex: FREX 6.0.242
hotbarswap: Hotbar Swap 1.0.2
io_vram_bitkit: bitkit 1.0.4
io_vram_bitraster: bitraster 1.5.53
io_vram_dtklib: dtklib 1.0.4
io_vram_special-circumstances: special-circumstances 1.10.7
java: Eclipse OpenJ9 VM 17
json-model-extensions: JSON Model Extensions 1.22.246
lambdabettergrass: LambdaBetterGrass 1.2.3+1.18
lazydfu: LazyDFU 0.1.2
lithium: Lithium 0.7.9
midnightlib: MidnightLib 0.2.9
minecraft: Minecraft 1.18.2
modmenu: Mod Menu 3.1.0
mojangster: Mojangster 1.17-1.18-4.1.2a
no-telemetry: No Telemetry 1.3.0
onebar: OneBar 2.3.0
org_anarres_jcpp: jcpp 1.4.14
resounding: Resounding 1.0.0-bc.9
skiptransitions: Skip Transitions 1.3.1+mc1.18.2
smoothboot: Smooth Boot 1.18.2-1.7.0
spruceui: SpruceUI 3.3.3+1.18
starlight: Starlight 1.0.2+fabric.89b8d9f
textweaks: TexTweaks 1.18.1-2.0.0
titlefixer: Title Fixer 1.0+1.18
tooltipfix: ToolTip Fix 1.0.4-1.18
Server Running: true
Player Count: 0 / 8; []
Data Packs: vanilla
World Generation: Stable
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fabric'; Server brand changed to 'fabric'

I only have the crash report left, but as you said, its probably just the jvm arguments not handling this kind of mod very well, especially since this is running on openj9 and not on the more widely used hotspot vm. It only happens after joining a newly generated world, not after joining an already generated world and loading chunks, so i thought there might be an easy fix.

Only the -Xaggressive flag is whats causing the issue, so some of the other flags are different in this report. I will just keep it off.