jonesdevelopment / sonar

Sonar is a lightweight, effective and easy-to-use anti-bot plugin for Velocity, BungeeCord, and Bukkit.
https://docs.jonesdev.xyz
GNU General Public License v3.0
142 stars 12 forks source link

Bug Report: BungeeCord proxy freezes when running /sonar stats #327

Closed FallenCrystal closed 5 months ago

FallenCrystal commented 5 months ago

General information

Command /sonar stats should not be frozen when executed as a player.

Steps to reproduce

  1. Join the BungeeCord server. And must be have the sonar.statistics permission.
  2. Execute the command /sonar stats
  3. The player will be frozen. And not just the command output itself.

Sonar dump

Generated dump: {"memory":{"total":"128 MiB","max":"128 MiB","free":"44.5 MiB","used":"83.5 MiB"},"runtime":{"virtualCores":24,"jvmArguments":["-Xmx128M"],"vmName":"Java HotSpot(TM) 64-Bit Server VM","vmVendor":"Oracle Corporation","vmVersion":"17.0.8+9-LTS-211"},"os":{"name":"Windows 11","arch":"amd64","version":"10.0"},"sonar":{"version":"2.0.32-4fa3a0a-1152-main","platform":"BUNGEE","isOnMainBranch":true}}

Additional information

The issue is not reproducible on memory stats and network stats. /sonar stats cpu command can also cause freezing. But not as long as general stats.

Using this command in the console does not cause the issue.

https://github.com/jonesdevelopment/sonar/assets/71176602/262fe9f5-d7c5-4502-93e1-424860d4645c

https://github.com/jonesdevelopment/sonar/assets/71176602/187c9a12-3241-4426-b0be-21ede329ed8e

FallenCrystal commented 5 months ago

Up to 2gb and generate spark profiler task https://spark.lucko.me/w7vwLzlxcV Maybe it's a problem with the bungee (or adventure platform) itself.

image

jonesdevelopment commented 5 months ago

Can confirm this issue on latest BungeeCord & latest Sonar (release 2.0.32).