I was testing a fairly standard configuration of Soma
0.80-1 using the 'ab' (ApacheBench, v1.3c-44) tool
distributed with Apache. I ran this:
ab -n 2000 -c 32 http://192.168.40.5:8080/style.css
And the following was printed to the console by Soma:
java.lang.NullPointerException
at
com.auntfloyd.WebServer.ResponseThread.handle(ResponseThread.java(Compiled
Code))
at
com.auntfloyd.WebServer.ResponseThread.run(ResponseThread.java:46)
java.lang.NullPointerException
at
com.auntfloyd.WebServer.ResponseThread.handle(ResponseThread.java(Compiled
Code))
at
com.auntfloyd.WebServer.ResponseThread.run(ResponseThread.java(Compiled
Code))
java.lang.NullPointerException
at
com.auntfloyd.WebServer.ResponseThread.handle(ResponseThread.java(Compiled
Code))
at
com.auntfloyd.WebServer.ResponseThread.run(ResponseThread.java(Compiled
Code))
java.lang.NullPointerException
at
com.auntfloyd.WebServer.ResponseThread.handle(ResponseThread.java(Compiled
Code))
at
com.auntfloyd.WebServer.ResponseThread.run(ResponseThread.java(Compiled
Code))
java.lang.NullPointerException
at
com.auntfloyd.WebServer.ResponseThread.handle(ResponseThread.java(Compiled
Code))
at
com.auntfloyd.WebServer.ResponseThread.run(ResponseThread.java(Compiled
Code))
(I ran 'ab' several times -- each run of ab generated 1
error, IIRC).
Other than the error messages, Soma seemed to handle
the connection properly.
Patched version of Soma 0.80.1's ResponseThread.java
Logged In: YES
user_id=18424
The offending line was #59 in ResponseThread.java
After running the same benchmark, it seems that the problem
occurs at the end of the test run, when Soma reads a null
from the input stream, rather than a String like it
expects. This appears to be a problem which has only
occured with the `ab' program so far.
Attached to this bug report is a patched version of
ResponseThread.java for Soma 0.80.1 which corrects this
error. This problem has also been fixed in the current
development version.