CyclopsMC / IntegratedTunnels

Transfer other energy, items and fluids over Integrated Dynamics networks
MIT License
20 stars 13 forks source link

Network corruption on item importer (seemingly random)? #212

Closed Davivs69 closed 2 years ago

Davivs69 commented 3 years ago

Issue type:


Short description:

The corruption of the network seems to only happen every now and then, not on every server restart and not on every player login, so I can sadly not determine the exact cause, only that it may randomly occur. Breaking down the item importer itself and placing again fixes the issue entirely, so I suspect they are the cause of the issue, but I can not find a straight answer why at the moment.

Steps to reproduce the problem:

I can at this point not yet pinpoint or reproduce this issue. References: Issue https://github.com/CyclopsMC/IntegratedDynamics/issues/720 and/or https://github.com/CyclopsMC/IntegratedDynamics/issues/648 posted in the issue section of CyclopsMC/IntegratedDynamics

Expected behaviour:

I expect the network to not (seemingly random) get corrupted for reasons not yet clear to me.


Versions:

rubensworks commented 3 years ago

Thanks for reporting!

rubensworks commented 3 years ago

I would require server logs for this. Luckily, I have access to those in this case :-) Could you share a time+date at which this occured? (feel free to wait until this occurs another time in the future)

rubensworks commented 3 years ago

Closing this due to inactivity. Feel free to comment if anyone has logs to share.

User-green commented 3 years ago

Okay. I can now reproduce this issue, however IDC how to get logs.

  1. Run Integrated Dynamics + Integrated Tunnels on 1.16.5 forge server. 1.1 If not build, build any network with redstone reader+redstone writer (and two mono conectors) bound togeather via variable.
  2. Send "stop" command via interactive console. (May require 4+ hour of uptime, may not)
  3. Start the server again. Vola! Your network is broken! This can be fixed by reseting of any part of the network.

This also seem to be Integrated Dynamics fault, because networks with no IT partsa also got corrupted.

rubensworks commented 3 years ago

however IDC how to get logs.

Those are the most important for this issue, not much I can do without them.

User-green commented 3 years ago

however IDC how to get logs.

Those are the most important for this issue, not much I can do without them.

What logs exactly do you need and how I have to record them?

rubensworks commented 3 years ago

I don't know the exact filename by hard, something like server-fml-latest.log I assume.

User-green commented 3 years ago

I don't know the exact filename by hard, something like server-fml-latest.log I assume.

Okay, wait a miute...

User-green commented 3 years ago

I cant find any fml logs, but there is debug.log and latest.log. If you need any adidtional logs, please, tell me what logs do you need and how to record them.

debug.log latest.log

rubensworks commented 3 years ago

The log seems very short, so it's probably not from the right time.

From the moment that the corruption occurs, something should be printed in the logs. Once that occurs, I need to see those logs.

User-green commented 3 years ago

The log seems very short, so it's probably not from the right time.

700k (debug.log) is 'short'?

From the moment that the corruption occurs, something should be printed in the logs. Once that occurs, I need to see those logs.

Corruption occures on server startup, see lastest.log.

Also. I was mistaken, I have minecraft 1.16.5 not 1.17.

rubensworks commented 3 years ago

700k (debug.log) is 'short'?

I just need latest.log

Corruption occures on server startup, see lastest.log.

There's nothing in the logs that indicates that.

User-green commented 3 years ago

700k (debug.log) is 'short'?

I just need latest.log

Corruption occures on server startup, see lastest.log.

There's nothing in the logs that indicates that.

I see this. But non the less, it was present on this startup... Give me a few minutes, I'll try to make it appeare in logs.

User-green commented 3 years ago

Done. Here video of bug AND logs with it. debug.log latest.log https://youtu.be/4-u_7So4kWQ

YouTube
29 06 2021 17 32 06 REC: Github bug report
rubensworks commented 3 years ago

Ah, this may be the reason:

[29июн2021 17:34:01.429] [Server thread/WARN] [integrateddynamics/]: A part already existed in the network, this is possibly a result from item duplication.

So you're probably copying parts in creative-mode, which results in parts in your network having the same id, which can horribly break things. Could you try ensuring all parts in your network have a unique id (so not copying in creative mode), and trying again?

User-green commented 3 years ago

Ah, this may be the reason:

[29июн2021 17:34:01.429] [Server thread/WARN] [integrateddynamics/]: A part already existed in the network, this is possibly a result from item duplication.

So you're probably copying parts in creative-mode, which results in parts in your network having the same id, which can horribly break things. Could you try ensuring all parts in your network have a unique id (so not copying in creative mode), and trying again?

I am 100% there is no creative/chated/dupe parts. If you take a look to the video, you will see, that this is survival world. Also I am shure that there is no ID dupe in the network (because not-long-ago I remade it)

(BTW some usless debug info trom extended logs

[20:46:53] [Server thread/INFO] [STDOUT/]: [org.cyclops.integrateddynamics.core.network.PositionedAddonsNetworkIngredients:onChange:93]: org.cyclops.integratedtunnels.core.network.ItemNetwork@d677ab3f[ADDITION at org.cyclops.integrateddynamics.api.part.PrioritizedPartPos@188b0be2(1): [26 cobblestone, 1 lava_bucket]] # This is while network was broken [20:46:58] [Server thread/WARN] [integrateddynamics/]: A part already existed in the network, this is possibly a result from item duplication. # network fixed [20:47:02] [Server thread/INFO] [STDOUT/]: [org.cyclops.integrateddynamics.core.network.PositionedAddonsNetworkIngredients:onChange:93]: org.cyclops.integratedtunnels.core.network.ItemNetwork@d677ab3f[ADDITION at org.cyclops.integrateddynamics.api.part.PrioritizedPartPos@d69a47a4(1): [5 bucket]] # this is normal, I connected an intrface with chest in order to fix the network )

Seem to be the same issue as #230

rubensworks commented 3 years ago

Could you try reproducing this issue without any other mods installed? And send the world to me for debugging?

User-green commented 3 years ago

After five or so hours of trying to reproduce this bug on windows I have located the cause. It is related to JRE.

TL;DR: Mod will work just fine with oracle's JRE8, but if OpenJRE (for me it was adoptopenjdk-8-openj9-jre/buster 8u292-b10.openj9-0.26.0-3 amd64) is used - the problem described here will emerge.

This was descoverd due to me running server on dedecated linux machine but useing windows one as main. I was trying to run server on PC I was playing, to discover what mods exectly cause conflict if any. I run server only with this mod first and than I was adding another mods. In turns out, that on windows execly the same server works just fine. So I suspected java. After replaceing vava on server problem have gone. @rubensworks

rubensworks commented 3 years ago

Huh, that is interesting, thanks for checking. This one may be very painful to debug though...

Do you by any chance have a ID-only world where the problem occurs that I can use to debug?

User-green commented 3 years ago

Huh, that is interesting, thanks for checking. This one may be very painful to debug though...

I understand. But I dont think you should do it. This seem to be OJRE fault, not yours, and it will be enought to add warn to mod on start, that it may work incorrectky with OJRE. Plus. With OJRE I have observed strange behavier of the network in general - f.e. I couldnt make channels work and item interfaces somtimes acted like importers. This problems also have gone after normal JRE was installed.

Do you by any chance have a ID-only world where the problem occurs that I can use to debug?

No. But if you whant to try debug it anyway, I can try to create one for you.

rubensworks commented 3 years ago

Ideally, this mod should work on any JRE of course, because many people are in fact using the Open variant.

No. But if you whant to try debug it anyway, I can try to create one for you.

If possible, that would be great! But I guess this won't be easy to do.

User-green commented 3 years ago

Ideally, this mod should work on any JRE of course, because many people are in fact using the Open variant.

My respect, not all developers will correct the error of that type.

If possible, that would be great!

Ofcorse it is possibe!

But I guess this won't be easy to do.

It wasnt hard at all. I just had to set up server with mod and run it under OJRE

Here is the files. (Note: this upload will expire after two weeks) https://transfiles.ru/czx5s

rubensworks commented 3 years ago

Thanks! Will look into it (not sure when, and if I'll be able to fix it even though)

User-green commented 3 years ago

Thank. For now, I will suggest consider adding warning about OJRE in mod's descriprion and/or — on mod's startup.

rubensworks commented 2 years ago

Thanks for all the help @User-green! It seems that FML had some different behaviour on OpenJ9.

User-green commented 2 years ago

Thank you for fixing this!