McJtyMods / XNet

Advanced item/liquid/energy/... networking
MIT License
99 stars 53 forks source link

Xnet Memory Leak #246

Open ghost opened 6 years ago

ghost commented 6 years ago

This is what I keep getting in my console https://gist.github.com/Sacrificialgaming/edb7c3006c980672ca0099aec5a65a67

McJty commented 6 years ago

Version number please ? Also can you describe your setup and what you are doing

ghost commented 6 years ago

Xnet 1.12 1.6.8 and I ant sure what was causing this as I saw it spamming my console as you see in the log

josephcsible commented 6 years ago

Mod list?

ghost commented 6 years ago

https://minecraft.curseforge.com/projects/beyond-the-void/relations/dependencies

remclave commented 6 years ago

The above spam started when I tried to "open" the XNET Controller GUI. His server console started with the spamming. The XNET Controller GUI is completely blank. I've seen previous posts that have the same image but the players who reported the bug were also using SCM which is not in this pack. All the other information is what SacrificialGaming reported to you.

josephcsible commented 6 years ago

I can't reproduce this with just XNet and dependencies. @Sacrificialgaming Can you try to narrow down which other mod it may be? @remclave What other mods are you using?

josephcsible commented 6 years ago

Can someone who is experiencing this add -Dio.netty.leakDetection.level=paranoid to their JVM options, and post the new log with that?

winsrp commented 6 years ago

not sure about the memory leak, but I do get an error with the controller GUI, the GUI shows up, and I can click the channel icon but the channel selector button (energy, item, fluid, etc) doesn't show up. This is on a friends private server, I tried the same mods on a personal server and it does work there...

He seems to be getting this error

1300 packets have leaked. Top offenders [13:28:14] [Netty Epoll Server IO #5/FATAL] [FML]: xnet : 1300 [13:29:15] [Netty Epoll Server IO #5/FATAL] [FML]: Detected ongoing potential memory leak. 1400

I will ask him to put the jvm options, and attach a log here in just a few minutes

josephcsible commented 6 years ago

@winsrp What version of Forge?

winsrp commented 6 years ago

@josephcsible forge 3.2655 xnet 1.6.9

winsrp commented 6 years ago

@josephcsible on the normal latest.log it really is not returning any errors after the jvm option, I'll check the debug.log for anything.

winsrp commented 6 years ago

@josephcsible the errors don't seems to be shown in the logs, just the server console, we started the server with this line

"java -Xmx3840M -Xms3840M -jar forge-1.12.2-14.23.3.2655-universal.jar nogui -Dio.netty.leakDetection.level=paranoid -Dfml.queryResult=confirm"

and on the latest.log and debug.log there is no information about it, am I doing this right?

winsrp commented 6 years ago

he has the server in linux and I have mine in windows, so he will pass me all the files and I will load it in windows to see if the issue still happens, this way if I see the same error I will be able to post updates right away

winsrp commented 6 years ago

Well, in my server everything works and in his it doesn't, we have updated even java in case that was the issue but the error persist. In order to replicate (I know it is hard, but maybe you find something looking at the code) you don't need any features placed on the map, just the xnet controller, when right clicking it the GUI shows up, but it doesn't show the buttons on the upper right frame where you select the channel type, everything else seems to work fine, you can charge the controller, put cables, covers, connectors, and rename connectors, you can click the channel buttons and they seem to highlight.

I have connected a chest, and a generator with a couple of connectors and the chest, controller and generator do not show up on the left block list at all, if I place the controller by itself, also nothing shows up on the list. Doing a second controller attached to nothing also returns the same result.

Hopefully this will help you guys to check the code a bit, and see if you find something out. If there is anything else we can do to test to give you more information please let me know.

winsrp commented 6 years ago

Doing some further test seems like my friend (server owner) was able to open the GUI without issues and it is only in my client that it doesn't work (we do have the same exact files and config) will keep testing.

winsrp commented 6 years ago

we managed to get this error message on the server after updating java to 171 on both server and clients, but it still works on my friend machine and not on mine, this is the error that shows up on the log.

"[Netty Epoll Server IO #2/ERROR] [FML]: NetworkDispatcher exception io.netty.channel.unix.Errors$NativeIoException: syscall:write(..) failed: Broken pipe at io.netty.channel.unix.FileDescriptor.writeAddress(..)(Unknown Source) ~[FileDescriptor.class:?]"

winsrp commented 6 years ago

tried reinstalling java, minecraft, forge, mods, config, etc etc... and tried with other 4 guys playing on the server, and I'm the only one that cannot open the GUI properly... =(

winsrp commented 6 years ago

@josephcsible @McJty is there a possibility for you guys to make a version of xnet that has some extra debugging messages on the section when you right click the controller until its fully loaded so I can run it in my computer and maybe we can figure out how far did it go on the code and maybe after a couple of those tests we can get to the exact line where it is breaking, how about that? I'm up to test it

winsrp commented 6 years ago

I'll add an interesting fact I just noticed, using controllers put in old maps (controllers done with older versions of the mod) seems to keep working, but making a new map even in single player, will end with the same result, the controller has a broken GUI. If I go to an older test map the controller works fine, and new controllers work fine there as well, only new maps seem to be affected.

winsrp commented 6 years ago

made the obvious, I've put the previews version of xnet 1.6.8 and now it works in single player but multiplayer is still broken... @McJty @josephcsible

image