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

Placeholder replacement doesn't detect region tick threads as Server threads on Folia #3839

Open
404forever1 opened this issue Nov 9, 2024 · 6 comments
Labels
Bug Issues that contain unintended behavior Placeholders Issues related to PlaceholderAPI server: Folia

Comments

@404forever1
Copy link

image

@404forever1
Copy link
Author

[11:24:14 ERROR]: [io.papermc.paper.threadedregions.FoliaWatchdogThread] Tick region located in world 'world' around chunk '[45, -37]' has not responded in 5.796695
9s:
[11:24:14 ERROR]: ------------------------------
[11:24:14 ERROR]: Current Thread: Region Scheduler Thread #1
[11:24:14 ERROR]: PID: 111 | Suspended: false | Native: true | State: RUNNABLE
[11:24:14 ERROR]: Stack:
[11:24:14 ERROR]: [email protected]/sun.nio.ch.Net.poll(Native Method)
[11:24:14 ERROR]: [email protected]/sun.nio.ch.NioSocketImpl.park(NioSocketImpl.java:191)
[11:24:14 ERROR]: [email protected]/sun.nio.ch.NioSocketImpl.park(NioSocketImpl.java:201)
[11:24:14 ERROR]: [email protected]/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309)
[11:24:14 ERROR]: [email protected]/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:346)
[11:24:14 ERROR]: [email protected]/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:796)
[11:24:14 ERROR]: [email protected]/java.net.Socket$SocketInputStream.read(Socket.java:1099)
[11:24:14 ERROR]: com.mysql.cj.protocol.ReadAheadInputStream.fill(ReadAheadInputStream.java:98)
[11:24:14 ERROR]: com.mysql.cj.protocol.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:141)
[11:24:14 ERROR]: com.mysql.cj.protocol.ReadAheadInputStream.read(ReadAheadInputStream.java:171)
[11:24:14 ERROR]: [email protected]/java.io.FilterInputStream.read(FilterInputStream.java:119)
[11:24:14 ERROR]: com.mysql.cj.protocol.FullReadInputStream.readFully(FullReadInputStream.java:55)
[11:24:14 ERROR]: com.mysql.cj.protocol.a.SimplePacketReader.readHeaderLocal(SimplePacketReader.java:72)
[11:24:14 ERROR]: com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:54)
[11:24:14 ERROR]: com.mysql.cj.protocol.a.SimplePacketReader.readHeader(SimplePacketReader.java:36)
[11:24:14 ERROR]: com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:43)
[11:24:14 ERROR]: com.mysql.cj.protocol.a.TimeTrackingPacketReader.readHeader(TimeTrackingPacketReader.java:32)
[11:24:14 ERROR]: com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:45)
[11:24:14 ERROR]: com.mysql.cj.protocol.a.MultiPacketReader.readHeader(MultiPacketReader.java:35)
[11:24:14 ERROR]: com.mysql.cj.protocol.a.NativeProtocol.readMessage(NativeProtocol.java:591)
[11:24:14 ERROR]: com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:775)
[11:24:14 ERROR]: com.mysql.cj.protocol.a.NativeProtocol.sendCommand(NativeProtocol.java:714)
[11:24:14 ERROR]: com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:946)
[11:24:14 ERROR]: com.mysql.cj.NativeSession.execSQL(NativeSession.java:803)
[11:24:14 ERROR]: com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:915)
[11:24:14 ERROR]: com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1004)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//plan.com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//plan.com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.queries.QueryStatement.executeQuery(QueryStatement.java:72)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.queries.QueryStatement.executeWithConnection(QueryStatement.java:62)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.queries.QueryStatement.executeQuery(QueryStatement.java:52)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.SQLDB.lambda$query$2(SQLDB.java:339)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.SQLDB$$Lambda/0x0000020c3be835f8.get(Unknown Source)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.DBAccessLock.performDatabaseOperation(DBAccessLock.java:113)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.DBAccessLock.performDatabaseOperation(DBAccessLock.java:87)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.SQLDB.query(SQLDB.java:339)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.queries.containers.PerServerContainerQuery.matchingEntrySet(PerServerCon
tainerQuery.java:110)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.queries.containers.PerServerContainerQuery.worldTimes(PerServerContainer
Query.java:89)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.queries.containers.PerServerContainerQuery.executeQuery(PerServerContain
erQuery.java:62)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.queries.containers.PerServerContainerQuery.executeQuery(PerServerContain
erQuery.java:45)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.SQLDB.lambda$query$2(SQLDB.java:339)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.SQLDB$$Lambda/0x0000020c3be835f8.get(Unknown Source)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.DBAccessLock.performDatabaseOperation(DBAccessLock.java:113)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.DBAccessLock.performDatabaseOperation(DBAccessLock.java:87)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.SQLDB.query(SQLDB.java:339)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.queries.containers.PlayerContainerQuery.lambda$executeQuery$7(PlayerCont
ainerQuery.java:68)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.queries.containers.PlayerContainerQuery$$Lambda/0x0000020c3cf74400.get(U
nknown Source)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.delivery.domain.container.CachingSupplier.get(CachingSupplier.java:50)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.delivery.domain.container.SupplierDataContainer.getValue(SupplierDataContainer.java:93)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.delivery.domain.container.DynamicDataContainer.getValue(DynamicDataContainer.java:66)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.queries.containers.PlayerContainerQuery.lambda$executeQuery$10(PlayerCon
tainerQuery.java:74)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.storage.database.queries.containers.PlayerContainerQuery$$Lambda/0x0000020c3ce9d000.get(U
nknown Source)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.delivery.domain.container.CachingSupplier.get(CachingSupplier.java:50)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.delivery.domain.container.SupplierDataContainer.getValue(SupplierDataContainer.java:93)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.delivery.domain.container.DynamicDataContainer.getValue(DynamicDataContainer.java:66)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.delivery.domain.mutators.SessionsMutator.forContainer(SessionsMutator.java:55)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.placeholder.PlayerPlaceHolders.lambda$registerPlayerPlaytimePlaceholders$57(PlayerPlaceHo
lders.java:371)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.placeholder.PlayerPlaceHolders$$Lambda/0x0000020c3bec4308.apply(Unknown Source)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.placeholder.PlanPlaceholders.lambda$register$1(PlanPlaceholders.java:89)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.placeholder.PlanPlaceholders$$Lambda/0x0000020c3bebfcc8.apply(Unknown Source)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.placeholder.PlanPlaceholders.tryReplacePlaceholder(PlanPlaceholders.java:160)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.placeholder.PlanPlaceholders.onPlaceholderRequest(PlanPlaceholders.java:120)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.addons.placeholderapi.PlanPlaceholderExtension.getPlaceholderValue(PlanPlaceholderExtensi
on.java:113)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.addons.placeholderapi.PlanPlaceholderExtension.lambda$onRequest$0(PlanPlaceholderExtensio
n.java:101)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.addons.placeholderapi.PlanPlaceholderExtension$$Lambda/0x0000020c3d4a7658.get(Unknown Sou
rce)
[11:24:14 ERROR]: [email protected]/java.util.Optional.orElseGet(Optional.java:364)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//com.djrapitops.plan.addons.placeholderapi.PlanPlaceholderExtension.onRequest(PlanPlaceholderExtension.java:10
1)
[11:24:14 ERROR]: PlaceholderAPI-2.11.7-DEV-null.jar//me.clip.placeholderapi.replacer.CharsReplacer.apply(CharsReplacer.java:119)
[11:24:14 ERROR]: PlaceholderAPI-2.11.7-DEV-null.jar//me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:71)
[11:24:14 ERROR]: PlaceholderAPI-2.11.7-DEV-null.jar//me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:99)
[11:24:14 ERROR]: Plan-5.6-SNAPSHOT.jar//net.playeranalytics.extension.placeholderapi.PlayerJoinWarmUpListener.onJoin(PlayerJoinWarmUpListener.java:23
)
[11:24:14 ERROR]: com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor416.execute(Unknown Source)
[11:24:14 ERROR]: org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77)
[11:24:14 ERROR]: co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[11:24:14 ERROR]: org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[11:24:14 ERROR]: io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:56)
[11:24:14 ERROR]: io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131)
[11:24:14 ERROR]: org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628)
[11:24:14 ERROR]: net.minecraft.server.players.PlayerList.placeNewPlayer(PlayerList.java:440)
[11:24:14 ERROR]: net.minecraft.server.network.ServerConfigurationPacketListenerImpl.lambda$handleConfigurationFinished$2(ServerConfigurationPacketLis
tenerImpl.java:203)
[11:24:14 ERROR]: net.minecraft.server.network.ServerConfigurationPacketListenerImpl$$Lambda/0x0000020c3d5cc4e8.run(Unknown Source)
[11:24:14 ERROR]: io.papermc.paper.threadedregions.RegionizedTaskQueue$PrioritisedQueue$ChunkBasedPriorityTask.executeInternal(RegionizedTaskQueue.jav
a:630)
[11:24:14 ERROR]: io.papermc.paper.threadedregions.RegionizedTaskQueue$PrioritisedQueue.executeTask(RegionizedTaskQueue.java:547)
[11:24:14 ERROR]: io.papermc.paper.threadedregions.RegionizedTaskQueue$RegionTaskQueueData.drainTasks(RegionizedTaskQueue.java:376)
[11:24:14 ERROR]: net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1696)
[11:24:14 ERROR]: io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407)
[11:24:14 ERROR]: io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:459)
[11:24:14 ERROR]: ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546)
[11:24:14 ERROR]: [email protected]/java.lang.Thread.runWith(Thread.java:1596)
[11:24:14 ERROR]: [email protected]/java.lang.Thread.run(Thread.java:1583)

@AuroraLS3
Copy link
Collaborator

Bug is that Folia region tick thread is not detected as a server thread by the check in Plan placeholder api implementation so it thinks it's safe to execute.

@AuroraLS3 AuroraLS3 added Bug Issues that contain unintended behavior Placeholders Issues related to PlaceholderAPI labels Nov 9, 2024
@AuroraLS3
Copy link
Collaborator

Remove any plan placeholders from use until this is fixed to temporarily solve this issue.

@AuroraLS3 AuroraLS3 changed the title error Placeholder replacement doesn't detect region tick threads as Server threads on Folia Nov 9, 2024
@ColdeZhang
Copy link
Contributor

ColdeZhang commented Nov 11, 2024

Seems like this was an DB timeout error.
感觉是数据库操作超时了。

Can you provide more information about your operation?
可以提供一些更具体的信息么?

Such as what are you going todo, how it should be, version of your server/plugin, plugin list, etc...
例如你的操作内容、预期的结果、服务器与插件版本、插件列表等等...

Here is a template of bug reporting(Copy and fill it):
可以参考此模板:

**BUG描述**

请详细、清晰地描述bug现象。

**复现方式**

Bug复现步骤:

1. 打开冰箱;
2. 将大象放入冰箱;
3. 关上冰箱。

