Applied Energistics 2

Applied Energistics 2

137M Downloads

[Major Malfunction][1.10.2]All AE2 blocks got reset/removed after server reboot

ProgrammedSoul opened this issue · 37 comments

commented

Ok this is a very complicated issue and it is extremely hard to pin point where the problem is originated. But such problems can potential cause major loss to many players so I believe someone have to report it. It may not necessary completely be an AE2 issue, but after analyzing all the bug behavior/reports, I believe AE2 is the right please to begin with. I am using Minecraft 1.10.2, forge-1.10.2-12.18.3.2422 and
appliedenergistics2-rv4-stable-1.

So, the issue is, players on my server are reporting their AE2 blocks are disappearing, which means all the blocks and content stored in them are lost. The detailed behavior are listed as:

Block disappear after server reboot. Which means the removal of blocks happens at server startup.

The problem happens chunk-wise. Either all the AE2 blocks in an entire chunk is gone, or all AE2 blocks within a chunk is unaffected.

Powered machines does not seems to be removed, but seems to be 'reset' instead, which means all the inventory content is wiped, and the rotation of the block is reset to the state which its placed. The blocks seems to remember its facing but loses its vertical rotation.

The problem may have connection with FTButil, which is necessary for server anti-grief and cannot be removed at this point. All problems seems take place in chunks claimed by FTButil, and are probably all chunk-loaded by FTButil as well. Or it can just because the chunk is chunk-loaded and will be force loaded on server startup.

The Internet has little reports on similar issue except this post, which they also could not figure out the exact cause of the bug and suffers major loss by AE2.

This is not a crash (I would rather hope this will post a crash instead of kill everything silently), so there is no leftover crash report. I refer to the server log, for as much as I could understand, I could found little useful information within it. I'll attach it here so you will know my config and modlist and maybe find something wrong while I couldn't:

fml-server-latest.log.txt

Thank you very much for you attention and please investigate this problem. If you need any more information feel free to ask. The problem happens pretty random so it can be hard to reproduce. Hope you can link the behavior with the internal code of AE2 and at least give some idea of the cause.

commented

I experienced issues with 1.10, but they did happen to any random block. Like turn all storage drawers inside a single block into granite or similar. And quite frequent for a world corrupting error, even when considering that dev worlds are a bit more unstable. As it was not restricted to any mod, I simply did consider it as a Forge or vanilla feature/bug.

I cannot really speak about FTBUtils in 1.10. The 1.7.10 version did some really bad things like multithreaded chunkloading in singleplayer. Which certainly could result in these types of chunk corruption and was/is the reason I try to avoid it and therefore have no experience with it. Depending on how stable the chunkloader is (frequent reloads), it might simply accelerate the underlying issue.

But sadly I cannot really provide any real help here otherwise.

commented

It was not a normal ID mismatch, it is usually limited to a single chunk. The storage drawer right next to it were totally fine. There are also other issues on the tracker about forge passing the wrong blockstate to our blocks, e.g. passing the blockstate of air to a drive and thus failing to render it. I can easily imagine, that it also passes wrong tile entities around and thus drives (or any other block) just are reset to an empty one.

Frankly dev worlds see way more stress than normal worlds. Like killing the game right inside a debugger session and therefore fail to save it correctly. Similar issues will probably not happen very often on a server or sp. So it might be hard to create a reproducible setup.

FTB Utils did not give you an option. Simply loaded it inside another thread, without a way to disable it.

commented

If drawers got turned into granite that looks like a block ID mismatch, which should caused by trying to load a modded world from a old minecraft version or remove/add mods. However I am in a server environment and for as much as I know people only have the block disappearing issue with AE2 exclusively. FTB util does not seems to have any config about multi-threaded chunk-loading stuff though.
I'll continue investigate in the mean time and thank you any for your advice.

commented

i have had this happen on several occasions over the last few days, the blocks that are removed are marked as removed by the environment and all ME drives are reset so all items lost from the system

commented

No logs on our end. Environment is very complicated to list.
https://minecraft.curseforge.com/projects/high-tech-adventures-sky/files
2.0.7 Is the main pack we use and have many issues regarding this.

Running a dedicated server. Spongeforge. Skyclaims. Griefprevention. Luckperms. Nucleus. Any other info needed please ask wanna get this fixed asap.

commented

@Tylerun when did the errors start happening for you?

mine all started 3 days ago on 2 different versions of AE2, appliedenergistics2-rv4-stable-1 and appliedenergistics2-rv4-alpha-11

commented

Now that i think about it it never happened with alpha 11... Thats odd. I feel I need to revert back to 11 now and do some testing. Started 6 days ago randomly. @dezil

commented

anything else updated in that time spongforge etc?

commented

Thinking about it no. hmmmm I may have to go read over my changelogs to verify

commented

I did some intense test over the last week and right now AE is the only mod that having this issue. I really cnanot provide anything useful except the log I updated unless you ask. Please, if possible, think about the code stability on tile entity update and loading see if there aren any room of improvment.

commented

If anybody have the same issue please list your environment in great detail see if that helps the author to pin point the issue. It happens so slient in my environment that zero report or log are left behind.

commented

The problem is still that noone can provide a way to reproduce it.

The serialisation handling in AE2 is certainly different to other mods. But that is neither a good nor a bad thing. It is just different. But certainly different enough, that mods who try to hook into it can mess it up. Which is ultimately their issue, Forge does not endorse a particular approach for it, thus they have to expect and handle every case.

Which immediately links it to sponge. There is a reason why we do not support it. If you use it, it is at your own risk and there will be no support for it. Except you can reproduce it with just Forge and AE2 (and whatever else mod is interfering). They just break too much and too fast. There is simply no time to follow their development and what version might break which feature. In 1.10 they for exampled passed around the wrong blockstate to the rendering and causing it to break. This time it might be the tile entity data. Or some plugin automatically erases all drives because they exceed a certain NBT size, which can easily be achieve, as there can be 630 different itemstack inside the same block and all have their own NBT data on top.

Therefore we just have to wait until either we do encounter it on our own and can reproduce it or someone else can provide more informations. (Without sponge)

commented

@yueh How does this link to Sponge when the creator of this ticket linked his fml-server-latest log with SpongeForge not listed?

commented

the generals issue has started out to be connected to sponge at first and then other mods like FTBU in this issue expose the same behaviour

commented

@bloodmc We have exactly one report of it and no idea what it might be. It could even be something obscure as a different locale causing toUpperCase() or toLowerCase() to act strangly and causing NBT lookups to fail (that already happened with something different). Corrupt memory, harddrive, some strange path names. Absolutely no idea.

Every other "me too" is sponge related, thus it might be something completely different. If they can repoduce it without sponge and give some further feedback, it would be awesome. But for now we have to consider it as unrelated.

commented

@yueh fair enough. I'm willing to debug the issue if someone can provide a region file with a lot of AE2 data.

commented

@bloodmc I am more than willing to help on that, but where is the region file or how do I make a dump? The problem happens on server side, so I think I should make the dump from the server side, but does server even care about localized names?

commented

Input the coordinates using this site to determine region file

https://dinnerbone.com/minecraft/tools/coordinates/

commented

Had the exact same thing happening on my server just now. Our version of AE2 is appliedenergistics2-rv4-alpha-11.jar

The player was in his base, warped out for a few minutes. Warped back and saw all cables, storage cells, import and export buses, crafting patterns and all terminals gone. This was all in the same chunk since he has a 1 chunk base. Cables were fluix glass cable and fluix dense cable. His AE system was autoprocessing ores with a draconium chest from Draconic Evolution and a workshop table from Engineers workshop. Items were going in the AE system through an ender chest.

The chunk was being chunkloaded by a chunkloader from Better Chunkloaders.

It is possible that in the few minutes timeframe the chunk was being unloaded by an automatic command /clearmob unloadchunks from Clearmob Plugin

Nothing in console at the time, no error nothing.. no crash or restart from the server. The ME drives also rotated or resetted. Screenshot

Here is the region file from that chunk Region file download

Forge version : 12.18.3.2422
Minecraft : 1.10.2
Modpack : FTB Beyond
Spongeforge : 1.10.2-2281-5.2.0-BETA-2574

Edit: A sample region file with alot of AE2 data Download

commented

