Memory leak in chunk caching
solonovamax opened this issue ยท 0 comments
Some information
Operating system: Arch Linux 5.17.5-lqx1-1-lqx
Java version: OpenJDK Runtime Environment (build 18.0.1+10)
Minecraft version: 1.18.2
Baritone version: 1.8.3 (build from source at commit 8a0771e
Other mods (if used):
Mods list
- advanced_runtime_resource_pack 0.5.5 via enhancedblockentities
- advancedchatbox 1.18-1.1.3
- advancedchatcore 1.18.2-1.5.0
- advancedchatfilters 1.18.2-1.2.3
- advancedchathud 1.18.2-1.3.2
- advancedchatlog 1.18.2-1.2.1
- advancedchatmacros 1.18.2-1.0.0
- advancementinfo 1.18.2-fabric0.47.10-1.3.1
- afkpeace 4.7.1
- antighost 1.18.2-fabric0.47.10-1.1.4
- appleskin 2.4.0+mc1.18.2
- architectury 4.2.50
- baritone 1.8.3
- bebooks 1.2.13
- bedrockskinutility 1.2.1
- betterbeds 1.2.0
- betterblockoutline 1.4.2-1.18.1
- bettercommandblock 2.5.10
- betterdarkmode 1.0.5
- blue_endless_jankson 1.2.1 via jankson
- blur 2.4.1
- boathud 1.1.0
- brb 1.5.6
- caffeineconfig 1.1.0 via sodium-extra
- capes 1.3.0+1.18.2
- capetweaks 1.0.0
- carpet 1.4.69
- carpet-fixes 1.18.x-1.7.6+v220420
- carpet-tctc-addition 1.1.8+d0f86ca
- carpet-tis-addition 1.33.0
- chesttracker 1.1.13
- clickthrough 1.18.2-fabric0.47.10-0.4
- clientarguments 1.3.1 via clientcommands
- clientcommands 2.6.6
- clientcommands-scripting 1.3.2 via clientcommands
- cloth-api 3.2.64
- cloth-basic-math 0.6.0 via cloth-config
- cloth-client-events-v0 3.2.64 via cloth-api
- cloth-common-events-v1 3.2.64 via cloth-api
- cloth-config 6.2.57
- cloth-config-lite 2.0.6 via omega-config-gui
- cloth-datagen-api-v1 3.2.64 via cloth-api
- cloth-scissors-api-v1 3.2.64 via cloth-api
- cloth-utils-v1 3.2.64 via cloth-api
- colormatic 3.1.1+mc.1.18.2
- com_carrotsearch_hppc 0.9.0 via advancedchatbox
- com_electronwill_night-config_core 3.6.5 via advancedchatcore
- com_electronwill_night-config_toml 3.6.5 via advancedchatcore
- com_github_darkkronicle_konstruct_addons 2.0.3-build1 via advancedchatcore
- com_github_darkkronicle_konstruct_core 2.0.3-build1 via advancedchatcore
- com_github_llamalad7_mixinextras 0.0.6 via carpet-fixes
- com_github_meteordevelopment_starscript 0.1.9 via respackopts
- com_moandjiezana_toml_toml4j 0.7.2 via dynamicfps
- com_velocitypowered_velocity-native 1.1.0-SNAPSHOT via krypton
- conditional-mixin 0.2.0 via carpet-tis-addition
- continuity 1.1.0+1.18.2
- crowdin-translate 1.4+1.18.2 via clickthrough
- cullleaves 2.3.2
- durabilityviewer 1.18.2-fabric0.47.10-1.10.3
- dynamicfps 2.1.0
- ears 1.4.5_01
- edu_washington_cs_knowitall_opennlp-chunk-models 1.5 via advancedchatbox
- edu_washington_cs_knowitall_opennlp-postag-models 1.5 via advancedchatbox
- edu_washington_cs_knowitall_opennlp-tokenize-models 1.5 via advancedchatbox
- enhanced_attack_indicator 1.0.3+1.18
- enhancedblockentities 0.6+1.18.2
- entity_texture_features 2.6.0
- entityculling 1.5.1
- fabric 0.51.1+1.18.2
- fabric-api-lookup-api-v1 1.6.0+2373a54560 via fabric
- fabric-biome-api-v1 8.0.4+7b0f312660 via fabric
- fabric-blockrenderlayer-v1 1.1.12+3ac43d9560 via fabric
- fabric-commands-v0 0.2.8+b4f4f6cd60 via fabric
- fabric-containers-v0 0.1.21+d7c144a860 via fabric
- fabric-content-registries-v0 3.0.3+d82b939260 via fabric
- fabric-convention-tags-v1 1.0.1+474e4f7960 via fabric
- fabric-crash-report-info-v1 0.1.11+3ac43d9560 via fabric
- fabric-dimensions-v1 2.1.17+2540745460 via fabric
- fabric-entity-events-v1 1.4.8+d7c144a860 via fabric
- fabric-events-interaction-v0 0.4.19+d7c144a860 via fabric
- fabric-events-lifecycle-v0 0.2.14+d7c144a860 via fabric
- fabric-game-rule-api-v1 1.0.13+d7c144a860 via fabric
- fabric-item-api-v1 1.4.0+4457765560 via fabric
- fabric-item-groups-v0 0.3.11+91896a4960 via fabric
- fabric-key-binding-api-v1 1.0.12+54e5b2ec60 via fabric
- fabric-keybindings-v0 0.2.10+b4f4f6cd60 via fabric
- fabric-language-kotlin 1.7.2+kotlin.1.6.20
- fabric-loot-tables-v1 1.0.11+d7c144a860 via fabric
- fabric-mining-level-api-v1 2.1.0+81ea5b3c60 via fabric
- fabric-models-v0 0.3.6+d7c144a860 via fabric
- fabric-networking-api-v1 1.0.21+d882b91560 via fabric
- fabric-networking-v0 0.3.8+b4f4f6cd60 via fabric
- fabric-object-builder-api-v1 2.1.0+fe4ddef060 via fabric
- fabric-particles-v1 0.2.12+526dc1ac60 via fabric
- fabric-registry-sync-v0 0.9.8+0d9ab37260 via fabric
- fabric-renderer-api-v1 0.4.13+d882b91560 via fabric
- fabric-renderer-indigo 0.5.0+7faf0d8860 via fabric
- fabric-renderer-registries-v1 3.2.11+b4f4f6cd60 via fabric
- fabric-rendering-data-attachment-v1 0.3.7+d7c144a860 via fabric
- fabric-rendering-fluids-v1 2.0.2+54e5b2ec60 via fabric
- fabric-rendering-v0 1.1.13+b4f4f6cd60 via fabric
- fabric-rendering-v1 2.0.0+1.18.2-SNAPSHOT via inspecio
- fabric-resource-conditions-api-v1 2.0.3+91b7aa6660 via fabric
- fabric-screen-api-v1 1.0.10+d882b91560 via fabric
- fabric-screen-handler-api-v1 1.2.0+1f6558e860 via fabric
- fabric-textures-v0 1.0.12+3ac43d9560 via fabric
- fabric-transfer-api-v1 1.6.0+2373a54560 via fabric
- fabric-transitive-access-wideners-v1 1.0.0+bd8a4a1860 via fabric
- fabricloader 0.13.3
- fabrishot ${version}
- fallingleaves 1.10.0+1.18.2
- ferritecore 4.2.1
- flighthelper 1.18.2-fabric0.47.10-1.2.2
- gbfabrictools 1.3.4+1.18.2 via clickthrough
- horsestatsvanilla 4.1.10
- hudtweaks 1.2.3-beta
- hudtweaks_hudtweaks-apihelper_ 1.0-beta via hudtweaks
- ias 7.1.3
- illuminations 1.10.3
- indium 1.0.3+mc1.18.2
- inspecio 1.3.0+1.18
- inventoryprofilesnext 1.3.5
- invmove 0.7.0
- io_github_maowimpl_owo 2.0.0 via advancedchatcore
- iris 1.2.4-build.38
- isometric-renders 0.2.12+1.18
- itemmodelfix 1.0.3+1.18
- itemscroller 0.16.0
- ivan-carpet-addition 2.0.2
- jankson 4.0.0+j1.2.0 via libgui
- java 18
- javax_measure_unit-api 2.1.3 via advancedchatbox
- javax_xml_bind_jaxb-api 2.3.1 via advancedchatbox
- kirin 1.10.0 via presencefootsteps
- kommandlib 0.1.0-1.18.1 via advancedchatcore
- krypton 0.1.9
- lambdabettergrass 1.2.3+1.18
- lambdynlights 2.1.0+1.17
- lazydfu 0.1.2
- libgui 5.3.1+1.18 via chesttracker
- libjf-base 2.5.0 via respackopts
- libjf-data-manipulation-v0 2.5.0 via respackopts
- libjf-unsafe-v0 2.5.0 via respackopts
- libninepatch 1.1.0 via libgui
- libzoomer 0.4.2+1.18.2 via okzoomer
- litematica 0.11.3
- litematica_printer 2.3
- lithium 0.7.9
- lowfire 1.18.2-2.0.1
- malilib 0.12.1
- midnightlib 0.3.1 via blur
- minecraft 1.18.2
- minihud 0.22.0
- mixintrace 1.1.0+1.17
- modmenu 3.2.1
- monsters_in_the_closet 1.0.3+1.18
- multiconnect-api 1.5.10 via clientcommands
- net_loomchild_segment 2.0.3 via advancedchatbox
- net_sf_trove4j_trove4j 3.0.3 via advancedchatbox
- nmuk 1.0.1+mc1.18-pre1
- no-telemetry 1.3.0
- not-enough-servers 1.0.2
- notenoughcrashes 4.1.6+1.18.2
- okzoomer 5.0.0-beta.6+1.18.2
- omega-config 1.2.3-1.18.1 via capes
- omega-config-gui 1.2.2-1.18.1 via afkpeace
- org_anarres_jcpp 1.4.14 via iris
- org_apache_commons_commons-csv 1.8 via advancedchatcore
- org_apache_opennlp_opennlp-tools 1.9.3 via advancedchatbox
- org_carrot2_morfologik-fsa 2.1.7 via advancedchatbox
- org_carrot2_morfologik-fsa-builders 2.1.7 via advancedchatbox
- org_carrot2_morfologik-speller 2.1.7 via advancedchatbox
- org_carrot2_morfologik-stemming 2.1.7 via advancedchatbox
- org_javadelight_delight-nashorn-sandbox 0.2.5 via advancedchatfilters
- org_jetbrains_intellij_deps_trove4j 1.0.20200330 via advancedchatbox
- org_jetbrains_kotlin_kotlin-reflect 1.6.20 via fabric-language-kotlin
- org_jetbrains_kotlin_kotlin-stdlib 1.6.20 via fabric-language-kotlin
- org_jetbrains_kotlin_kotlin-stdlib-jdk7 1.6.20 via fabric-language-kotlin
- org_jetbrains_kotlin_kotlin-stdlib-jdk8 1.6.20 via fabric-language-kotlin
- org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm 1.6.0 via fabric-language-kotlin
- org_jetbrains_kotlinx_kotlinx-coroutines-jdk8 1.6.0 via fabric-language-kotlin
- org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm 1.3.2 via fabric-language-kotlin
- org_jetbrains_kotlinx_kotlinx-serialization-core-jvm 1.3.2 via fabric-language-kotlin
- org_jetbrains_kotlinx_kotlinx-serialization-json-jvm 1.3.2 via fabric-language-kotlin
- org_joml_joml 1.10.2 via sodium
- org_languagetool_language-en 5.5 via advancedchatbox
- org_languagetool_languagetool-core 5.5 via advancedchatbox
- org_mariuszgromada_math_mathparser_org-mxparser 4.4.2 via advancedchatcore
- org_openjdk_nashorn_nashorn-core 15.3 via advancedchatfilters
- org_quiltmc_quilt-json5 1.0.0 via okzoomer
- org_webjars_bower_js-beautify 1.9.0 via advancedchatfilters
- org_yaml_snakeyaml 1.30 via carpet-tis-addition
- perspektive 1.0.2
- pickblockpro 1.5.8
- plasmo_voice 1.2.12
- presencefootsteps 1.5.0
- pride 1.1.0+1.17 via lambdynlights
- quilt_base 1.0.0+1.18.2-SNAPSHOT via quilted-fabric-api-base
- quilt_client_command 1.0.0+1.18.2-SNAPSHOT via quilted-fabric-command-api-v1
- quilt_command 1.0.0+1.18.2-SNAPSHOT via quilted-fabric-command-api-v1
- quilt_lifecycle_events 1.0.0+1.18.2-SNAPSHOT via quilted-fabric-lifecycle-events-v1
- quilt_resource_loader 1.0.0+1.18.2-SNAPSHOT via quilted-fabric-resource-loader-v0
- quilt_tags 1.0.0+1.18.2-SNAPSHOT via inspecio
- quilt_tooltip 1.0.0+1.18.2-SNAPSHOT via fabric-rendering-v1
- quilted-fabric-api-base 1.0.0+1.18.2-SNAPSHOT via inspecio
- quilted-fabric-command-api-v1 2.0.0+1.18.2-SNAPSHOT via inspecio
- quilted-fabric-lifecycle-events-v1 3.0.0+1.18.2-SNAPSHOT via okzoomer
- quilted-fabric-resource-loader-v0 1.0.2+1.18.2-SNAPSHOT via okzoomer
- rebind_all_the_keys 1.1.1+1.18
- reeses-sodium-options 1.4.2
- replaymod 1.18.2-2.6.4
- resclone 1.8.1
- respackopts 2.10.0
- satin 1.7.0 via blur
- servertick 1.6
- short_grass 1.0.0
- sodium 0.4.1+build.15
- sodium-extra 0.4.3
- spruceui 3.3.3+1.18 via lambdabettergrass
- spu 1.0
- starlight 1.0.2+fabric.89b8d9f
- stendhal 1.2.0-1.18
- suggestionproviderfix 1.0.1
- tech_units_indriya 1.3 via advancedchatbox
- tech_uom_lib_uom-lib-common 1.1 via advancedchatbox
- textweaks 1.18.1-2.0.0
- titlefixer 1.0+1.18
- tweakeroo 0.13.1
- watson 1.14.2
- whereisit 1.14.10 via chesttracker
- wildfire_gender 2.9
- worldedit 7.2.10+1742f98
- worldmesher 0.2.6+1.18 via isometric-renders
Exception, error or logs
Debug logs: debug.log.zip
Flame graph of memory allocations:
Looking at the mappings in build/tmp/proguard
(from where I compiled baritone), baritone.fm
does not seem to correctly match up.
However, I managed to find the class it corresponds to, and believe that it is the class baritone.utils.BlockStateInterface
which is leaking memory.
It seems it's invoking IClientChunkProvider#createThreadSafeCopy
, which is creating a lot of objects. And then, for some reason, said objects are not getting GC'ed
My current baritone jar:
baritone jar.zip
How to reproduce
Add your steps to reproduce the issue/bug experienced here.
- Launch game
- do some shit for a few hours
- mem will be absurdly high (I've had upwards of 24gb before)
Modified settings
To get the modified settings run #modified
in game
[Baritone] > modified
[Baritone] All modified settings:
[Baritone] allowParkour (Boolean)
[Baritone] chatControl (Boolean)
[Baritone] --
[Baritone] --
[Baritone] --
[Baritone] --
[Baritone] --
[Baritone] --
[Baritone] << | >> 1/1
Final check
list
- I know how to properly use check boxes
- I have included the version of Minecraft I'm running, baritone's version and forge mods (if used).
- I have included logs, exceptions and / or steps to reproduce the issue.
- I have not used any OwO's or UwU's in this issue.