Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException in WsCloseFilter$1.operationComplete #687

Open
cmebarrow opened this issue Aug 25, 2016 · 6 comments
Open

NullPointerException in WsCloseFilter$1.operationComplete #687

cmebarrow opened this issue Aug 25, 2016 · 6 comments
Labels
bug p1 triage Needs to be triaged

Comments

@cmebarrow
Copy link
Contributor

cmebarrow commented Aug 25, 2016

The following extract from the log files for support ticket 3240 shows a NullPointerException in WsCloseFilter occurring immediately after writing a WS_CLOSE frame in response to a received one. This was using Enterprise Gateway release 5.0.2-RC003 (which uses Gateway version 5.1.1).

2016-08-19 15:24:58,640 transport.tcp.accept [New I/O worker #3] INFO  [tcp#119775 126.246.166.113:61228] CLOSED: (#00119775: kaazing niosocketchannel, server, /126.246.166.113:61228 => /126.246.166.103:1080)
2016-08-19 15:24:58,639 org.apache.mina.util.DefaultExceptionMonitor [New I/O worker #1] WARN  Unexpected exception.
java.lang.NullPointerException
    at org.kaazing.gateway.transport.wsn.WsCloseFilter$1.operationComplete(WsCloseFilter.java:187)
    at org.kaazing.gateway.transport.wsn.WsCloseFilter$1.operationComplete(WsCloseFilter.java:169)
    at org.kaazing.mina.core.future.DefaultIoFutureEx.notifyListener(DefaultIoFutureEx.java:423)
    at org.kaazing.mina.core.future.DefaultIoFutureEx.notifyListeners(DefaultIoFutureEx.java:411)
    at org.kaazing.mina.core.future.DefaultIoFutureEx.setValue(DefaultIoFutureEx.java:327)
    at org.kaazing.mina.core.future.DefaultWriteFutureEx.setWritten(DefaultWriteFutureEx.java:89)
    at org.kaazing.mina.netty.ChannelWriteFutureListener.setFutureWritten(ChannelWriteFutureListener.java:51)
    at org.kaazing.mina.netty.ChannelWriteFutureListener.operationComplete(ChannelWriteFutureListener.java:41)
...
    at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:143)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:144)
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:348)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:120)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:243)
    at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
    at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

The NPE happens because WsnSession wsnSession = SESSION_KEY.get(session) returns null. The relevant code from Gateway 5.1.1 is WsCloseFilter.java.
Here is one of the gateway log files containing this exception:

error.log.txt

@cmebarrow
Copy link
Contributor Author

Related bug: #685

@cmebarrow cmebarrow self-assigned this Aug 25, 2016
@cmebarrow cmebarrow modified the milestones: S17 - 16, S18 - 16 Aug 25, 2016
@sbadugu sbadugu modified the milestones: S19 - 16, S18 - 16 Sep 13, 2016
@cmebarrow
Copy link
Contributor Author

The error.log file in 112_ES.zip from support ticket 4404 contains the same exception stack, showing this bug is also present in 5.1.4-RC005. Here's a copy:

error.log.txt

@sbadugu sbadugu modified the milestones: S22 - 16, S19 - 16 Oct 31, 2016
@sbadugu sbadugu added the bug label Nov 4, 2016
@cmebarrow cmebarrow modified the milestones: S23 - 16, S22 - 16 Nov 15, 2016
@sbadugu sbadugu removed this from the S23 - 16 milestone Nov 16, 2016
@sbadugu sbadugu added the p1 label Nov 16, 2016
@sbadugu
Copy link
Contributor

sbadugu commented Jan 21, 2017

@cmebarrow Does the related bug #685 fix this issue too ? I am just confirming so that someone doesn't spend time on this issue, if it is already fixed.

@cmebarrow
Copy link
Contributor Author

@sbadugu No, #685 does not fix this issue.

@StCostea
Copy link
Contributor

I am not able to reproduce this exception. I have tried to kill the client process or to disable the network interface. Currently I'm trying to throw the error myself from the code. So far, I did not succeed.

Do you have any suggestion on how to reproduce it ?

@sbadugu
Copy link
Contributor

sbadugu commented Feb 1, 2017

@StCostea Please move on to the other tickets, if you can't reproduce it.

@robinzimmermann robinzimmermann added the triage Needs to be triaged label Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug p1 triage Needs to be triaged
Projects
None yet
Development

No branches or pull requests

4 participants