Closed FallenCrystal closed 1 year ago
note: i also tested it on the 1.8 server. only ProtocolLib, GrimAC, ViaVersions servers. this also crashes
This has nothing to do with grim itself. When u perform a server crasher the server itself is not working as it supposed to. Anticheat fails are kind of expected when this happens. You should look into getting an AntiCrasher either free one or paid one which cancels malicious packets, since this is out of scope of grim.
this only happens to grim.
when I only use paper. then would be kicked out for "sending too many packets."
if the console does not prompt verbose. Then the situation can be alleviated. and I configured the kick for the timer check. them will only take up some of my CPU resources. Then kick out. *i used ConsoleSpamFix to prevent AntiCheatReplay from getting a transfer event error.
It is still not a grim issue. Get an anticrasher which makes you proof against crashers. Using ConsoleSpamFix you are not preventing anything. As the name says you are just filtering those error messages.
my english sucks. i mean paper can kick them
It is still not a grim issue. Get an anticrasher which makes you proof against crashers. Using ConsoleSpamFix you are not preventing anything. As the name says you are just filtering those error messages.
of course I know. this just avoids causing stuttering on my console
my solution is still to cfg kick for the timer check. but as far as I know there is no penalty in the default cfg (this is one reason i opened the issue). and grim will still send you a lot of flag spam after the player is kicked out.
As said it has nothing to do with grim which also means you should not open an issue about something like this here. What you should look for (to fix those console spams and false alerts) is an anticrasher just like lpx.
using those plugins does ease it. but it cant be completely solved
It can since anticrashers cancel those packets which results in no harm to the server itself which also leads to no errors in console or false alerts of anticheats
if these can effectively prevent such errors from occurring at all. i wont open the issue here either – my servers have LPX and FlameCord. The bukkit server has an ExploitFixer
not everyone understands exploit. this bug test only happens on servers with grim. its about how to reduce its impact on grim. Instead of shifting the blame to the non-responsibility of the anti-exploit plugin
using those plugins does ease it. but it cant be completely solved
.
they can be reduced to the point where players crash servers with grim. but the high cpu usage still exists. it can still be a blow to some low-performing servers.
packet-spam-threshold: 150
This exists in the config for a reason. If the player sends more than this many packets in a second that are cancelled, the player gets kicked.
its still 150. it kicked too late. so much so that it can cause lagging on the server before the grim kicks it. as a matter of fact. the only way I can patch it is to configure kick for the timer check
What is the number in the log for: Disconnecting user for spamming invalid packets, packets cancelled in a second " + { CANCELLED PACKET COUNT }
this is after I added the timer check kick. because that guy will crash my server directly
If it's being called multiple times, the error likely is from how the player's packets are somehow not being cleared from the network buffer after they have been kicked
i think so too. and grim will continue to spam (and out of order) after the player kicks. For example, x1, x2, x3 may become x2, x3, x1 *will be cleared once. i mean... flag
don't know, connection is closed and grim ignores packets from closed connections, so I don't see any bugs. Does the player actually get kicked when they trigger this error? When is the player kicked compared to when is grim giving these logs?
a lot of cases are servers getting stuck. then grim try to kick out. the player has actually logged out of the server after the connection timed out.
because it will bring a lot of spam to my console. so I didnt open print-verbose-console
under testing without any antiexploit plugin. the server will get stuck for about a minute (there is a probability that the grim kick the player. it may also exit the server due to connection timeout. as mentioned earliery). the server continues to run. Then grim will keep flagging that player. until the server crash
*crash are always after the player leaved the server
If it's being called multiple times, the error likely is from how the player's packets are somehow not being cleared from the network buffer after they have been kicked
don't know, connection is closed and grim ignores packets from closed connections, so I don't see any bugs. Does the player actually get kicked when they trigger this error? When is the player kicked compared to when is grim giving these logs?
all in all, it leaves whenever it leave. There is this prompt before and after leaving. whats more important is that the player still flags the player endlessly after leaving the server. until the watchdog kills the server
addendum: leave will cause the grim flag to be zeroed in and start flag again. i think grim should have known that the player left the server
I don't think the packet limiter was disconnecting them properly. I pushed some changes that may help. Also try lowering the packet-spam-threshold
a bit more.
The packet limiter could be changed so that every X seconds, it sets the max packets. Every cancelled packet, it decrements the counter. If the counter hits 0, then the player is immediately kicked. You would stay on the netty thread and not have to queue anything that way.
That would be for the better.
my current guess for why this happens is that the disconnect command is put on the netty queue, behind all of the player packets they have spammed. Would likely require a debugger to see what netty is doing.
Yeah, it's being thrown on the netty queue based on the netty javadocs saying that it calls an event.
@AkariDream Check if PR https://github.com/GrimAnticheat/Grim/pull/809 fixes your issue. Here's a build if you don't want to merge & compile it. grimac-2.3.24.zip
thx. i dont have much time right now. i will test it later
successful patched
Alright cool, I've merged it
Describe the bug and how to replicate it
if the server has an "AntiCheatReplay" plugin. it also causes a large number of transfer event errors. configured kick punishments for timer checks can effectively reduce the possibility of the server being killed by a watchdog due to timeouts. but if a group of players use it at the same time, the consequences will be unimaginable.
Grim version
2.3.23
Server version
Purpur-1171 (MC1.16.5)
Plugins
Plugins (114): AAC5, AdvancedBan, AdvancedEnchantments, AdvancedReplay, ajLeaderboards, AncientGates, AnnouncerPlus, AntiAuraML-windows64, AntiCheatAddition, AntiCheatReplay, AntiSeedCracker, Aurora, BanAnnouncer, BestTools, BetterLogStrip, BetterTridents, BloodFading, BlueSlimeCore (SirBlobmanAPI, SirBlobmanCore, XSeries), BowHub, ChatControlRed, ChestCommands, Citizens, ClearLag, CMILib, CombatLogX, CommandSync, CompatNoCheatPlus, ConsoleSpamFix, CoreProtect, CrazyCrates, DecentHolograms, DiscordSRV, Duels, Eggwars, ElytraRacing, Essentials, EssentialsChat, EssentialsProtect, EssentialsSpawn, ExploitFixer, FastAsyncWorldEdit (WorldEdit), floodgate, Freeze, GPS, GrimAC, GSit, HamsterAPI, HeadDatabase, HeadsPlus, HideAndSeek, HubPvPSword, InventoryFullPlus, InventoryRollbackPlus, ItemEdit, ItemJoin, ItemTag, JH_Economy, JoinCommands, KP-PVP, KPCore, Launchpads, LibsDisguises, LightAPI, LiteBans, LiteSignIn, LuckPerms, Maintenance, Matrix, Morphy, MultiInv, Multiverse-Core, NoCheatPlus, OpenInv, Parkour, Pl-Hide-Pro, PlaceholderAPI, PlayerKits, PlayerPoints, PlugManX (PlugMan), PreventPortBypass, ProCosmetics, ProtocolLib, RealisticSeasons, Residence, Sacaddons, ServerSafetyManagement, ServersNPC, ShulkerPackX, Skywars, Slimefun, SoaromaSAC, spark, Spicord, SurvivalGames, TAB, TAB-Bridge, TabTPS, ThePit, TNTRun_reloaded, ToDoList, Treasury, Triton, UltimateStacker, UltimateStatistics, UltimateTimber, Vault, ViaBackwards, ViaRewind, ViaVersion, VoidGen, Vulcan, WorldBorder, WorldGuard, XProtect