@AlwaysQuads This sounds like the issue is caused from a chunk unloading. See if you can reproduce the issue by teleporting between 2 areas to force the large AE2 base to unload. Make sure there are no chunkloaders so we can get the bug to occur. I did fix a bug in SF recently where chunk loaders weren't properly initializing on server startup due to TE request not loading the chunk.

commented

I pushed a fix to sponge recently which disables Forge's 1.12 TE unload optimization patch. We back ported this patch as it improves TE unload perf by a good amount. However it is now an optional optimization disabled by default. Update to latest if you are using Sponge. If everything works as intended then this patch in forge may need further testing. Would be interesting to have someone test AE2 with latest 1.12 forge.

commented

@yueh It seems the culprit was this patch
MinecraftForge/MinecraftForge#4281

I backported the patch to Sponge 1.10.2 and all these issues started to occur. Once I removed it from being applied by default, all the reported issues went away. Can you see why it would cause issues on your end? Forge 1.12.1 now has this patch merged.

@ProgrammedSoul Are you using a custom Forge build with any additional patches applied such as mezz's TE unload change?

commented

ADDENDUM:
This is in reference to ProgrammedSoul's server.

At least some of the cables lost seem to've been cables whose structure was changed by the mod. The mod removed all default (uncolored) fluix cables and replaced them with dense black fluix cables EXCEPT in chunks with a controller...In those chunks, the cables were actually missing, causing users to focus on those chunks and not notice/report the changes to the cable in other chunks.

There did not seem to be a single triggering event because as users who had not logged in for some time logged in, new reports continued to appear.

It does appear that this has to do with the way in which the mod disposed of old default fluix cables and whatever method it is using to do find&replace.

commented

Sorry I was carried away by some real life work. Now most of the player already abandoned using AE2 I cannot find a area with a good amount of AE2 blocks to provide chunk file right now. I tried signal player world but I have not able to reproduce the problem in SP yet.
And @bloodmc no I am not using custom Forge build. I did use foamfix for a while, but I removed it at the first time the bug appeared, it does not help.
BTW are you leaving 1.10.2 at this stage? I would like to try an alpha build see if that fix anything but I am not ready to move to 1.11.2 yet.

commented

Basically as long as we are not able to reproduce it, there is nothing we can do about it.

It tried many options with AE2 only in a server/client environment, including using FTB utilities and was not able to reproduce it at all. Regardless of 1.12 or 1.12.1 with the TE change.

Also the TE fix in 1.12.1 pretty much does nothing. onChunkUnload is even already to late to do anything save (or load) related. Maybe the patches used by sponge start to fail due to it and they purge these TEs for whatever reason... But I pretty much do not care about or consider it as valid feedback as long as they cannot provide a testcase with AE2 and forge only (or some conflicting mod).

Currently I can only recommend that once it happens, you need to take an old backup of this chunk and try to reproduce it during a server restart. Should it still happen, than start removing other mods as long as you find the mod causing it (Or are down to Forge + AE2). It can easily be some mod transforming some capabilities onto our cables/blocks, but failing to do so, causing a crash, and forcing forge to remove the tile entity.

commented

I've noticed that when making certain patterns, the item doesn't get shown when you sneak and look at the pattern. Also, the disappearing patterns is still happening with just Forge (2422) and AE2 for 1.10.2 (RV4 - Stable1) loaded. I've made 2 saved game versions, one before adding patterns to Interfaces and one after. These saves are from a clean install.

I might have stumbled onto something: I have 16 Interfaces with 5 Molecular Assemblers attached. When I put patterns in the first 4 Interfaces, my patterns disappear. But when I skip those and put patterns in just the other 12 Interfaces...I don't lose any patterns.

EDIT 1: So I've found where the problem originates: the dense cable can't handle more than 12 Interface Channels on it. Any more Interfaces added to it with start deleting the patterns in them.

EDIT 2: It seems that AE2 can't handle 12 Interfaces on the same dense cable and 18 Interfaces total on the entire system.

Disappearing Patterns.zip

commented

Same thing happened on my personal server.
Modpack : all the mods 3 V3.0
All Cable, terminal and storage cell break or disappear when a player connect and load the chunk with AE2 block. Machine position also reset when the bug happen.

commented

appliedenergistics2-rv4-stable-1
MC 1.10.2
forge-1.10.2-12.18.3.2281-universal
Modpack: Mech & Magic

