Integrated Crafting

Integrated Crafting

18M Downloads

Server Crash with Craft Writer

joey-drake opened this issue ยท 13 comments

commented

Issue type:

  • ๐Ÿ› Bug

Short description:

Server crashing shortly after placing variable card into crafter

Steps to reproduce the problem:

  1. Place craft writer onto crafting table
  2. Create a recipe variable card
  3. Place variable into craft writer
  4. Server crashing from single server tick taking too long

Expected behaviour:

n/a


Versions:

  • This mod: Integrated Crafting 1.0.15
  • Minecraft: 1.16.5
  • Forge: 36.1.16

Log file: https://pastebin.com/yHtPAbbC

commented

Thanks for reporting!

commented

The provided steps don't reproduce the problem here, so I'm going to need a lot more information.

  • What kind of network does this occur in?
  • How many attached storage blocks do you have in your network?
  • Does it happen always, or just sometimes?
  • What recipe are you crafting?
  • Do you have any other mods installed? If so, could you retry without those?
commented

Ok, no problem!

  • I was automating petals from Botania. The network includes Player Simulator (I am on version 1.8.1 of Integrated Tunnels as I know there was an issue with servers crashing in the previous version), world item importer, 2x Exporter, 2x interface, crafter on a crafting bench, craft writer, redstone reader, 2x redstone writer, and a variable store. If you would like details on how the network was configured and what variables I am happy to provide them. I believe I also had tried with a third interface just for crafting, but I can't remember exactly as the server crashed while I was testing.
  • 2x Barrels, 2x Dispenser
  • Happens always. With the first crash, I was able to reboot the server. The server had rolled back a few minutes. Upon resetting up the network, the server got hung up again. The server would no longer boot at this point and would crash upon restart.
  • Botania tall red mystical flowers --> 4x red petals
  • This is in All The Mods 6. I won't be able to try removing the other mods from the server for quite some time as it is a lengthy process and there are other users on the server. Sometime this weekend I'm happy to download the world file and try it in a single player if that would help.
commented

2x interface

What are these interfaces connected to?
Are these (very) large storage blocks by any chance?

Did you experience any performance issues with the older IT/IC versions?

In any case, a world+pack share (+coordinates of the problematic crafter) would definitely be valuable, as I probably won't be able to reproduce otherwise.

commented

One was a barrel with one pair of shears and the other was a barrel with about 20 petals in it. (vanilla barrels)

I ran into the issue with player simulators crashing the server, but I hadn't used a crafter on the server until the most recent version. This was my first and only time using one.

Let me download the save and remake the network with the crafter. I had to delete integrated crafting to get the server to boot.

commented

Alrighty,

Here is the link to the world save download. The network wouldn't function 100% correctly as is (would need to filter what's being exported to one of the dispensers), but it was crashing the world like this so you should be able to reproduce. There is a variable card with the recipe in an item frame. Just place that into the craft writer and it should timeout the world.

Coords:
-178 84 960

Pack:
All The Mods 6 v 1.6.3c
I also have the integrated mods updated to:
Integrated Crafting 1.0.15
Integrated Dynamics 1.8.2
Integrated Tunnels 1.8.1

If it's easier I'm happy to provide my mod folder or instance.

I also placed a waystone at spawn so you can use that to get to the crafter.

Let me know if you need anything else and thank you for your work.

commented

If it's easier I'm happy to provide my mod folder or instance.

That might be easier indeed, thanks!

commented

Here you are!
Save is "New Life"

commented

Damn, packs have gotten big today. My machine isn't strong enough to run your pack properly.
I also seem to be unable to teleport because of creative/commands being disabled.

So not sure if/when I'll be able to look into this.
A world with minimal modset that reproduces the problem would be easier to debug.

commented

lol they sure have
You can open to LAN and enable cheats. Sorry, I forgot to enable cheats in the save.

As you said, packs have gotten big so narrowing it down with 200+ mods without knowing where to start is quite the task. I'll put the issue in the pack's github as well and see if anyone there is feeling inspired to try to find the conflict. Thanks for all of your communication. I'm sure maintaining your projects is quite the task.

commented

Ok, I was able to reproduce the problem with this world.
Next step will be to figure out why it is happening.
Since this pack takes forever to load on my machine, this might take a while though...

Note to self: relevant coordinates are -178 84 -960
Create a custom IC build with debug logs around the observer invocation logic.

EDIT: when emitting debug logs, the problem does not occur anymore, which may indicate a race condition somewhere. (probably with the observer)

EDIT2: Hypothesis: sync observer starts, but is slow. 1ms later, async observer starts, and is faster. They run interweaved, and due to the synchronized blocks, they block each other.
Possible solution: don't allow async observations (return early in observe) until sync observer finishes.

commented

@catsbyte It took me a while, but I managed to discover and resolve the problem! ๐ŸŽ‰

Everything seems to be working properly on my end, but it would be good if you could confirm that no weird side-effects arise in your world. Could you try out the latest ID dev build? (no changes were done in IC)

commented

Nice! That's exciting, I'll give it a try tonight after work