SpongePowered / SpongeForge

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

any item duped when placed #2703

Closed dezil closed 5 years ago

dezil commented 5 years ago

I am currently running

Mods (197): Minecraft, Minecraft Coder Pack, Forge Mod Loader, Minecraft Forge, SpongeAPI, Sponge, Advancement Book, Animal Crops, Apotheosis, AppleCore, AppleSkin, Applied Energistics 2, Aroma1997Core, Astral Sorcery, B.A.S.E, BNBGamingLib, Barrels, Drums, Storage & More, Baubles, Bed Patch, BiblioCraft, BnBGamingCore, Bonsai Trees, Bookshelf, Building Gadgets, Caliper, Calm Down Zombie Guy, Carry On, Ceramics, Chargers, ChineseWorkshop, Chisel, Chisels & Bits, Chunk Manager, Click Machine, Clumps, CoFH Core, CoFH World, CodeChicken Lib, ComPatchedStorage, CommonCapabilities, Compact Machines 3, CompactStorage, Construct's Armory, ContentTweaker, Cooking for Blockheads, Corail Tombstone, CraftTweaker JEI Support, CraftTweaker2, Cucumber Library, Culinary Construct, Cyclic, Cyclops Core, Dark Utilities, Deep Mob Learning, Dimension Stages, Elevator Mod, Ender Crop, Ender Utilities, EnderCore, EnderStorage, Extended Crafting, Extra Cells 2, Extra Cells Patch, Farming for Blockheads, FastFurnace, FastWorkbench, Fence Overhaul, FindMe, Flux Networks, FoamFix, FoamFixCore, Forge Microblocks, Forge Multipart CBE, Forgiving Void, Game Stages, Guide-API, Headcrumbs, Horse Power, Hunting Dimension, HydroGel, InControl, Industrial Foregoing, Inspirations, Integrated Dynamics, Integrated Tunnels, IntegratedDynamics-Compat, IntegratedTunnels-Compat, Iron Jetpacks, Item Stages, JourneyMap, Just Enough Items, KleeSlabs, Limitless Structure Blocks, MCMultiPart, MTLib, MalisisCore, MalisisDoors, Mantle, MatterOverdrive: Legacy Edition, McJtyLib, Mekanism, MekanismGenerators, Mercurius, Minecraft Multipart Plugin, Misc Server Utils, Mob Stages, Mod Tweaker, ModPack Basic Tools, ModPack Utilities, More Buckets, More Cauldrons, Mystcraft, Mystical Agradditions, Mystical Agriculture, NuclearCraft, OG Dragon+, OpenComputers, OpenComputers (Core), OpenComputers Xnet Driver, OreExcavation, Parabox, Pickle Tweaks, PigUtils, Pipe Master 2000, Placebo, Practical Logistics 2, Prestige, Primitive Crafting, ProjectE, RFToolsPower, Ranged Pumps, Real Filing Cabinet, RecipeStages, Redstone Flux, Resource Hogs, Rustic, Shadowfacts' Forgelin, SilentBoss, Simple Generators, Simple Inventory sorting, Simple Storage Network, Sky Grid, SkyBonsais, Slab Machines, SlimyBoyos, Smooth Font Core, Snad, SonarCore, SpongeForge, Squeezer Patch, Statues mod, Stuff A Sock In It, Super Sound Muffler, Surge, SwingThroughGrass, Sync, TallGates, TelePastries, Tesla Core Lib, Tesla Core Lib Registries, The Lost Cities, The Twilight Forest, The Weirding Gadget, Thermal Dynamics, Thermal Foundation, Thermal Innovation, TickProfiler, Tinkers Tool Leveling, Tinkers' Complement, Tinkers' Construct, Tiny Progressions, TogetherForever, Topography, TorchMaster, Translocators, Tree Growing Simulator 2016, Triumph, Twitchcrumbs, Universal Modifiers, Valkyrie Lib, ViesCraft, Waddles, Waila, Waila Stages, Wall-Jump!, What Are We Looking At, Wither Crumbs, World Utils, XL Food Mod, XNet, YNot, Yoyos, ZenStages, bouncy_creepers, mob_grinding_utils, sky_orchards, uppers

Issue Description all players on the server can place blocks with out it using the block from there inventory

while this happens we are getting https://pastebin.com/EwzFyMAZ this error in the log

Shybella commented 5 years ago

I had this happen suddenly last night on 3616 randomly, spent hours waiting for it to recur but didn't

dezil commented 5 years ago

we have not been able to reproduce it but have had it happen randomly across multiple packs on multiple sponge versions after and including 3616

d4julian commented 5 years ago

I've had this as well on 3616. Automatic user from Extra Utilities 2 may be the cause of this.

https://gyazo.com/58409a717d91fe1520ba2cd24b53cbfa

https://www.twitch.tv/videos/412726009

phit commented 5 years ago

previous issue: https://github.com/SpongePowered/SpongeForge/issues/2698

gabizou commented 5 years ago

From the stack trace, looks to be a nucleus exception on the interaction listener ends up causing the item not to be used, but the placement still to be tracked. I wouldn't really say it's a bug on Sponge's side, since the exception is occurring from a plugin's codebase, in this case, the Optional is not being checked, and Sponge doesn't have any real way to "roll back" if an exception occurred during a listener in this case, so it will still end up processing the blocks placed.

@dualspiral I'm almost sure this is from FakePlayers having fun issues with not being registered in any specific way, but I doubt Sponge can really do anything for this, since the interaction managers are always expected to process on fake players.

I wouldn't say this is a dupe in particular with Sponge, but a side effect of a plugin/mod throwing an exception and there being no feasible way to safeguard against already captured changes.

In the case it is not clear: I'm closing this issue because the duplication appears to be stemming from a plugin throwing an exception during placement from fake players, not something Sponge can safeguard against, since the exception is being caught, but no feasible way to roll back fake player changes. If however, without Nucleus being installed, the duplication is still reproduced, the issue needs to be abundantly clear on the setup of what the duplication is requiring to reproduce (because SpongeForge alone, or with some of these mods that I've had tested for the last month or so are not causing duplications). I understand this is a large mudpack, but also understand that as developer time is fairly limited (based on how much can be given voluntarily), we're not going to test individual mods and SpongeForge to find out which combination recreates the duplication issue.

dualspiral commented 5 years ago

Yeah, that'll be it exactly. I haven't handled that well - I'll put it on the Nucleus tracker and try to resolve it ASAP.

phit commented 5 years ago

this has been fine in the past with the exact same mods?

dualspiral commented 5 years ago

Wait, no, I fixed that ages ago. That's a really old version of Nucleus.

Reported in https://github.com/NucleusPowered/Nucleus/issues/1334 Fixed in https://github.com/NucleusPowered/Nucleus/commit/74a8a7b44ef5a34f03a2bb7af0ce9ee9b71fa719

Update Nucleus and try again. Make sure, if a plugin is in the stacktrace, that you update before reporting...

Shybella commented 5 years ago

You are right, I am using 1.6.1-S7.1 https://ore.spongepowered.org/Nucleus/Nucleus/versions/1.6.1-S7.1

Sorry about that.

On Sun, Apr 21, 2019 at 6:37 PM Daniel Naylor notifications@github.com wrote:

Wait, no, I fixed that ages ago. That's a really old version of Nucleus.

Reported in NucleusPowered/Nucleus#1334 https://github.com/NucleusPowered/Nucleus/issues/1334 Fixed in NucleusPowered/Nucleus@74a8a7b https://github.com/NucleusPowered/Nucleus/commit/74a8a7b44ef5a34f03a2bb7af0ce9ee9b71fa719

Update Nucleus and try again. Make sure, if a plugin is in the stacktrace, that you update before reporting...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SpongePowered/SpongeForge/issues/2703#issuecomment-485282422, or mute the thread https://github.com/notifications/unsubscribe-auth/ABB3GKH7IOZEEQZPUK5Q4JDPRTJP7ANCNFSM4HHKNK4Q .

d4julian commented 5 years ago

You are right, I am using 1.6.1-S7.1 https://ore.spongepowered.org/Nucleus/Nucleus/versions/1.6.1-S7.1 Sorry about that.

I was using version 1.6.3, updating to latest version now. Thanks for the response dualspiral.

dezil commented 5 years ago

ok nice having updated to the latest nucleus and running the server for 8 hours the Dupe bug appeared again except now there is nothing in the logs, so we have no way to pinpoint the issue

