I’m running Jetty with a Jersey 2.13 RESTful webapp and I’m getting this error. The error happens when I run an automated client that calls a bunch of REST endpoints. The CPU spikes to 100% and remains there until I kill the Jetty process. The error does not happen with the current stable release 9.2.3.v20140905
09:15:35.460 [qtp356473385-19-selector-ServerConnectorManager@92cba81/0] WARN org.eclipse.jetty.io.SelectorManager - Could not process key for channel java.nio.channels.SocketChannel[connected local=/127.0.0.1:8085 remote=/127.0.0.1:50561]
java.lang.IllegalStateException: Invalid state: SELECTING
at org.eclipse.jetty.io.SelectChannelEndPoint.onSelected(SelectChannelEndPoint.java:110) ~[jetty-io-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.io.SelectorManager$ManagedSelector.processKey(SelectorManager.java:682) [jetty-io-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:642) [jetty-io-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:580) [jetty-io-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.util.thread.NonBlockingThread.run(NonBlockingThread.java:52) [jetty-util-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610) [jetty-util-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539) [jetty-util-9.3.0.M0.jar:9.3.0.M0]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_05]
09:15:36.043 [qtp356473385-15-selector-ServerConnectorManager@92cba81/1] WARN org.eclipse.jetty.io.SelectorManager - Could not process key for channel java.nio.channels.SocketChannel[connected local=/127.0.0.1:8085 remote=/127.0.0.1:50566]
java.lang.IllegalStateException: Invalid state: CHANGING
at org.eclipse.jetty.io.SelectChannelEndPoint.onSelected(SelectChannelEndPoint.java:110) ~[jetty-io-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.io.SelectorManager$ManagedSelector.processKey(SelectorManager.java:682) [jetty-io-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:642) [jetty-io-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:580) [jetty-io-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.util.thread.NonBlockingThread.run(NonBlockingThread.java:52) [jetty-util-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610) [jetty-util-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539) [jetty-util-9.3.0.M0.jar:9.3.0.M0]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_05]
09:15:49.603 [qtp356473385-15-selector-ServerConnectorManager@92cba81/1] WARN org.eclipse.jetty.io.SelectorManager - Could not process key for channel java.nio.channels.SocketChannel[connected local=/127.0.0.1:8085 remote=/127.0.0.1:50570]
java.lang.IllegalStateException: Invalid state: SELECTING
at org.eclipse.jetty.io.SelectChannelEndPoint.onSelected(SelectChannelEndPoint.java:110) ~[jetty-io-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.io.SelectorManager$ManagedSelector.processKey(SelectorManager.java:682) [jetty-io-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:642) [jetty-io-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:580) [jetty-io-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.util.thread.NonBlockingThread.run(NonBlockingThread.java:52) [jetty-util-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610) [jetty-util-9.3.0.M0.jar:9.3.0.M0]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539) [jetty-util-9.3.0.M0.jar:9.3.0.M0]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_05]