Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-118733

Netty causing all players are kicked and prevented from join again

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 1.12
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Linux Ubuntu 16.04 LTS w/ 2-core 6GB ram vps
      Oracle Java 8 131

    • Confirmation Status:
      Unconfirmed

      Description

      (I know I'm running a third party modified server, but it has been confirmed that it's not a Spigot or Bungee/Waterfall issue. And the netty library is directly from the official server software.)

      Spigot suddenly throw this exception while running normally:

      [10:02:13] [Netty Server IO #0/WARN]: Selector.select() returned prematurely 512 times in a row; rebuilding Selector io.netty.channel.nio.SelectedSelectionKeySetSelector@13cb56f5.
      [10:02:13] [Netty Server IO #0/WARN]: Failed to re-register a Channel to the new Selector.
      java.lang.ClassCastException: io.netty.channel.nio.SelectedSelectionKeySetSelector cannot be cast to java.nio.channels.spi.AbstractSelector
      at java.nio.channels.spi.AbstractSelectableChannel.register(AbstractSelectableChannel.java:212) ~[?:1.8.0_131]
      at io.netty.channel.nio.NioEventLoop.rebuildSelector0(NioEventLoop.java:347) [spigot-survival.jar:git-Spigot-cd6ba67-a7d074c]
      at io.netty.channel.nio.NioEventLoop.rebuildSelector(NioEventLoop.java:318) [spigot-survival.jar:git-Spigot-cd6ba67-a7d074c]
      at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:769) [spigot-survival.jar:git-Spigot-cd6ba67-a7d074c]
      at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:388) [spigot-survival.jar:git-Spigot-cd6ba67-a7d074c]
      at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [spigot-survival.jar:git-Spigot-cd6ba67-a7d074c]
      at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
      [10:02:13] [Netty Server IO #0/WARN]: Failed to re-register a Channel to the new Selector.
      java.lang.ClassCastException: io.netty.channel.nio.SelectedSelectionKeySetSelector cannot be cast to java.nio.channels.spi.AbstractSelector
      at java.nio.channels.spi.AbstractSelectableChannel.register(AbstractSelectableChannel.java:212) ~[?:1.8.0_131]
      at io.netty.channel.nio.NioEventLoop.rebuildSelector0(NioEventLoop.java:347) [spigot-survival.jar:git-Spigot-cd6ba67-a7d074c]
      at io.netty.channel.nio.NioEventLoop.rebuildSelector(NioEventLoop.java:318) [spigot-survival.jar:git-Spigot-cd6ba67-a7d074c]
      at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:769) [spigot-survival.jar:git-Spigot-cd6ba67-a7d074c]
      at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:388) [spigot-survival.jar:git-Spigot-cd6ba67-a7d074c]
      at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [spigot-survival.jar:git-Spigot-cd6ba67-a7d074c]
      at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
      [10:02:13] [Netty Server IO #0/INFO]: Migrated 0 channel(s) to the new Selector.
      

      Right after that all online players are kicked out immediately:

      [10:02:13] [Server thread/INFO]: k_jiang lost connection: Disconnected
      [10:02:13] [Server thread/INFO]: k_jiang left the game
      [10:02:13] [Server thread/INFO]: Nchyns lost connection: Disconnected
      [10:02:13] [Server thread/INFO]: Nchyns left the game
      
      ......(and similar messages about other players be kicked out)
      

      Then all players are no longer be able to join the server again. No errors. This issue already happened twice today. I could only resolve this issue only by restarting the server from the console.
      No other error occur on Spigot or on the Waterfall (BungeeCord) side, no matter during server start, running or shutdown.

      Notice that the exception is generated on a spigot console. It makes the whole server unplayable. If this could not be resolved I have no choice but to downgrade my whole network back to 1.11.2.

      The issue has never been found in 1.11.2 or older. If this is the case, then I think there is a good chance that most of servers, no matter it is the official vanilla or some third party modified, were affected. Still I also tried and still continuing to nail down this issue with the pluigns I have installed as well. Hopefully I could find something in the future.

      Thank you for your consideration!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kjiang kjiang
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: