XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 19w34a
    • Minecraft 1.8.1, Minecraft 1.8.8, Minecraft 15w44b, Minecraft 1.8.9, Minecraft 15w51b, Minecraft 1.9 Pre-Release 3, Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.9.2, Minecraft 1.9.4, Minecraft 16w21b, Minecraft 1.10.2, Minecraft 16w40a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 1.12 Pre-Release 7, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 18w03b, Minecraft 1.13-pre1, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a
    • Confirmed
    • (Unassigned)

      The bug

      Under certain circumstances chunks can swap or reset.

      As suggested by HeegeMcGee Minecraft should handle IOExceptions in a saner way and not just log them and carry on.

      Known reasons

      Full disk

      It is confirmed that this bug happens when no free memory on the disk is left.

      1.12.2
      [16:40:12] [File IO Thread/ERROR]: Failed to save chunk
      java.lang.NullPointerException: null
      [16:40:12] [File IO Thread/INFO]: [STDERR]: java.io.IOException: Es steht nicht genug Speicherplatz auf dem Datenträger zur Verfügung
      [16:40:12] [File IO Thread/INFO]: [STDERR]: 	at java.io.RandomAccessFile.writeBytes(Native Method)
      [16:40:12] [File IO Thread/INFO]: [STDERR]: 	at java.io.RandomAccessFile.write(Unknown Source)
      [16:40:12] [File IO Thread/INFO]: [STDERR]: 	at ayj.a(SourceFile:306)
      [16:40:12] [File IO Thread/INFO]: [STDERR]: 	at ayj$a.close(SourceFile:244)
      [16:40:12] [File IO Thread/INFO]: [STDERR]: 	at java.util.zip.DeflaterOutputStream.close(Unknown Source)
      [16:40:12] [File IO Thread/INFO]: [STDERR]: 	at java.io.FilterOutputStream.close(Unknown Source)
      [16:40:12] [File IO Thread/INFO]: [STDERR]: 	at java.io.FilterOutputStream.close(Unknown Source)
      [16:40:12] [File IO Thread/INFO]: [STDERR]: 	at aye.b(SourceFile:160)
      [16:40:12] [File IO Thread/INFO]: [STDERR]: 	at aye.a(SourceFile:145)
      [16:40:12] [File IO Thread/INFO]: [STDERR]: 	at bgx.c(SourceFile:37)
      [16:40:12] [File IO Thread/INFO]: [STDERR]: 	at bgx.run(SourceFile:30)
      [16:40:12] [File IO Thread/INFO]: [STDERR]: 	at java.lang.Thread.run(Unknown Source)
      

      "Es steht nicht genug Speicherplatz auf dem Datenträger zur Verfügung" (German) should be equivalent to the American English "There is not enough space on the disk".
      This shows that the exception message is an OS error message and therefore OS dependent and translated. See also this stackoverflow question and this (currently unresolved) JDK bug report from 2001 requesting a separate exception for a full disk.

      This stackoverflow question suggests that you might not even be able to directly detect a full disk, and calling getFD().sync() could decrease performance. However, it appears currently the call to FilterOutputStream#close causes the exception.

      The question is if at that point the save files could have already been corrupted. Additionally a full disk can cause all kind of other problems, like for example the logger being unable to create log files.

      How to reproduce

      Windows
      1. Use for example this guide to create a VHD and create a volume with a size of 10MB
      2. Add a new profile using this volume as game directory
      3. Create a new default world with gamemode Creative and fly around
      Linux

      See this comment (not checked)

      Malfunctioning disk (?)

      Hard to reproduce and likely difficult to detect.

      In case an IOException happens possibly log the error and try shutting down the server?

        1. crash-2017-01-15_17.46.31-client.txt
          9 kB
          Johnny Gates
        2. 2016-10-13_09.24.21.png
          1.10 MB
          Jeffrey King
        3. 2016-03-22_12.01.55.png
          590 kB
          Sondre Grimsmo Sinnes
        4. 2014-11-26_10.07.50.png
          2.36 MB
          Declan Sullivan
        5. 2014-11-26_10.07.44.png
          2.61 MB
          Declan Sullivan

            Unassigned Unassigned
            declansu Declan Sullivan
            Votes:
            44 Vote for this issue
            Watchers:
            31 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: