Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6269

Scheduler does not clear canceled tasks. Accumulating tasks makes the server crash.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Major
    • None
    • None
    • Implementing API version 1.16.4-R0.1-SNAPSHOT
    • Yes

    Description

      It may seem all normal but every like 4 hours the tasks begin to create spikes in the CPU ugase, to slowly make the server crash, and I must restart the server.

      The CPU usage spikes keep increasing frequency and amplitute until the server is completely uncontrollable. I exclude my programming error, because I troubleshooted every line of my code, and put every piece of code between try catch(Exception) to print any uncaught exception, but nothing shows up.

      Furthermore, i noticed by printing all tasks ids that tasks id are not recycled and they keep going on increasing until they reach the Java int limit. At around that time the server begins to crash.

       

      I feel like there's something wrong with bukkit scheduler. Maybe it doesn't shut down canceled tasks properly and they remain in RAM memory.

      Then, whi would the scheduler not recycle the taskID properly? Why I cannot restart a canceled BukkitTask? Is that a wanted thing or an issue?

       

       

      This is an example of taskIDs after a few hours of running. You can see also the server begin to slowly lose performance. We print the tasks just of our plugin.

      Attachments

        Activity

          People

            Unassigned Unassigned
            RADQnico Nicolò Scialpi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: