Bug Closed · Invalid

No protection against potion floods from skills

#10148 opened by chikage_ 4 hours ago

chikage_reported this bug
  • Type: Enhancement
  • Version: MythicMobs Premium 5.14.0-SNAPSHOT-60f8b0e6, Leaf 1.21.4-525
  • Evidence: our plugin cancelled 33,970 potion applications on dungeon-1, across the logged shutdowns
  • Location: PotionMechanic, skill execution

The skill behind these applications is not identified. Our per-event details are debug-only, so a recursive or very wide config skill is still possible.

Logs

[15:03:03] [MythicUtils] [PotionSpamShield] Disabled. Blocked total: 12097
[16:04:58] [MythicUtils] [PotionSpamShield] Disabled. Blocked total: 6874
[01:49:30] [MythicUtils] [PotionSpamShield] Disabled. Blocked total: 6358

Log prefixes are shortened. Each total covers one server session.

What we had to work around

Our plugin limits PLUGIN-cause potion events on the main thread:

  • 1,000 per tick across the server;
  • 100 per tick on a single entity.

Anything above these limits is cancelled.

Problem

A skill can apply an unbounded number of effects in one tick. A recursive skill, or a wide skill with many targets, can queue thousands of potion mechanics. The main thread then spends its time in the potion application path.

Nothing warns the server owner. No warning names the skill, so the only symptom is lag or a freeze.

Blocking it from outside is imprecise. Our limit only sees the Bukkit event. It cannot tell which skill caused the flood, and it may cancel legitimate effects during the same tick.

Taiyoucommented

Problem A skill can apply an unbounded number of effects in one tick. A recursive skill, or a wide skill with many targets, can queue thousands of potion mechanics. The main thread then spends its time in the potion application path.

thats YOU to control it with proper skill config.

Sign in to join the discussion.