TerminatorNL / LagGoggles

A minecraft forge mod which visualises lag in the world
GNU General Public License v3.0
54 stars 20 forks source link

Crash upon profiling too large of a server? #31

Closed Mario90900 closed 5 years ago

Mario90900 commented 6 years ago

Description:

I tried to use LagGoggles with Sevtech version 3.0.6, on a server. Initially after tossing it on the server and my client, I tried to run a profile with about 5 people connected to the server, and in different places, and right as it completed the server just locked up and eventually everyone was kicked all at once and the server remained unresponsive after this until I was forced to kill the process and reboot it. When I then ran a profile with only myself connected to the server, it seemed to complete with no issue and I was able to view the results fine - So naturally I tried to run it again with everyone connected once more. Running it a third time with all five players connected had the same result as the first time, the server thread seemed to just lock up with nothing printing out in the console except that the profile completed successfully.

How to reproduce:

  1. Download Sevtech 3.0.6 and run a server with about 5 people all connected and spread out in the world, and have LagGoggles installed.
  2. Run a 30 second profile.

Stacktrace, if any:

Unfortunately it does not appear to crash at all or give any readout in either the Forge Log or the Debug Log, so I don't have anything to provide here or for the crash report section. It just seems to lock up and freeze.

Crash report:

See above!

Console log:

`[23:23:02] [Thread-36/INFO] [laggoggles]: LagGoggles profiler started by Mario90900 (30 seconds) [23:23:09] [Server thread/DEBUG] [FML]: Gathering id map for writing to world save world [23:23:31] [Server thread/WARN] [net.minecraft.server.MinecraftServer]: Can't keep up! Did the system time change, or is the server overloaded? Running 20473ms behind, skipping 409 tick(s) [23:23:32] [Server thread/INFO] [laggoggles]: Processing results synchronously... [23:23:33] [Thread-36/INFO] [laggoggles]: LagGoggles finished profiling! [23:27:16] [Server thread/INFO] [net.minecraft.network.NetHandlerPlayServer]: Mario90900 lost connection: Disconnected [23:27:16] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: §eMario90900§r§e left the game§r [23:27:16] [Server thread/DEBUG] [NotEnoughItems]: Unloading Player: Mario90900 [23:27:16] [Server thread/INFO] [net.minecraft.network.NetHandlerPlayServer]: ClockwiseGear lost connection: Disconnected [23:27:16] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: §eClockwiseGear§r§e left the game§r [23:27:16] [Server thread/DEBUG] [NotEnoughItems]: Unloading Player: ClockwiseGear [23:27:16] [Server thread/INFO] [net.minecraft.network.NetHandlerPlayServer]: MagmaExploiter lost connection: Disconnected [23:27:16] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: §eMagmaExploiter§r§e left the game§r [23:27:16] [Server thread/DEBUG] [NotEnoughItems]: Unloading Player: MagmaExploiter [23:27:16] [Server thread/INFO] [net.minecraft.network.NetHandlerPlayServer]: Bisclaveret lost connection: Disconnected [23:27:16] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: §eBisclaveret§r§e left the game§r [23:27:16] [Server thread/DEBUG] [NotEnoughItems]: Unloading Player: Bisclaveret [23:27:16] [Server thread/INFO] [net.minecraft.network.NetHandlerPlayServer]: Cheejotya lost connection: Disconnected [23:27:16] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: §eCheejotya§r§e left the game§r [23:27:16] [Server thread/DEBUG] [NotEnoughItems]: Unloading Player: Cheejotya

[23:27:16] [Server thread/DEBUG] [FML]: Gathering id map for writing to world save world [23:27:17] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Saved the world§r [23:27:17] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Stopping the server§r [23:27:18] [Server thread/TRACE] [FML]: Sending event FMLServerStoppingEvent to mod minecraft [23:27:18] [Server thread/TRACE] [FML]: Sent event FMLServerStoppingEvent to mod minecraft`

Other notes:

If I had any suspicions, it seems that LagGoggles automatically sends the results to the person who initiated it at the end of the profile. It might be that LagGoggles is profiling such a large area and with the time set to 30 seconds, it gathers enough data that the time for it to process and then transfer the data hijacks the server thread for long enough the clients are kicked due to thinking the server just crashed or froze. Then the transfer just never completes due to the client having disconnected and the server remains stalled. Now this is just a crapshoot in the dark and I have not read through your code, so I have no idea if this is of any help - apologies if I am just wrong!

Xiaminou commented 6 years ago

I've gotten a similar result from running LagGoggles on my server, except I play alone. It used to work fine last time I used it a few months ago, something must have changed.

ProsperCraft commented 6 years ago

When your sever locks up, you need to run a warmroast while it is locked to determine the cause.

We are not having this problem with our TownCraft server with 19 players on.
We are using spongeforge, with the laggoggles spongeforge version.

Mario90900 commented 6 years ago

Unfortunately, that's not something I am likely able to do, as I just pay for a hosting service for my server and don't actually own the box it is running on. I don't know if they would want to try and run one, but it would certainly be very difficult to organize it at the very least.

ProsperCraft commented 6 years ago

It is just a java jar you run configured to point at your pid do you not have console access?

Mario90900 commented 6 years ago

Its a hosting service, so I only have FTP access, and everything that Multicraft is able to access.

Xiaminou commented 6 years ago

still happening, server freezes when the profiling ends.

debug.log

Minecraft: 1.12.2 Forge: 2705 Mods: list-alphabetical.txt

Martmists-GH commented 6 years ago

Can confirm this is an issue, running the ATM3 modpack with about 15 players, 12 bases. A 5 second profile is enough to cause everyone to Time out, and lock up the server for a good few minutes. A possible solution could be sending the data to the client on a new Thread.