question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Integrated Crafting in 1.16.5 causes server to freeze when autocrafting. Cross mod interaction possible.

See original GitHub issue

Issue type:

  • 🐛 Bug

Short description:

AutoCraft in Integrated Dynamics creates a deadlock on the server side at this line Or this line Also, you can checkout All stacks from the JVM. Something wrong with this, when you try to get from CacheStorage:

    private final LoadingCache<PartPos, IIngredientComponentStorage<T, M>> cacheStorage;
    ...
    this.cacheStorage = CacheBuilder.newBuilder()
                .build(new CacheLoader<PartPos, IIngredientComponentStorage<T, M>>() {
            public IIngredientComponentStorage<T, M> load(PartPos pos) {
                IIngredientComponentStorage<T, M> storage = getPositionedStorageUnsafe(pos);
                return storage == null ? new IngredientComponentStorageEmpty<>(getComponent()) : storage;
            }
        });
   ...
   this.cacheStorage.get(pos);

I was able to reproduce it only in the OceanBlock pack.

With this mods in list I can’t reproduce it:

Integrated-Tunnels-Compat 1.8.9
IntegratedTerminals 1.2.11
IntegratedTerminalsCompat 1.2.11
IntegratedDynamics 1.10.6
IntegratedDynamics-Compat 1.10.6  
Integrated NBT
IntegratedCrafting 1.0.20
Cyclops Core 1.12.1
CommonCapabilities 2.8.0
Lollipop 3.2.9
Krate 0.1.4
CreativeCore 2.0.0
JEI 7.7.1.128
Forge 36.2.20
CoFH core 1.4.0.6
JEI Integration 7.0.1.15
TrayLauncher 1.0
CodeChicken Lib 4.0.5.438
ConnectedTexturesMod MC1.16.1-1.1.2.6
CraftingTweaks 12.2.1

Steps to reproduce the problem:

I use FTB OceanBlock, I tried to reproduce it with only IntegratedDynamics and Krate and the bug does not occur. Here are the steps to reproduce:

  1. Setup 2 chests, 1 crafting table.
  2. Connect chests with tunnels and item interface
  3. Connect crafting table with crafting interface
  4. Create recipes for “Krates” (again, it shouldn’t be related only for them, but haven’t tried yet)
  5. Start auto craft for any of them.
  6. Sometimes it goes stuck not after the first try, but it could take 1-2-5-10 times before the deadlock.

Expected behavior:

To see the Screen with Crafting Plan, not the server DeadLock


Versions:

  • Minecraft: 1.16.5
  • Forge: 36.2.20
  • CyclopsCore: CyclopsCore-1.16.5-1.12.1.jar
  • IntegratedDynamics: IntegratedDynamics-1.16.5-1.10.6.jar
  • IntegratedCrafting: IntegratedCrafting-1.16.5-1.0.20.jar
  • IntegratedTerminals: IntegratedTerminals-1.16.5-1.2.11.jar
  • IntegratedTunnels: IntegratedTunnels-1.16.5-1.8.9.jar

Additional information:

https://youtu.be/s4K5ZOwFa6I?t=280 => Relayed from FTBTeam/FTB-Modpack-Issues#520. https://youtu.be/UwVeBYYL2QA?t=150 => Relayed from FTBTeam/FTB-Modpack-Issues#512.

https://gist.github.com/libbkmz/3820ecd8450ffc11d929b23909d5ebbe - Stack trace captured after getting deadlock via jstack PID.

Original error on #1111 linked from FTBTeam/FTB-Modpack-Issues#346.

The user from the current issue this is being reported from, on FTB Modpack Issues, left this message:

What should I do in the meanwhile? I can help to do something, to speed up it.
Btw, found that Guava's Cache is prone to deadlocks. =\

They can interact in here to help you, or if you have any questions feel free to ask me directly. I can also reproduce the issue upon request, or if you need to pin down a potential problem – I’m available.

Thank you very much for your time!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
rubensworkscommented, Feb 7, 2022

Ok, I’ll probably just disable multithreaded crafting planning by default, it’s causing too many issues that are not easily fixable in MC’s architecture.

@Raidobw2 @libbkmz Could you check if setting craftingPlannerEnableMultithreading to false in the Integrated Terminals config solves all your problems? Hopefully, it should not result in too large a performance degradation.

If someone confirms that this works well, I’ll make craftingPlannerEnableMultithreading default to false.

1reaction
libbkmzcommented, Feb 7, 2022

Yeah, looks like it’s working with that setting disabled.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feed The Factory Integrated Crafting issue. Some researched ...
So it seems that while any item that you have access to at the beginning of the game works fine with autocrafting and...
Read more >
My hosted server crashes randomly, and i don't know what ...
Okay, so i am playing on a online hosting with around 80 mods, ... My hosted server crashes randomly, and i don't know...
Read more >
SevTech: Ages - ATLauncher
SevTech: Ages is a massive modpack packed with content and progression. This pack focuses on providing the player a long term progression experience...
Read more >
Changelog - Botania
Hotfix: Fix crash on startup caused by lack of Fabric datagen api in non-dev ... Change: Crafting Botania banners no longer consumes the...
Read more >
RFTools, Dimension Builder, Teleportation, Crafter, Screens ...
Introduction Hi all, I'd like to announce RFTools for 1.7.10, 1.8.9 and 1.9. This mod adds a number of machines and items that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found