Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gamebox held up server on startup #56

Closed
hafarooki opened this issue Nov 13, 2018 · 12 comments
Closed

gamebox held up server on startup #56

hafarooki opened this issue Nov 13, 2018 · 12 comments

Comments

@hafarooki
Copy link

"Server thread" #21 prio=5 os_prio=0 cpu=24182.58ms elapsed=79.42s tid=0x00007fc34dc59000 nid=0x30b1 waiting on condition  [0x00007fc2dd6c9000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
	at java.lang.Thread.sleep(java.base@11/Native Method)
	at com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository.findProfilesByNames(YggdrasilGameProfileRepository.java:85)
	at com.destroystokyo.paper.profile.PaperGameProfileRepository.findProfilesByNames(PaperGameProfileRepository.java:45)
	at net.minecraft.server.v1_12_R1.TileEntitySkull$1.load(TileEntitySkull.java:64)
	at net.minecraft.server.v1_12_R1.TileEntitySkull$1.load(TileEntitySkull.java:46)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298)
	- locked <0x00000007cb048de8> (a com.google.common.cache.LocalCache$StrongAccessEntry)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211)
	at com.google.common.cache.LocalCache.get(LocalCache.java:4154)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147)
	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153)
	at net.minecraft.server.v1_12_R1.TileEntitySkull$3.call(TileEntitySkull.java:206)
	at net.minecraft.server.v1_12_R1.TileEntitySkull$3.call(TileEntitySkull.java:203)
	at net.minecraft.server.v1_12_R1.TileEntitySkull.b(TileEntitySkull.java:222)
	at org.bukkit.craftbukkit.v1_12_R1.inventory.CraftMetaSkull.applyToItem(CraftMetaSkull.java:86)
	at org.bukkit.craftbukkit.v1_12_R1.inventory.CraftItemStack.setItemMeta(CraftItemStack.java:389)
	at org.bukkit.craftbukkit.v1_12_R1.inventory.CraftItemStack.asNMSCopy(CraftItemStack.java:46)
	at org.bukkit.craftbukkit.v1_12_R1.inventory.CraftInventory.setItem(CraftInventory.java:96)
	at me.nikl.gamebox.utility.ItemStackUtility.getPlayerHead(ItemStackUtility.java:109)
	at me.nikl.gamebox.inventory.gui.game.TopListPage.update(TopListPage.java:69)
	at me.nikl.gamebox.data.toplist.TopList.updateUsers(TopList.java:70)
	at me.nikl.gamebox.data.toplist.TopList.updatePlayerScores(TopList.java:42)
	at me.nikl.gamebox.data.database.FileDB$2.onSuccess(FileDB.java:139)
	at me.nikl.gamebox.data.database.FileDB$2.onSuccess(FileDB.java:136)
	at me.nikl.gamebox.data.database.FileDB$3$1.run(FileDB.java:254)
	at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:63)
	at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:423)
	at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:840)
	at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423)
	at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:774)
	at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666)
	at java.lang.Thread.run(java.base@11/Thread.java:834)

above stacktrace is from jstack. I was doing some mass UUID -> name conversion so mojang's probably limiting my connections, that's probably it

@hafarooki hafarooki changed the title gamebox holds up server on startup gamebox held up server on startup Nov 13, 2018
@NiklasEi
Copy link
Owner

above stacktrace is from jstack. I was doing some mass UUID -> name conversion so mojang's probably limiting my connections, that's probably it

Either that or maybe the connection just timed out. From your stacktrace I would say that this is nothing I can do about in GameBox.

@hafarooki
Copy link
Author

I had this issue again several times, why is it loading people's profiles on the main thread?

@NiklasEi
Copy link
Owner

I'll reopen and see when I find time to add this. I should rewrite the way GameBox loads the top lists anyway (#34).

@NiklasEi NiklasEi reopened this Nov 16, 2018
@hafarooki
Copy link
Author

thanks 😄

@hafarooki
Copy link
Author

There are lots of sites that cache the skin, you might want to see if you can use this instead, I think Crafatar works for that

@hafarooki
Copy link
Author

as a temporary solution, can this be disabled? It's holding it up every startup now 😕

@NiklasEi
Copy link
Owner

As a temporary "fix" you could remove the top lists. Go to the game configurations and comment out the toplists. This way you won't lose the statistics, but the plugin won't load the heads.

@Matocolotoe
Copy link

Heads could just be loaded in another thread nah ?

@NiklasEi
Copy link
Owner

NiklasEi commented Dec 1, 2018

Only the call for the texture is the problem. And yes, sure I can do that on another thread. That's what Miclebrick already said.

I will do this together with #61

@RoboMWM
Copy link

RoboMWM commented May 25, 2019

That, or get the profile async. Then the server won't do a synchronous call for the texture when you retrieve the head. But that's a paper-only thing (getting the profile) iirc.

@NiklasEi
Copy link
Owner

As far as I know I can just cache the textures as string, and use fake GameProfiles to apply them to heads. That should work for Bukkit. It just needs the authlib from mojang.

@NiklasEi
Copy link
Owner

Closing in favour of #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants