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

Players crash in the main thread of creating islands and resetting islands #113

Closed
MagicBreeze opened this issue Aug 23, 2021 · 3 comments
Closed
Assignees

Comments

@MagicBreeze
Copy link

MagicBreeze commented Aug 23, 2021

Expected behavior

Everything is smooth

Observed/Actual behavior

CPU Very high occupancy
Even i9 9900k is full

Steps/models to reproduce

[20:04:14 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH  - git-Paper-209 (MC: 1.17.1) ---
[20:04:14 ERROR]: The server has not responded for 10 seconds! Creating thread dump
[20:04:14 ERROR]: ------------------------------
[20:04:14 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[20:04:14 ERROR]: Chunk wait task info below: 
[20:04:14 ERROR]: -18,34 in 'acidisland_world:
[20:04:14 ERROR]: Load Task - none
[20:04:14 ERROR]: Save Task - none
[20:04:14 ERROR]: Chunk Holder - non-null
[20:04:14 ERROR]: Chunk Status - minecraft:full
[20:04:14 ERROR]: Chunk Ticket Status - minecraft:full
[20:04:14 ERROR]: Chunk Holder Status - minecraft:structure_starts
[20:04:14 ERROR]: ------------------------------
[20:04:14 ERROR]: Current Thread: Server thread
[20:04:14 ERROR]:       PID: 38 | Suspended: false | Native: false | State: TIMED_WAITING
[20:04:14 ERROR]:       Stack:
[20:04:14 ERROR]:               java.base@16.0.1/jdk.internal.misc.Unsafe.park(Native Method)
[20:04:14 ERROR]:               java.base@16.0.1/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
[20:04:14 ERROR]:               app//net.minecraft.util.thread.BlockableEventLoop.waitForTasks(BlockableEventLoop.java:144)
[20:04:14 ERROR]:               app//net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:133)
[20:04:14 ERROR]:               app//net.minecraft.server.level.ServerChunkCache.getChunk(ServerChunkCache.java:499)
[20:04:14 ERROR]:               app//net.minecraft.world.level.Level.getChunk(Level.java:426)
[20:04:14 ERROR]:               app//net.minecraft.world.level.Level.getBlockState(Level.java:765)
[20:04:14 ERROR]:               app//org.bukkit.craftbukkit.v1_17_R1.block.CraftBlock.getNMS(CraftBlock.java:74)
[20:04:14 ERROR]:               app//org.bukkit.craftbukkit.v1_17_R1.block.CraftBlock.isEmpty(CraftBlock.java:613)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.managers.island.DefaultNewIslandLocationStrategy.lambda$isIsland$0(DefaultNewIslandLocationStrategy.java:106)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.managers.island.DefaultNewIslandLocationStrategy$$Lambda$7484/0x00000008021dc1f8.test(Unknown Source)
[20:04:14 ERROR]:               java.base@16.0.1/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
[20:04:14 ERROR]:               java.base@16.0.1/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
[20:04:14 ERROR]:               java.base@16.0.1/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
[20:04:14 ERROR]:               java.base@16.0.1/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
[20:04:14 ERROR]:               java.base@16.0.1/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
[20:04:14 ERROR]:               java.base@16.0.1/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
[20:04:14 ERROR]:               java.base@16.0.1/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
[20:04:14 ERROR]:               java.base@16.0.1/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
[20:04:14 ERROR]:               java.base@16.0.1/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[20:04:14 ERROR]:               java.base@16.0.1/java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:632)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.managers.island.DefaultNewIslandLocationStrategy.isIsland(DefaultNewIslandLocationStrategy.java:105)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.managers.island.DefaultNewIslandLocationStrategy.getNextLocation(DefaultNewIslandLocationStrategy.java:53)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.managers.island.NewIsland.makeNextIsland(NewIsland.java:277)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.managers.island.NewIsland.newIsland(NewIsland.java:175)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.managers.island.NewIsland.<init>(NewIsland.java:62)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.managers.island.NewIsland$Builder.build(NewIsland.java:159)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.api.commands.island.IslandCreateCommand.makeIsland(IslandCreateCommand.java:96)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.api.commands.island.IslandCreateCommand.execute(IslandCreateCommand.java:76)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.listeners.JoinLeaveListener.lambda$firstTime$9(JoinLeaveListener.java:131)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.listeners.JoinLeaveListener$$Lambda$7479/0x00000008021aaaa0.accept(Unknown Source)
[20:04:14 ERROR]:               java.base@16.0.1/java.util.Optional.ifPresent(Optional.java:178)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.listeners.JoinLeaveListener.lambda$firstTime$10(JoinLeaveListener.java:131)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.listeners.JoinLeaveListener$$Lambda$7477/0x00000008021aa628.accept(Unknown Source)
[20:04:14 ERROR]:               java.base@16.0.1/java.util.Optional.ifPresent(Optional.java:178)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.listeners.JoinLeaveListener.lambda$firstTime$11(JoinLeaveListener.java:129)
[20:04:14 ERROR]:               BentoBox-1.17.2.jar//world.bentobox.bentobox.listeners.JoinLeaveListener$$Lambda$7472/0x00000008021aa400.run(Unknown Source)
[20:04:14 ERROR]:               app//org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101)
[20:04:14 ERROR]:               app//org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483)
[20:04:14 ERROR]:               app//net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1490)
[20:04:14 ERROR]:               app//net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:479)
[20:04:14 ERROR]:               app//net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1406)
[20:04:14 ERROR]:               app//net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1188)
[20:04:14 ERROR]:               app//net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316)
[20:04:14 ERROR]:               app//net.minecraft.server.MinecraftServer$$Lambda$3667/0x0000000801391a78.run(Unknown Source)
[20:04:14 ERROR]:               java.base@16.0.1/java.lang.Thread.run(Thread.java:831)
[20:04:14 ERROR]: ------------------------------
[20:04:14 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
[20:04:14 ERROR]: ------------------------------
[20:04:18 WARN]: Can't keep up! Is the server overloaded? Running 14365ms or 287 ticks behind
[20:04:19 WARN]: test001 moved too quickly! -9.997769191416433,1.1767592750642368,-2.1447364884262745

### BentoBox version

[20:10:45 INFO]: server: PAPER 1.17.1
[20:10:45 INFO]: BentoBox version: 1.17.2
[20:10:45 INFO]: 数据库: JSON
[20:10:45 INFO]: 已载入的游戏世界:
[20:10:45 INFO]: acidisland_world (AcidIsland) : 主世界
[20:10:45 INFO]: 已载入的附加组件:
[20:10:46 INFO]: AcidIsland 1.15.0 (ENABLED)
[20:10:46 INFO]: Biomes 1.14.0 (ENABLED)
[20:10:46 INFO]: Challenges 0.8.4 (ENABLED)
[20:10:46 INFO]: Level 2.7.2 (ENABLED)
[20:10:46 INFO]: Limits 1.17.2 (ENABLED)
[20:10:46 INFO]: Warps 1.11.1 (ENABLED)

Plugin list

[20:12:17 INFO]: Plugins (14): BentoBox, CMI, CMILib, CustomOreGen, EasyPlanting, Lores*, LuckPerms, NoSpawn*, PlaceholderAPI, ProtocolLib, RaphaelAutoTool, SkinsRestorer, Slimefun, WorldEdit

Other

When a play creates an island, reset that island, and is invited to join the island
Happen

@tastybento
Copy link
Member

As the log says, "this is not a crash" - it's an alert that the process is taking too long. The process is that it is trying to find a spot for the new island. This should usually be quick, so I don't know why it is taking longer than 10 seconds.

Please share you config.yml file. (Drag and drop or share via a paste site).

It looks like you have the option to create an island when players join the server turned on. Is this what you want? It has not been well tested. It might be better to have users run /ai to start.

Does this delay happen with every user who joins the server, or just the first one that joins after the server starts?

@MagicBreeze
Copy link
Author

MagicBreeze commented Aug 26, 2021

AcidIsland config:[config](AcidIsland config:config
Yes, I want players to automatically create islands when they join the server
This delay happens to every player
Including resetting the island and inviting friends to join the island will happen
It causes the CPU to be fully loaded unbelievable)

@tastybento
Copy link
Member

There seems to be nothing wrong with the config. Can you share a timings report? Make sure that during the period when the timings are being gathered you start a new island.

Here are some tuning ideas:

In the BentoBox config.yml, try reducing these numbers and see if it helps:

# Number of blocks to paste per tick when pasting blueprints.
  # Smaller values will help reduce noticeable lag but will make pasting take slightly longer.
  # On the contrary, greater values will make pasting take less time, but this benefit is quickly severely impacted by the
  # resulting amount of chunks that must be loaded to fulfill the process, which often causes the server to hang out.
  paste-speed: 64
  # Island deletion: Number of chunks per world to regenerate per second.
  # If there is a nether and end then 3x this number will be regenerated per second.
  # Smaller values will help reduce noticeable lag but will make deleting take longer.
  # A setting of 0 will leave island blocks (not recommended).
  # Added since 1.7.0.
  delete-speed: 100

In the Level addon config, change this setting to false and see if it helps:

# Zero island levels on new island or island reset
# If true, Level will calculate the starter island's level and remove it from any future level calculations.
# If false, the player's starter island blocks will count towards their level.
# This will reduce CPU if false.
zero-new-island-levels: false

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

No branches or pull requests

2 participants