Uploaded image for project: 'Bedrock Dedicated Server'
  1. Bedrock Dedicated Server
  2. BDS-17527

Multiple server crashes due to memory leak when loading chunks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.20.30
    • 1.19.20, 1.19.21 Hotfix, 1.19.30, 1.19.31 Hotfix, 1.19.41, 1.19.63, 1.20.12 Hotfix
    • OS = Debian GNU/Linux 10 (Buster)
      Kernel = Linux 4.19.0-13-cloud-amd64
      Server hosted on a 3rd-party VPS
    • Community Consensus
    • 881031

      Server is running mostly default survival settings except for simulation distance of 6 and chunk render distance of 32. Has been stable for the past year without issue until around 1 month ago. At first we believed the crashes to be caused by entering portals too quickly (going from nether to overworld, then overworld to end portal fast) since some of the crashes were occurring under those conditions, but we have also been getting crashes throughout normal gameplay, when performing normal actions such as placing blocks or even walking around. The crashes occur in multiple areas, overworld, nether, and end. There doesn't seem to be a specific chunk or groups of chunks causing this since the same areas may be fine one moment, then crash at another. As of now the server will crash at least 4-5 times a day if people are active. Checking memory usage showed a steady usage of around 700MB our of the 3GB allocated, so there doesn't seem to be any issue there.

      Made the bug public and removed the world file since I confirmed the memory leak occurs with a fresh world. Also adding some extra info from my comments below:

      After further testing this seems to be a memory leak related to chunk loading. If you check the memory while standing still, not loading chunks, it should be stable. When you load chunks, whether it's via crossing portals, flying, etc. the memory use increases and not come back down, which it should not be doing. Running farms while standing still did not affect the memory usage for us. Passive mob farms, redstone mechanisms, etc. did not contribute to the memory leak. Here's a log of our memory use up until the server crashed again.

      Crash reports are fairly limited in information, but here are some of them attached below.

        1. TRS.2022.08.27.17.25.05.log
          4 kB
          MaladjustedPlatypus
        2. TRS.2022.08.27.04.00.42.log
          10 kB
          MaladjustedPlatypus
        3. TRS.2022.08.26.17.05.38.log
          3 kB
          MaladjustedPlatypus
        4. TRS.2022.08.25.04.00.41.log
          19 kB
          MaladjustedPlatypus
        5. TRS.2022.08.24.14.51.04.log
          5 kB
          MaladjustedPlatypus
        6. TRS.2022.08.24.09.55.26.log
          5 kB
          MaladjustedPlatypus
        7. TRS.2022.08.23.20.17.37.log
          4 kB
          MaladjustedPlatypus
        8. syrupy_20220827204110.ps.log
          564 kB
          MaladjustedPlatypus
        9. Server Files.PNG
          95 kB
          MaladjustedPlatypus
        10. server-1.properties
          0.9 kB
          Paul Bramhall
        11. server.properties
          5 kB
          MaladjustedPlatypus
        12. Server_RAM.PNG
          29 kB
          timmyc1983
        13. server_log.txt
          3 kB
          Paul Bramhall
        14. Screenshot_20230510_165647_Chrome.jpg
          548 kB
          Matthew Dietrich
        15. RamGraph3.PNG
          123 kB
          Foxy No-Tail
        16. RamGraph2.PNG
          164 kB
          Foxy No-Tail
        17. RamGraph.PNG
          96 kB
          Foxy No-Tail
        18. pidstat.txt
          63 kB
          Paul Bramhall
        19. image-2022-09-09-07-30-54-970.png
          36 kB
          NavDaz76
        20. image-2022-09-07-09-50-29-828.png
          43 kB
          NavDaz76
        21. heap.dump.gz.partac
          2.28 MB
          Paul Bramhall
        22. heap.dump.gz.partab
          10.00 MB
          Paul Bramhall
        23. heap.dump.gz.partaa
          10.00 MB
          Paul Bramhall
        24. bds-smaps-userloggedin.txt
          192 kB
          Paul Bramhall
        25. bds-smaps-launched.txt
          187 kB
          Paul Bramhall
        26. bds-smaps-15teleportevents.txt
          195 kB
          Paul Bramhall

            Unassigned Unassigned
            Mistahtokyo MaladjustedPlatypus
            Votes:
            83 Vote for this issue
            Watchers:
            44 Start watching this issue

              Created:
              Updated:
              Resolved: