RelativityMC / C2ME-fabric

A Fabric mod designed to improve the chunk performance of Minecraft.
MIT License
522 stars 45 forks source link

Client freezes for minutes when playing on a server with c2me #100

Closed Cloudperry closed 2 years ago

Cloudperry commented 2 years ago

When using c2me on a client and a server, repeatedly going through nether portals freezes the game for a long time. This doesn't happen when playing single player on the client's internal server. Haven't tested yet if this happens with c2me and no other mods. I have tested this with a build from github actions and with the latest jar from modrinth. The client freezes for 6 minutes as can be seen from the gap in the timestamps in the log.

Mod list

``` [19:07:04] [main/INFO]: Loading 146 mods: - advanced_runtime_resource_pack 0.5.4 - advancementinfo 1.18-fabric0.43.1-1.3 - animatica 0.2+1.18 - antighost 1.18-fabric0.43.1-1.1.4 - architectury 3.3.5 - autoconfig1u 3.3.1 via image2map - bettermounthud 1.1.3 - bettersafebed 1.18-fabric-a - blue_endless_jankson 1.2.1 via kyrptconfig - brb 1.5.6 - c2me 0.2.0+alpha.5.106 - capes 1.2.2+1.18 - carpet 1.4.56 - carpet-autocraftingtable 1.4.56 - carpet-extra 1.4.56 - cem 0.7.0 - citresewn 0.8.1-1.18 - cloth-api 2.0.54 - cloth-basic-math 0.6.0 via cloth-config - cloth-client-events-v0 2.0.54 via cloth-api - cloth-common-events-v1 2.0.54 via cloth-api - cloth-config 6.1.48 - cloth-datagen-api-v1 2.0.54 via cloth-api - cloth-scissors-api-v1 2.0.54 via cloth-api - cloth-utils-v1 2.0.54 via cloth-api - colormatic 2.4.0+mc.1.18 - com_github_meteordevelopment_starscript 0.1.5 via respackopts - com_moandjiezana_toml_toml4j 0.7.2 via dynamicfps - com_velocitypowered_velocity-native 1.1.0-SNAPSHOT via krypton - commandaliases 0.5.0 - connected-doors 1.1+1.18 - continuity 1.0.3+1.18 - crowdin-translate 1.4+1.18 via antighost - cullleaves 2.3.2 - dcch 2.0+1.17 - dynamicfps 2.0.6 - elativitymc_c2me-fabric_ver_1_18_libs_ 0.2.0+alpha.5.106 via c2me - enhancedblockentities 0.5+1.18 - entityculling 1.3.3 - fabric 0.45.0+1.18 - fabric-api-base 0.4.1+b4f4f6cd14 via citresewn - fabric-api-lookup-api-v1 1.5.0+17be577f65 via fabric - fabric-biome-api-v1 6.0.1+ded849a965 via fabric - fabric-blockrenderlayer-v1 1.1.9+3ac43d9565 via fabric - fabric-command-api-v1 1.1.6+3ac43d9514 via citresewn - fabric-commands-v0 0.2.5+b4f4f6cd65 via fabric - fabric-containers-v0 0.1.18+d154e2c665 via fabric - fabric-content-registries-v0 0.4.5+6f53a73d65 via fabric - fabric-crash-report-info-v1 0.1.8+3ac43d9565 via fabric - fabric-dimensions-v1 2.1.7+43d2957165 via fabric - fabric-entity-events-v1 1.4.5+6b21378a65 via fabric - fabric-events-interaction-v0 0.4.16+bfa23f1765 via fabric - fabric-events-lifecycle-v0 0.2.6+b4f4f6cd65 via fabric - fabric-game-rule-api-v1 1.0.10+3ac43d9565 via fabric - fabric-item-api-v1 1.3.0+691a79b565 via fabric - fabric-item-groups-v0 0.3.3+3ac43d9565 via fabric - fabric-key-binding-api-v1 1.0.8+c8aba2f365 via fabric - fabric-keybindings-v0 0.2.6+b4f4f6cd65 via fabric - fabric-language-kotlin 1.7.1+kotlin.1.6.10 - fabric-lifecycle-events-v1 1.4.10+c15ca33565 via fabric - fabric-loot-tables-v1 1.0.8+3ac43d9565 via fabric - fabric-mining-level-api-v1 1.0.3+3ac43d9565 via fabric - fabric-mining-levels-v0 0.1.7+b4f4f6cd65 via fabric - fabric-models-v0 0.3.3+3ac43d9565 via fabric - fabric-networking-api-v1 1.0.18+3ac43d9565 via fabric - fabric-networking-v0 0.3.5+b4f4f6cd65 via fabric - fabric-object-builder-api-v1 1.11.0+3b82842e65 via fabric - fabric-object-builders-v0 0.7.8+3ac43d9565 via fabric - fabric-particles-v1 0.2.9+526dc1ac65 via fabric - fabric-registry-sync-v0 0.8.6+533be9ba65 via fabric - fabric-renderer-api-v1 0.4.9+3ac43d9565 via fabric - fabric-renderer-indigo 0.4.12+3ac43d9565 via fabric - fabric-renderer-registries-v1 3.2.7+b4f4f6cd65 via fabric - fabric-rendering-data-attachment-v1 0.3.4+7242e9d765 via fabric - fabric-rendering-fluids-v1 0.1.18+3ac43d9565 via fabric - fabric-rendering-v0 1.1.9+b4f4f6cd65 via fabric - fabric-rendering-v1 1.10.3+6b21378a65 via fabric - fabric-resource-loader-v0 0.4.11+3ac43d9514 via malilib - fabric-screen-api-v1 1.0.7+3ac43d9565 via fabric - fabric-screen-handler-api-v1 1.1.11+3ac43d9565 via fabric - fabric-structure-api-v1 2.0.8+295197a765 via fabric - fabric-tag-extensions-v0 1.2.5+3ac43d9565 via fabric - fabric-textures-v0 1.0.9+3ac43d9565 via fabric - fabric-tool-attribute-api-v1 1.3.4+7de09f5565 via fabric - fabric-transfer-api-v1 1.5.6+b4f4f6cd65 via fabric - fabricloader 0.12.12 - fabrishot 1.6.0 - ferritecore 4.0.0 - image2map 0.2.2 - indium 1.0.2-alpha1+mc1.18 - inspecio 1.1.0+1.17 - inventorysorter 1.8.1-1.18 - iris 1.1.4-starline+build.672 - itemmodelfix 1.0.3+1.18 - java 17 - krypton 0.1.6 - kyrptconfig 1.2.5-1.18 via inventorysorter - lambdabettergrass 1.2.2+1.17 - lambdynlights 2.1.0+1.17 - lazydfu 0.1.2 - libjf-base 2.2.0 via respackopts - libjf-data-manipulation-v0 2.2.0 via respackopts - libjf-unsafe-v0 2.2.0 via respackopts - litematica 0.9.0 - lithium 0.7.6 - malilib 0.10.0-dev.26 - midnightlib 0.2.9 via cullleaves - minecraft 1.18.1 - minihud 0.19.0-dev.20211204.230657 - mm 2.1 via slight-gui-modifications - modmenu 3.0.1 - morechathistory 1.1.0 - no-telemetry 1.3.0 - notenoughanimations 1.4.0 - org_anarres_jcpp 1.4.14 via iris - org_codehaus_groovy_groovy 3.0.8 via slight-gui-modifications - org_codehaus_groovy_groovy-jsr223 3.0.8 via slight-gui-modifications - org_jetbrains_kotlin_kotlin-reflect 1.6.10 via fabric-language-kotlin - org_jetbrains_kotlin_kotlin-stdlib 1.6.10 via fabric-language-kotlin - org_jetbrains_kotlin_kotlin-stdlib-jdk7 1.6.10 via fabric-language-kotlin - org_jetbrains_kotlin_kotlin-stdlib-jdk8 1.6.10 via fabric-language-kotlin - org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm 1.5.2 via fabric-language-kotlin - org_jetbrains_kotlinx_kotlinx-coroutines-jdk8 1.5.2 via fabric-language-kotlin - org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm 1.3.1 via fabric-language-kotlin - org_jetbrains_kotlinx_kotlinx-serialization-core-jvm 1.3.1 via fabric-language-kotlin - org_jetbrains_kotlinx_kotlinx-serialization-json-jvm 1.3.1 via fabric-language-kotlin - org_joml_joml 1.10.2 via sodium - org_slf4j_slf4j-api 1.7.12 via iris - pinglist 1.3.3 - pride 1.1.0+1.17 via lambdynlights - rebind_all_the_keys 1.1.1+1.18 - reeses-sodium-options 1.2.4 - respackopts 2.9.0 - slight-gui-modifications 2.0.2 - sodium 0.4.0-alpha5+build.816 - sodium-extra 0.3.7 - sound_physics_remastered 1.18.1-1.0.3 - spruceui 3.3.2+1.17 via lambdabettergrass - starlight 1.0.0+fabric.d0a3220 - syncmatica 0.2.6 - tooltipfix 1.0.4-1.18 - tweakeroo 0.11.0 - wi_zoom 1.3-MC1.18.1 - xaerominimap 21.23.0 - xaeroworldmap 1.19.0 - yosbr 0.1.1 ```

Client log

``` [19:13:20] [Render thread/INFO]: Connecting to 127.0.0.1, 25565 [19:13:21] [Render thread/INFO]: [STDOUT]: New minimap session initialized! [19:13:21] [Render thread/INFO]: [STDOUT]: New world map session initialized! [19:13:21] [Render thread/INFO]: Started 6 worker threads [19:13:21] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [19:13:21] [Render thread/INFO]: Destroying pipeline OVERWORLD [19:13:21] [Render thread/INFO]: Using 3 total BufferBuilder caches [19:13:22] [Render thread/INFO]: Creating pipeline for dimension OVERWORLD [19:13:22] [Netty Epoll Client IO #0/INFO]: Joined carpet server with matching carpet version [19:13:22] [Render thread/INFO]: [STDOUT]: Minimap updated server level id: -467313767 for world ResourceKey[minecraft:dimension / minecraft:overworld] [19:13:22] [Render thread/INFO]: Loaded 618 advancements [19:13:22] [Render thread/INFO]: Joining syncmatica server with local version 0.2.6 and server version 0.2.6 [19:14:45] [Render thread/INFO]: Stopping worker threads [19:14:45] [Render thread/INFO]: Started 6 worker threads [19:14:45] [Render thread/INFO]: Stopping worker threads [19:14:45] [Render thread/INFO]: Started 6 worker threads [19:14:45] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [19:14:45] [Render thread/INFO]: Destroying pipeline OVERWORLD [19:14:46] [Render thread/INFO]: [STDOUT]: Minimap updated server level id: -467313767 for world ResourceKey[minecraft:dimension / minecraft:the_nether] [19:14:46] [Render thread/WARN]: Received passengers for unknown entity [19:14:46] [Render thread/INFO]: Creating pipeline for dimension NETHER [19:14:47] [Render thread/WARN]: Received passengers for unknown entity [19:14:53] [Render thread/INFO]: Stopping worker threads [19:14:53] [Render thread/INFO]: Started 6 worker threads [19:14:53] [Render thread/INFO]: Stopping worker threads [19:14:53] [Render thread/INFO]: Started 6 worker threads [19:14:53] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [19:14:53] [Render thread/INFO]: Destroying pipeline NETHER [19:14:54] [Render thread/INFO]: [STDOUT]: Minimap updated server level id: -467313767 for world ResourceKey[minecraft:dimension / minecraft:overworld] [19:14:55] [Render thread/INFO]: Creating pipeline for dimension OVERWORLD [19:14:58] [Render thread/WARN]: Received passengers for unknown entity [19:15:10] [Render thread/INFO]: Stopping worker threads [19:15:10] [Render thread/INFO]: Started 6 worker threads [19:15:10] [Render thread/INFO]: Stopping worker threads [19:15:10] [Render thread/INFO]: Started 6 worker threads [19:15:10] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [19:15:10] [Render thread/INFO]: Destroying pipeline OVERWORLD [19:15:11] [Render thread/INFO]: [STDOUT]: Minimap updated server level id: -467313767 for world ResourceKey[minecraft:dimension / minecraft:the_nether] [19:15:11] [Render thread/WARN]: Received passengers for unknown entity [19:15:11] [Render thread/WARN]: Received passengers for unknown entity [19:15:11] [Render thread/INFO]: Creating pipeline for dimension NETHER [19:15:16] [Render thread/WARN]: Received passengers for unknown entity [19:15:22] [Render thread/INFO]: Stopping worker threads [19:15:22] [Render thread/INFO]: Started 6 worker threads [19:15:22] [Render thread/INFO]: Stopping worker threads [19:15:22] [Render thread/INFO]: Started 6 worker threads [19:15:22] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [19:15:22] [Render thread/INFO]: Destroying pipeline NETHER [19:15:23] [Render thread/INFO]: [STDOUT]: Minimap updated server level id: -467313767 for world ResourceKey[minecraft:dimension / minecraft:overworld] [19:15:23] [Render thread/INFO]: Creating pipeline for dimension OVERWORLD [19:15:27] [Render thread/WARN]: Received passengers for unknown entity [19:15:38] [Render thread/INFO]: Stopping worker threads [19:15:38] [Render thread/INFO]: Started 6 worker threads [19:15:38] [Render thread/INFO]: Stopping worker threads [19:15:38] [Render thread/INFO]: Started 6 worker threads [19:15:38] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [19:15:38] [Render thread/INFO]: Destroying pipeline OVERWORLD [19:15:39] [Render thread/INFO]: [STDOUT]: Minimap updated server level id: -467313767 for world ResourceKey[minecraft:dimension / minecraft:the_nether] [19:15:39] [Render thread/WARN]: Received passengers for unknown entity [19:15:39] [Render thread/WARN]: Received passengers for unknown entity [19:15:39] [Render thread/INFO]: Creating pipeline for dimension NETHER [19:15:49] [Render thread/INFO]: Stopping worker threads [19:15:49] [Render thread/INFO]: Started 6 worker threads [19:15:49] [Render thread/INFO]: Stopping worker threads [19:15:49] [Render thread/INFO]: Started 6 worker threads [19:15:49] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [19:15:49] [Render thread/INFO]: Destroying pipeline NETHER [19:15:50] [Render thread/INFO]: [STDOUT]: Minimap updated server level id: -467313767 for world ResourceKey[minecraft:dimension / minecraft:overworld] [19:15:50] [Render thread/INFO]: Creating pipeline for dimension OVERWORLD [19:15:54] [Render thread/WARN]: Received passengers for unknown entity [19:16:08] [Render thread/INFO]: Stopping worker threads [19:16:08] [Render thread/INFO]: Started 6 worker threads [19:16:09] [Render thread/INFO]: Stopping worker threads [19:16:09] [Render thread/INFO]: Started 6 worker threads [19:16:09] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [19:16:09] [Render thread/INFO]: Destroying pipeline OVERWORLD [19:16:09] [Render thread/INFO]: [STDOUT]: Minimap updated server level id: -467313767 for world ResourceKey[minecraft:dimension / minecraft:the_nether] [19:16:09] [Render thread/WARN]: Received passengers for unknown entity [19:16:10] [Render thread/WARN]: Received passengers for unknown entity [19:16:10] [Render thread/INFO]: Creating pipeline for dimension NETHER [19:16:18] [Render thread/INFO]: Stopping worker threads [19:16:18] [Render thread/INFO]: Started 6 worker threads [19:16:18] [Render thread/INFO]: Stopping worker threads [19:16:18] [Render thread/INFO]: Started 6 worker threads [19:16:18] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [19:16:18] [Render thread/INFO]: Destroying pipeline NETHER [19:16:19] [Render thread/INFO]: [STDOUT]: Minimap updated server level id: -467313767 for world ResourceKey[minecraft:dimension / minecraft:overworld] [19:16:19] [Render thread/INFO]: Creating pipeline for dimension OVERWORLD [19:16:24] [Render thread/WARN]: Received passengers for unknown entity [19:21:28] [Render thread/INFO]: [STDOUT]: Minimap session finalized. [19:21:28] [Render thread/INFO]: [STDOUT]: Finalizing world map session... [19:22:05] [Thread-9/INFO]: [STDOUT]: World map force-cleaned! [19:22:05] [Render thread/INFO]: [STDOUT]: World map session finalized. [19:22:07] [Render thread/INFO]: Stopping worker threads ```

ishland commented 2 years ago

I cannot reproduce this issue after going to and from the nether at least 40 times.

Cloudperry commented 2 years ago

Hmm. I can't reproduce this issue when using latest sodium and c2me together on a c2me server. I could get it to happen when running a sodium client without c2me on a c2me server though. Also worth noting is that I get a lot worse lag on dimension change with c2me and sodium both installed.

Sodium only: Screenshot_20220120_202649

Sodium and C2me: Screenshot_20220120_202047

These screenshots are both taken just after coming from the nether to the overworld, and in both cases I was spamming dimension changes for a while before the screenshots. The C2me SS has C2me on client and server and the Sodium one doesn't have C2me at all.

Setup: CPU: Ryzen 3600 GPU: RX Vega 56 RAM: 32 Gb 3200 Mhz Cl 16 Storage: 512 Gb nvme ssd (both server and client are on it) Server jvm arguments: -Xmx10G -XX:+UseShenandoahGC Client jvm arguments: -Xmx4G -XX:+UseShenandoahGC

Eidigii commented 2 years ago

I think this might be related:

[10384.849s][warning][gc,alloc] Server thread: Retried waiting for GCLocker too often allocating 524288 words [10384.849s][warning][gc,alloc] C2ME worker #1: Retried waiting for GCLocker too often allocating 524288 words [10384.849s][warning][gc,alloc] C2ME worker #5: Retried waiting for GCLocker too often allocating 390367 words [10384.856s][warning][gc,alloc] C2ME worker #3: Retried waiting for GCLocker too often allocating 352827 words [10384.857s][warning][gc,alloc] C2ME worker #7: Retried waiting for GCLocker too often allocating 452857 words [10394.571s][warning][gc,alloc] C2ME worker #6: Retried waiting for GCLocker too often allocating 256 words [10395.989s][warning][gc,alloc] C2ME worker #5: Retried waiting for GCLocker too often allocating 256 words [10395.989s][warning][gc,alloc] C2ME worker #8: Retried waiting for GCLocker too often allocating 256 words [10395.989s][warning][gc,alloc] C2ME worker #4: Retried waiting for GCLocker too often allocating 256 words [10413.948s][warning][gc,alloc] C2ME worker #8: Retried waiting for GCLocker too often allocating 449277 words [10413.948s][warning][gc,alloc] Server thread: Retried waiting for GCLocker too often allocating 524288 words [10413.955s][warning][gc,alloc] C2ME worker #5: Retried waiting for GCLocker too often allocating 390367 words [10413.955s][warning][gc,alloc] C2ME worker #2: Retried waiting for GCLocker too often allocating 399067 words

happens randomly for me when exploring. CPU cores get hammered and server timeouts all players.

using: c2me-fabric-mc1.18.1-0.2.0+alpha.6.25-all.jar