SpongePowered / SpongeForge

A Forge mod that implements SpongeAPI
http://www.spongepowered.org/
MIT License
1.14k stars 306 forks source link

Infinite (or very very large) Capture Block Change Server Time Out #2407

Closed AsuraTakun closed 6 years ago

AsuraTakun commented 6 years ago

I am currently running

Mods (175): Minecraft, Minecraft Coder Pack, Forge Mod Loader, Minecraft Forge, SpongeAPI, SpongeForge, AI Improvements, Advanced Chimneys, AgriCraft, Ambidextrous, AppleCore, Aquaculture, Aquatic, Aroma1997Core, AromaBackup, AromaBackuprecovery, Astikoor, AutoRegLib, Bad Wither No Cookie! Reloaded, Bailey's Dailies, Baubles, Baubley Heart Canisters, Bed Bugs, Better Builder's Wands, Better Fishing, Better Records, Better Than Mending, Better With Engineering, Better With Mods, Better with Addons, BiblioCraft, Bibliotheca, Blood Debug, Carry On, Chameleon, Chest Transporter, Chickens, ChinjufuMod, Chisel, CoFH World, CodeChicken Lib, Cooking for Blockheads, Coralreef, CosmeticArmorReworked, CosmeticArmorReworked Integration for TombManyGraves2, CraftTweaker JEI Support, CraftTweaker2, Craftable Horse Armour [CHA&S], Creeper Confetti, Cucumber Library, Culinary Construct, Death Quotes, Dimensional Doors, Doggy Talents, DungeonTactics, Dynamic Surroundings, Dynmap, DynmapBlockScan, E-Vaporate, EnderStorage, Engineer's Doors, Extra Alchemy, Fairy Lights, Familiar Fauna, FannyPack, Farming for Blockheads, Fast Leaf Decay, Faster Ladder Climbing, Fence Overhaul, FoamFix, FoamFixCore, Forge Endertech, Friendly Fire, Garden Stuff, Hardcore Buoy, Harvest, Hatchery, HeatAndClimateASM, HeatAndClimateLib, HeatAndClimateMod, HelpFixer, Horizontal Glass Panes, Horse Tweaks, Immersive Engineering, Immersive Petroleum, Immersive Railroading, Immersive Tech, ImmersiveFood, Improved Backpacks, InfinityLib, Inspirations, Iron Backpacks, JourneyMap, Jukebox Mod, Just a Few Fish, Landlust, Lava Dynamics, Level Up! Reloaded, LibEx, LunatriusCore, MTLib, MalisisCore, MalisisDoors, Mantle, Mega Loot, MetalChests, Millenaire, MineColonies, Moar Boats, Mod Support, Mod Tweaker, Moon's Core, More Chickens, Morpheus, Multi-Beds, NetherEx, NetherPortalFix, No Mob Spawning on Trees, NoMoreRecipeConflict, Not Enough Roofs, NotEnoughIDs, Nutrition, Openable Windows, Pam's HarvestCraft, PamSimpleHarvest, Perfect Spawn, Pet Bat, PiTweaks, Pickle Tweaks, Pinkly Sheep, PizzaCraft, Placebo, Potion Core, Prefab, Primitive Mobs, Pumpkin Carving, Quality Tools, Quark, Refined Relocation, Repurpose, Roguelike Dungeons, Roost, Rustic, Sampling Performance Profiler, ServerSync, Shadowfacts' Forgelin, ShetiPhian-Core, Smoke Wheat Everyday, SteamWorld, Storage Drawers, Super Blocks 'n Buckets, Taco Tuesday, TeaStory, Team Up, TerraCart Reloaded, Terraqueous, TickProfiler, To the Bat Poles!, TombManyGraves2 API, Track API, TrashSlot, Unique Crops, V-Tweaks, Vanilla Food Pantry, Vanilla Tweaks, Vein Miner, ViesCraft, Wall-Jump!, Waystones, What Are We Looking At, World Utils, WorldEdit, Zoo and Wild Animals Mod: Rebuilt, iChunUtil, mxTune

Issue Description Player generated a new chunk that ended up causing a stack overflow initially (line 63414), followed shortly by a stack corruption (line 64446), then finally the Capture Block Change fallout (starting line 89144). The capture block change continued until I closed the server manually. The initial stack overflow was possibly caused by chisel, but the rest of it does not list a specific mod.

2018-08-24-7.log.gz (The file was too large for gist)

gabizou commented 6 years ago

I think I have an idea of what's happening:

During world gen, there are a few world generation events thrown on the world generation event bus, and while I haven't considered needing to ignore the block changes occurring due to those event listeners, we might have to specifically check if this is either the ore gen bus or another event bus that we "shouldn't track" due to world generation. Or, simply put: add a phase state check if this is world gen and then ignore adding event listener phase states which can cause bleeding into normalized "non-world gen" logic to occur, in this case neighbor notification block tracking.

I'll fiddle with this but I have a very big question: Is this easy to reproduce? And if so, how do I reproduce it without launching 100s of mods in a mudpack?

phit commented 6 years ago

looks like all you need is Chisel, it generates its Basalt around underground lava lakes

https://github.com/Chisel-Team/Chisel/blob/1.12/dev/src/main/java/team/chisel/common/util/GenerationHandler.java#L66

at least that's what it looks like from the log

gabizou commented 6 years ago

Didn't mean for the commit message to close this issue. Please test the newer build with my fix. It may fix it or not, if it still crashes, please provide a new log.

AsuraTakun commented 6 years ago

The main ones that I notice causing world gen would be Chisel, Rogue-like Dungeons, and Quark. I'm going to be honest though, I have not been able to reproduce it, because after the server reboot, that same area was already mapped. More or less it is chance that you run into a chunk that generates basalt at least. This is also server side only, the clients were just fine.

phit commented 6 years ago

gonna close this then, if this happens again make a new issue with an updated stacktrace