Applied Energistics 2

Applied Energistics 2

156M Downloads

Network Reset Involving ME P2P Tunnels

Draxhax opened this issue ยท 6 comments

commented
  • Minecraft Version: 1.12.2
  • AE2 Version: rv5 stable 2
  • Forge Version: 14.23.0.2531
  • Modpack: All The Mods 3 v5.1 - Multiplayer

Issue:

Disconnecting a cable from behind a P2P tunnel (breaking it's link to the ME controller) and replacing it causes the network to flicker / reset constantly until cable connected to the front end of the input side is disconnected and reconnected. I discovered this when I went to swap out a piece of smart cable with dense smart cable and the network started flickering constantly instead of just a brief moment to reconnect the channels.

This is what my controller shows connected currently. Note that the first two items are actually wrong to begin with. I have 7 1k crafting storage and 7 crafting units.
Network Details 1

This is the output side of the P2P tunnel. Note that none of the other P2P tunnles are currently being used.
Output ME P2P Tunnel 1

This is the input side of the P2P tunnel. This is only a few blocks away and located in the same chunk as the ME controller.
Input ME P2P Tunnel 1

I am currently using 27 channels on the input side of the P2P tunnel. 7 Crafting Units/1K Crafting Storage Units, 7 Interfaces, 7 Import Buses, and 6 Export Buses. All wired up using dense smart cable in the front to handle the channels and ME Glass Cables. Cable Anchors are utilized to control where each device hooks up to the dense cable.
Input Dense Cable - Channel Usage 1

I remove this cable, located behind the Input ME P2P Tunnel. Not the smart cable directly connected to the P2P tunnel, but the cable after that. Please note that I could remove it from behind the Output ME P2P Tunnel as well or anywhere between the P2P tunnels and the controller and achieve the same results.
Removed Dense Cable Behind Input ME P2P Tunnel

The network updates as expected, no longer showing the 12th P2P Tunnel or the devices on the other side. Everything seems normal.
Input ME P2P Tunnel - Online and Unlinked
Output ME P2P Tunnel - Offline and Unlinked
Network Details Confirming Changes

At this point, I reconnect the Input ME P2P Tunnel back to the system.
Replaced Dense Cable

This is where the network begins freaking out instead of simply bringing the items back online.
Network Flickering
0 Channels on Input P2P ME Tunnel
Device Missing Channel on Input P2P ME Tunnel
Device Missing Channel on Output P2P ME Tunnel

The network will continue to do this until I break and replace the cable on the other side of the Input ME P2P Tunnel.
Input P2P ME Tunnel Online After Breaking Cable

At this point, I can place the cable back and everything will go online again.
Dense ME Cable - 27 Channels

I hope this was enough information to diagnose the issue. I attempted to replicate the issue in my singleplayer 'test bed' world in that modpack using the exact same design (minus the blocks used for aesthetics), but was unable to replicate the problem in SSP. I am not the owner of that server, so unfortunately I cannot pull any logs or restart it to see if the issue can be replicated after that.

commented

Most likely a power issue.

commented

make sure yoiu have enough system power capacity using energy cells, input is limited to basically "system capacity" / tick

commented

The behavior certainly looks to be power with the flickering, but the amount of power I'm supplying is excessive compared to what is being used. As a test, while the network was fully functioning, I removed my power source, leaving only the power in the controllers and the dense energy cell. Energy usage in the controller showed 184.9 RF/t with no energy generation and the stored power slowly draining. The difference in RF being caused by a pattern, interface, crafting, and security terminal along with an extra import bus I have attached since I reported this issue. More has been added to the network since then, but I disconnected those cables so as to not interfere with the test. The controllers finally lost power after 15 minutes, but it took me a moment to start the timer, so it probably lasted a couple seconds longer than that. Just look at the screenshots and you can see exactly what is connected to the network and their draw. Remember, it's breaking when I -remove- stuff from the network and put it back on. i.e. I lowered the power consumption and tried to put it back where it already was. We're talking about inscribers, import and export buses, interfaces, and a few, really small, crafting units. We aren't talking about a massive setup or power draw here. I've been using AE for many years and this exact setup for many years as well. This is the first time I've ever had this kind of problem where I couldn't quickly diagnose and fix the issue.

At the time I had 48 MRF in reserve (outside of AE, but connected to the dense energy cell) that it could pull from, but now I have 24 BRF (and going up). There's no additional draw going on, the controllers and the dense cells do not show them as going empty when I look at them directly (via WAILA or whatever is giving me the tooltips in the corner). As long as I don't break the connection to the P2P tunnels, everything works fine. As soon as I break the connection and try to bring it back online, it freaks out until I disconnect it from the other side of the P2P tunnel and reconnect it.

My current AE system has expanded since then. If I leave my system as-is and try to break and replace that cable, it does not bug out. I'm still using the same power delivery system and same amount of dense energy cells. If I disconnect the new cables I've added (which adds 24 ME drives, a security terminal, a molecular assembler, a storage bus, and a wireless access point with 64 boosters in it), and try to reproduce it, the problem shows up right away when I break and replace the cable pictured above.

commented

I created my own server to replicate this issue and will attempt again in SSP soon.

I recreated this using a creative energy cell, 1 controller, 2 PTP tunnels, some dense cable, a glass cable, and a couple crafting units with 1K storages.

Example

--EDIT--

I finally replicated it in Singleplayer. I started off with 1 crafting unit / 1K storage on the other side of the tunnel and just kept increasing and breaking the cable and replacing it on the controller side until it finally replicated. Now all I need to do is simply interrupt the connection to the controller for either end of the P2P tunnel and it does that flickering. I ended up having 4 separate units in there before it finally broke in my SSP world, though I don't know if that in specific has any significance.

My SSP World

I have attached a copy of my singleplayer world for your convenience. Again, this is running All The Mods 3 v5.1. Simply disconnect the cable from the back of either P2P tunnel and reconnect it to replicate.
Test Bed.zip

After further testing, it seems that how I linked the two P2P tunnels together is a major factor here. The reason why I had such a hard time replicating the setup I had in SSP and it not breaking was because the P2P tunnel connected directly to the controller was put into the memory card and given to the other P2P tunnel. Apparently, the way I linked them up in the examples I've posted above was the opposite direction.

If you look at the save I uploaded and go over to the other AE setup nearby, take the memory card, load the settings from the P2P tunnel next to the inscribers and then push those settings onto a P2P tunnel connected directly to the controller. The issue should immediately present itself. Redoing it in the opposite direction corrects it -- at least that's what I found during my brief testing. I didn't realize I had done this when setting up the tunnel in my multiplayer base, when I was originally trying to replicate it in SSP, I built it the way I normally do -- load the P2P tunnel that's on the controller and sync it to the other one, but I unintentionally reversed that in the multiplayer server. When I was trying to replicate it, I set it up first the way I normally do, but then tried flipping the order. At first I didn't replicate it so I didn't think it was the problem at all. Adding more devices on the other end caused it to eventually break.

commented

Just managed to reproduce it and it is a basic power issue.

What happens is that both sides boot on their own and run on their small internal buffer of 200 AE. To give the network some time to settle in, fill energy buffers, and so on, it will need to be powered for 30 ticks before turning active.

With 4 (actually just 3) crafting cpus, 2 tunnels and the controller it is just enough passive consumption, to last slightly less than 30 ticks with the internal buffer. This powers the network down, gives the other side time to settle down and just power the controller/P2P. Which it can. Then reconnect both sides and repeat it again.

When rewriting the energygrid for 1.12, I choose it to buffer 200 instead of 1000 previously to better fit the other values for energy cells/controllers. Thus it can now start to noticed a bit earlier. Increasing it would just result in pushing it back to slightly larger networks.

Having a large enough buffer on both sides to survive the first few ticks is sufficient to prevent it. Or even just backfeed it with a quartz fiber will prevent it, as it does have a physical energy connection and not rely on an inactive P2P connection.

commented

Thanks for tracking down the root of the problem, the information you've provided is quite interesting and I'll keep it in mind in case I run into this again. So far, just me swapping which tunnel was the input and output has taken care of it for now. I just wish I had noticed that I reversed the order to begin with, but if it starts happening even with it swapped, I'll use some quartz fiber to push power to the other side of the tunnel.

Thanks again for looking into this!