Since updating to rv4 release we are seeing Drives, Cables, and buses vanishing from the world.
It is happening at random. I imagine during chunk unload. Servers/clients aren't crashing causing chunk errors or anything.

commented

Closing for now, as neither can anyone provide a way to reproduce it nor did we ever encounter it previously on our own. Should this change, we will reopen it.

commented

I've sent yiu my saved games and I CAN reproduce it with those saves. I've found out the you have to place interfaces/assemblers one at a time in order to jot lose anything.

commented

@Furious1964 your problem is handled in another issue. This is about missing/resetting BLOCKS not your missing patterns (and you know it should already be fixed in git).

commented
commented

Here's another data point (I can provide more details if need be). This may not be helpful, but I'd thought I'd share.

Ran into this issue on Enigmatica 2 and Modern Skyblock 2 packs. Most recently on Enigmatica 2 1.07.

I DO NOT think is is AE related. Thermal expansion machines also suffer from resets and problems loading/unloading chunks. Also, I had not dropped or crafted single AE item in Modern Skyblock 2 before this issue (Blocks and NBT data getting wiped) caused us to rage quit.

minecraft 1.12
forge-1.12.1-14.22.0.2474-universal
applied-llamagistics-1.12-rv5-beta-7
AppliedFluidics-1.12-1.0.1
FTBLib-4.1.0.jar
FTBUtilities-4.1.0.jar

Removing FTBLib and FTBUtils fixed the issue.

Edit: To elaborate. When we experienced this issue, I first loaded from backup and the issue (ME wires wiped, ME Drives facing backwards, etc.) persisted. Then I re-extracted the backup and removed FTBLib/Utils and the backup restored correctly.

commented

well .... still ... you are posting on the wrong tracker my friend :D

this is appliend energistics and NOT applied-llamagistics-1.12-rv5-beta-7 this is a different branch and has a seperate tracker, do not confuse them please https://minecraft.curseforge.com/projects/applied-llamagistics nd the tracker is here https://github.com/thiakil/Applied-Energistics-2/issues

commented

I just realized that just now. Sorry =(

Here's the AL equiv bug if anyone cares.

commented

There's nothing we can do about this. We need the NBT data to be correct or all your data and parts (cables, buses, p2p, etc) will be gone.
Please report this to FTBUtils.

commented

Steps to reproduce:

  1. Create server with forge forge-1.12.1-14.22.1.2485-universal and appliedenergistics2-rv5-alpha-4.jar. Default Configs.
  2. Copy world file to server directory
    world.zip
  3. Launch server with args (only important thing is the low memory, rest is just copy pasted from what I was using): java -Xms256M -Xmx1G -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=4 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -jar forge-1.12.1-14.22.1.2485-universal.jar nogui
  4. Restrict Client to 1G RAM & Start client with the same forge & AE version.
  5. Move Character to X=-215 Y=110 Z=-28 and look at ME controller w/ all those nice entities in view.
  6. Completely close client.
  7. Completely Close Server.
  8. Restart Server and Client.
  9. Log in client to Server. See parts of ME network missing or disconnected. May need to restart the client 1-3 times, closing the client completely each time. (Example: https://i.imgur.com/TRFrklM.png)

forced crash log: https://pastebin.com/yE1L5MMd

Bonus Points: use forge version forge-1.12.1-14.22.0.2474-universal for even more missing blocks and issues (it's worse in that version)

Reference this thread for further information.

I have reproduced NBT data wipes with just Thermal expansion installed, just Applied Llamagistics installed, and now just Applied energistics installed. With both forge 14.22.0.2474 and 14.22.1.2485. (all on MC1.12.1)

My guess is that it has nothing to do with the entities or AE network size, but rather some timing issue with loading chunks. Slower servers/computers or those with restricted amounts of memory might hit it more often? The entities and larger networks just slow it down enough to trigger the bug.

Oh, and I just got it to wipe TE machine NBT data without Applied Llamagistics installed. Crash report: https://pastebin.com/9rKSe7PP

Edit: I'm not sure if I should post this here or on the forge issues page, so I'm looking for some guidance or for some "Yeah, I just reproduced it using this method" responses. Thanks!