**正常情况的表现**

正常情况下的表现应该是怎样的

**截图**

(可选)。

**运行环境:**

- 服务器系统:win, linux
- 服务端核心:(如:Paper、Spigot)
- 服务端版本:
- 客户端版本:
- 插件版本:

**补充信息**

如错误日志等。

@404forever1
Copy link
Author

Seems like this was an DB timeout error. 感觉是数据库操作超时了。

Can you provide more information about your operation? 可以提供一些更具体的信息么?

Such as what are you going todo, how it should be, version of your server/plugin, plugin list, etc... 例如你的操作内容、预期的结果、服务器与插件版本、插件列表等等...

Here is a template of bug reporting(Copy and fill it): 可以参考此模板:

**BUG描述**

请详细、清晰地描述bug现象。

**复现方式**

Bug复现步骤:

1. 打开冰箱;
2. 将大象放入冰箱;
3. 关上冰箱。

**正常情况的表现**

正常情况下的表现应该是怎样的

**截图**

(可选)。

**运行环境:**

- 服务器系统:win, linux
- 服务端核心:(如:Paper、Spigot)
- 服务端版本:
- 客户端版本:
- 插件版本:

**补充信息**

如错误日志等。

配置文件设置
PlaceholderAPI:
Load_these_placeholders_on_join:
- "%plan_server_uuid%"
- "%plan_player_registered%"
- "%plan_player_geolocation%"
- "%plan_player_sessions_count%"
- "%plan_player_time_day%"
- "%plan_player_time_week%"
- "%plan_player_time_month%"
- "%plan_player_time_day_raw%"
- "%plan_player_time_week_raw%"
- "%plan_player_time_month_raw%"
使用mysql,同时还有一台安装在velocity也是mysql。
image
image
MYSQL 使用
image
image
image
服务器还有大量使用mysql的插件,均没有报错。
此外通过查询mysql的连接,可以发现cpu高占用的时候,plan在工作
image

@404forever1
Copy link
Author

cpu占用好夸张,因为用玩家在线时间来做在线奖励,所以加载了这几个变量。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that contain unintended behavior Placeholders Issues related to PlaceholderAPI server: Folia
Projects
Status: INBOX
Development

No branches or pull requests

3 participants