Bug 52208 - NullPointerException in tribes.transport.nio.NioReceiver.listen() in test run
NullPointerException in tribes.transport.nio.NioReceiver.listen() in test run
Product: Tomcat 7
Classification: Unclassified
Component: Cluster
PC Windows XP
: P2 minor (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2011-11-18 10:37 UTC by Konstantin Kolinko
Modified: 2011-12-08 20:57 UTC (History)
0 users

TEST-org.apache.catalina.tribes.group.interceptors.TestOrderInterceptor.BIO.txt (36.54 KB, text/plain)
2011-11-18 10:37 UTC, Konstantin Kolinko

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Kolinko 2011-11-18 10:37:32 UTC
Created attachment 27968 [details]

Running tests for 7.0.23 release candidate I noted that there was a NullPointerException in one of tribes tests:


18.11.2011 9:27:56 org.apache.catalina.tribes.transport.nio.NioReceiver listen
SEVERE: Unable to process request in NioReceiver
	at org.apache.catalina.tribes.transport.nio.NioReceiver.listen(NioReceiver.java:274)
	at org.apache.catalina.tribes.transport.nio.NioReceiver.run(NioReceiver.java:414)
	at java.lang.Thread.run(Thread.java:662)
------------- ---------------- ---------------

The test case did not fail, so it likely occurred during tearDown.

The line in source code is

268        while (doListen() && selector != null) {
272                events();
273                socketTimeouts();
274                int n = selector.select(getSelectorTimeout());

It is likely that selector field referenced on line 274 became null because of NioReceiver#stopListening() call.

This issue was not observed on reruns.

I am attaching complete log file from this test.
Comment 1 Mark Thomas 2011-12-08 20:57:34 UTC
This has been fixed in trunk and 7.0.x and will be included in 7.0.24 onwards.