everything is as above except i updated nucleus

gabizou commented 5 years ago

Going to need some precise replication instructions, whether it’s installing the mod pack, specific plugins etc. Also, is it immediately duping or only occasionally? Is the dupe happening based on timing or is it just happening as a random interaction?

Just SpongeForge along I’ve not seen it dupe (yet, if it’s a corner case requiring multiple players online, I need to know)

phit commented 5 years ago

when i've seen this it simply works for everyone, you just place any block and it doesnt get used and it stays like that until server reboot

dezil commented 5 years ago

this is the hard part the dupe does not show up straight away we have only been able to get it to happen on production servers at this time i have had it happen on 3 diff mod packs SF4 Stone Block2 Dungeons Dragons and Space Shuttles

in all instances the plugin load out is the same the dupe at this time has taken several hours to show up as i said above 8 hours to get it to happen earlier today and we were monitoring the server the whole time

LemADEC commented 5 years ago

We had the issue with Nucleus-1.9.3-S7.1-MC1.12.2 on our SkyFactory4 setup.

d4julian commented 5 years ago

I've noticed this on StoneBlock 2 and Sky Factory 4 so far.


Plugins (38): Minecraft, Minecraft Coder Pack, SpongeAPI, Sponge, AuraBlockLimit, AurionsVoteListener, AutoReset, BetterChunkLoader, BungeeTabListPlus-SpongeBridge, Buycraft, CarrotShop, CatClearLag, Command-Blocker, CommandUtils, Dirt keepInventory, Dirt-Join-Leave-Messages, DirtCrashFailsafe, DirtRanks, DirtRespect, EconomyLite, GriefPrevention, Holograms, HuskyCrates, HuskyUI, LuckPerms, MMCReboot, MMCRestrict, MagiBridge, NuVotifier, Nucleus, OnlineBroadcast, PixelAutoMessages, PlayerDataReset-Plugin, Prism, RankUpper, SkyClaims, UltimateChat, spark```
gabizou commented 5 years ago

Way too many mods and plugins.... Anyone able to reproduce with a minimal setup?

dualspiral commented 5 years ago

I just took an intersection of the two mod sets in case that helps anyone reduce the mod list futher.

{AppleSkin,Applied Energistics 2,B.A.S.E,Baubles,Bed Patch,Bonsai Trees,Bookshelf,Building Gadgets,Ceramics,Chisel,Chisels & Bits,CodeChicken Lib,CoFH Core,CoFH World,CommonCapabilities,Compact Machines 3,ContentTweaker,Cooking for Blockheads,CraftTweaker2,CraftTweaker JEI Support,Cucumber Library,Custom Mod Rejection Messsage,Cyclic,Cyclops Core,Dark Utilities,EnderCore,EnderStorage,Extra Cells 2,Farming for Blockheads,FastFurnace,FastWorkbench,Flux Networks,FoamFix,FoamFixCore,Forge Microblocks,Forge Mod Loader,Forge Multipart CBE,Industrial Foregoing,Integrated Dynamics,IntegratedDynamics-Compat,Integrated Tunnels,IntegratedTunnels-Compat,Just Enough Items,KleeSlabs,MalisisCore,MalisisDoors,Mantle,McJtyLib,Mekanism,MekanismGenerators,Minecraft,Minecraft Coder Pack,Minecraft Forge,Minecraft Multipart Plugin,mob_grinding_utils,ModPack Utilities,Mod Tweaker,MTLib,Mystical Agradditions,Mystical Agriculture,OreExcavation,Placebo,ProjectE,Redstone Flux,RFToolsPower,Sampling Performance Profiler,Shadowfacts' Forgelin,Snad,SonarCore,Sponge,SpongeAPI,SpongeForge,Tesla Core Lib,Tesla Core Lib Registries,Thermal Dynamics,Thermal Foundation,Thermal Innovation,TickProfiler,Tinkers' Construct,Tinkers Tool Leveling,Tiny Progressions,TorchMaster,Universal Modifiers,uppers,Valkyrie Lib,WorldEdit,XNet,YNot}
DrZoddiak commented 5 years ago

I compared the list Dual made, and compared it to "Dungeons Dragons and Space Shuttles" which Dezil reported also had these issues. The list got a bit smaller.

appleskin
b.a.s.e
baubles
bonsai trees
bookshelf
ceramics
chisel
cofh core
cofh world
contenttweaker
crafttweaker2
foamfix
industrial foregoing
integrated dynamics
integrated tunnels
mantle
mcjtylib
mod tweaker
mtlib
mystical agriculture
redstone flux
rftoolspower
thermal dynamics
thermal foundation
thermal innovation
torchmaster
xnet

Note: My list doesn't contain the Forge/SF/MCP listings, since I pulled the modlist from an external source (curse)

dezil commented 5 years ago

looks like your list was not complete @DrZoddiak here is the list of all 3 packs inclusions AppleSkin B.A.S.E Baubles Bonsai Trees Bookshelf Ceramics Chisel Chisels & Bits CoFH Core CoFH World CodeChicken Lib CommonCapabilities ContentTweaker CraftTweaker JEI Support CraftTweaker2 Cucumber Library Cyclic Cyclops Core Dark Utilities EnderStorage FastWorkbench FoamFix FoamFixCore Forge Microblocks Forge Mod Loader Forge Multipart CBE Industrial Foregoing Integrated Dynamics Integrated Tunnels IntegratedDynamics-Compat IntegratedTunnels-Compat Just Enough Items MTLib MalisisCore MalisisDoors Mantle McJtyLib Minecraft Minecraft Coder Pack Minecraft Forge Minecraft Multipart Plugin Mod Tweaker Mystical Agradditions Mystical Agriculture Placebo RFToolsPower Redstone Flux Shadowfacts' Forgelin Sponge SpongeAPI SpongeForge Tesla Core Lib Tesla Core Lib Registries Thermal Dynamics Thermal Foundation Thermal Innovation TickProfiler Tinkers Tool Leveling Tinkers' Construct TorchMaster Universal Modifiers Valkyrie Lib XNet

Yorkforce commented 5 years ago

Could this be anything to do with it? https://pastebin.com/hCQJcHKU

Our logs are getting spammed with that while its happening

LemADEC commented 5 years ago

Automated user causing console spam is how we've reproduced the issue initially. We can also see it happening without the Automated user spam.

gabizou commented 5 years ago

Our logs are getting spammed with that while its happening

Fixed a few builds ago from this commit, update to 3662 at the very least.

Yorkforce commented 5 years ago

We did update to latest a couple of hours ago, i'll report back here if the duping occurs again.

gabizou commented 5 years ago

Ok, pushed a commit that may affect the issue, not 100% sure as I've not had a chance to test the commit or reproduce the issue itself. Try 3667 (it's not on our downloads website for some reason, it's on forges though).

KingDan27 commented 5 years ago

seems to have resolved it on my server... been up for 1.5 hrs with no dupes will post back again if i see/hear otherwise

Yorkforce commented 5 years ago

Try 3667 (it's not on our downloads website for some reason, it's on forges though).

Where is the spongeforge download on forge website?

dualspiral commented 5 years ago

https://files.minecraftforge.net/spongepowered

LemADEC commented 5 years ago

Is that build 3667 integrated in the build 3668 on the Sponge website?

phit commented 5 years ago

yes

phit commented 5 years ago

that should be fixed in 3671

gabizou commented 5 years ago

The question is: Are there still dupes happening with builds 3667 and newer (latest currently is 3671 that has a few other potential changes that may affect fake players that is likely causing contamination of some previously global state variables)?

Don't comment about reverting because of other issues, it's off topic.

xElementzx commented 5 years ago

Dupe appears to be resolved, have been running for 2 days and had no issues with a dupe.

Yorkforce commented 5 years ago

Can confirm, wanted to give it a bit more time before reporting back but so far so good!

Sir-Will commented 5 years ago

I was able to get it reproduced on a test server and after updating I couldn't reproduce it anymore. It did only happen when a specific area in a base was loaded. Though I can't test it on the live server as the latest sponge versions still break too much.

gabizou commented 5 years ago

Seeing as it's been a week since someone's been able to no longer reproduce the dupe, I'll consider this issue resolved.

Though I can't test it on the live server as the latest sponge versions still break too much.

Please point out which issues you're referring to, just saying it breaks too much doesn't help anyone reading the issue to know if your issues are resolved or not (it's also off-topic).