Bug 59876 - java.io.EOFException is thrown
Summary: java.io.EOFException is thrown
Status: RESOLVED INVALID
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: WebSocket (show other bugs)
Version: 8.0.36
Hardware: PC Linux
: P2 regression (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-17 16:08 UTC by Pavel
Modified: 2016-11-02 09:30 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel 2016-07-17 16:08:12 UTC
After upgrading from 8.0.22 my server started to throw the following exception:

17.07.2016 15:36:55 [ERROR]: sessionId 15. java.io.EOFException
    org.apache.coyote.http11.upgrade.NioServletInputStream.doRead(NioServletInputStream.java:97)
    org.apache.coyote.http11.upgrade.AbstractServletInputStream.read(AbstractServletInputStream.java:124)
    org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:60)
    org.apache.tomcat.websocket.server.WsHttpUpgradeHandler$WsReadListener.onDataAvailable(WsHttpUpgradeHandler.java:185)
    org.apache.coyote.http11.upgrade.AbstractServletInputStream.onDataAvailable(AbstractServletInputStream.java:198)
    org.apache.coyote.http11.upgrade.AbstractProcessor.upgradeDispatch(AbstractProcessor.java:96)
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:647)
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    java.lang.Thread.run(Thread.java:745)

There are many such exceptions in my log file. 8.0.22 worked well
Comment 1 Remy Maucherat 2016-07-18 08:24:20 UTC
You should probably investigate on the user list, and provide a simple test case.
Comment 2 remi.lebastard 2016-10-06 08:29:45 UTC
I have the same problem with the stack trace : 
ERROR org.atmosphere.container.JSR356Endpoint -java.io.EOFException
        at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1222) ~[tomcat-coyote.jar:8.5.3]
        at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.isReadyForRead(NioEndpoint.java:1128) ~[tomcat-coyote.jar:8.5.3]
        at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:58) ~[tomcat-websocket.jar:8.5.3]
        at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148) [tomcat-websocket.jar:8.5.3]
        at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54) [tomcat-coyote.jar:8.5.3]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53) [tomcat-coyote.jar:8.5.3]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785) [tomcat-coyote.jar:8.5.3]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425) [tomcat-coyote.jar:8.5.3]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) [tomcat-coyote.jar:8.5.3]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_91]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_91]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.3]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]

The class have changed due to tomcat development (I'm on a 8.5.3 version) but I think it's the same bug.
The issue seems to appear only on linux environment.
I will investigate and put a test case as soon as I have a moment for that because it's tricky to reproduce!
Comment 3 Remy Maucherat 2016-10-06 08:55:51 UTC
Ok, but this needs to be a bug. IO exceptions will happen once in a while, this is normal. You don't see them with the regular request processing however as they are detected and filtered out, but in upgrade mode this is not there (at least for now), that's the main difference.
Comment 4 Mark Thomas 2016-11-02 09:30:01 UTC
As per Remy's comment. I/O exceptions are normal and there is nothing here to indicate a bug. The users list is the place to follow this up.

This can always be re-opened if information becomes available that points to a bug.