You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/03/10 08:35:47 UTC

[Bug 56239] New: NullPointerException when finishing response under the Linux traffic control

https://issues.apache.org/bugzilla/show_bug.cgi?id=56239

            Bug ID: 56239
           Summary: NullPointerException when finishing response under the
                    Linux traffic control
           Product: Tomcat 7
           Version: 7.0.39
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Connectors
          Assignee: dev@tomcat.apache.org
          Reporter: liushangkun520@hotmail.com

hi, when i using apache benchmark to test my tomcat instance, i got a
NullPointerException 

this is stacktrace:

[2013-12-21 19:47:00][ERROR] [http-nio-5000-exec-6]2013-12-21 19:47:00:
org.apache.coyote.http11.AbstractHttp11Processor.endRequest Error finishing
response
 java.lang.NullPointerException
        at
org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:210)
        at
org.apache.coyote.http11.InternalNioOutputBuffer.commit(InternalNioOutputBuffer.java:202)
        at
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:765)
        at org.apache.coyote.Response.action(Response.java:171)
        at
org.apache.coyote.http11.AbstractOutputBuffer.endRequest(AbstractOutputBuffer.java:302)
        at
org.apache.coyote.http11.InternalNioOutputBuffer.endRequest(InternalNioOutputBuffer.java:120)
        at
org.apache.coyote.http11.AbstractHttp11Processor.endRequest(AbstractHttp11Processor.java:1660)
        at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1053)
        at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)

[2013-12-21 19:46:58][ERROR] [http-nio-5000-exec-5]2013-12-21 19:46:58:
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process Error
reading request, ignored
 java.lang.NullPointerException
        at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.release(Http11NioProtocol.java:221)
        at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:616)
        at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)

I am using "org.apache.coyote.http11.Http11NioProtocol" in server.xml like
this:
<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
... />

I have already test 2 cases: 
1) without Linux Traffic Control, my testcase was very ok!
2) when i using linux tc to control the output network traffic. and tomcat gave
me a NullPointerException above. that the tomcat instance still at running
state,(some requests has failed)
I test many times with tc, NullPointerException almost has been happened 
I was changed tomcat version at 7.0.52 with the same problem
I have seen 7.0.39-7.0.52's changelog, and find nothing with something like
this Exception. 

so please help ..

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56239] NullPointerException when finishing response under the Linux traffic control

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56239

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56239] NullPointerException when finishing response under the Linux traffic control

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56239

--- Comment #8 from Mark Thomas <ma...@apache.org> ---
(In reply to Mark Thomas from comment #7)
> It is not immediately obvious that this is the same issue so yes, please
> create a new bugzilla issue and provide the necessary information to enable
> this to be reproduced.

Ignore this comment. Wrong bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56239] NullPointerException when finishing response under the Linux traffic control

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56239

--- Comment #5 from Lsk <li...@hotmail.com> ---
Well, I have fixed the second problme that you say (switch tomcat version to
last_release_stable) and everything is okay ...


i have been look around the all tomcat's changelog from 7.0.39 to 7.0.52 at
this page: http://tomcat.apache.org/tomcat-7.0-doc/changelog.html  
but found nothing about with "NIO Connector maybe thrown a NullPointerException
in some case" 

what is the difference between this two version 7.0.39-7.0.52 ?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56239] NullPointerException when finishing response under the Linux traffic control

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56239

--- Comment #7 from Mark Thomas <ma...@apache.org> ---
It is not immediately obvious that this is the same issue so yes, please create
a new bugzilla issue and provide the necessary information to enable this to be
reproduced.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56239] NullPointerException when finishing response under the Linux traffic control

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56239

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
No information on the configuration of traffic control.

No information on the load test being performed.

No information in the application being tested.

In short, no way anyone investigating this bug could possibly begin to try and
reproduce it.

Please provide the above information and the errors (with stack traces)
obtained when running on the latest stable 7.0.x release.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56239] NullPointerException when finishing response under the Linux traffic control

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56239

--- Comment #3 from Lsk <li...@hotmail.com> ---
hi Thomas, 

here is my tc configuration: 

[root@aceZtomcatZ59099c87Ze182Z4f13Z ~]# tc qdisc show dev eth1: 
qdisc htb 1: root refcnt 2 r2q 10 default 10 direct_packets_stat 0

[root@aceZtomcatZ59099c87Ze182Z4f13Z ~]# tc class show dev eth1
class htb 1:505 parent 1:1 prio 0 rate 3146Kbit ceil 94372Kbit burst 1599b
cburst 1580b 
class htb 1:10 parent 1:1 prio 0 rate 10486Kbit ceil 94372Kbit burst 1597b
cburst 1580b 
class htb 1:504 parent 1:1 prio 0 rate 3146Kbit ceil 94372Kbit burst 1599b
cburst 1580b 
class htb 1:507 parent 1:1 prio 0 rate 3146Kbit ceil 94372Kbit burst 1599b
cburst 1580b 
class htb 1:506 parent 1:1 prio 0 rate 3146Kbit ceil 94372Kbit burst 1599b
cburst 1580b 
class htb 1:500 parent 1:1 prio 0 rate 3146Kbit ceil 94372Kbit burst 1599b
cburst 1580b 
class htb 1:503 parent 1:1 prio 0 rate 3146Kbit ceil 94372Kbit burst 1599b
cburst 1580b 
class htb 1:502 parent 1:1 prio 0 rate 3146Kbit ceil 94372Kbit burst 1599b
cburst 1580b 
class htb 1:509 parent 1:1 prio 0 rate 3146Kbit ceil 94372Kbit burst 1599b
cburst 1580b 
class htb 1:508 parent 1:1 prio 0 rate 3146Kbit ceil 94372Kbit burst 1599b
cburst 1580b 
class htb 1:1 root rate 104858Kbit ceil 104858Kbit burst 1585b cburst 1585b 
class htb 1:510 parent 1:1 prio 0 rate 3146Kbit ceil 94372Kbit burst 1599b
cburst 1580b 
class htb 1:511 parent 1:1 prio 0 rate 3146Kbit ceil 94372Kbit burst 1599b
cburst 1580b 

I am running tomcat under "admin" account, uid is 500

[root@aceZtomcatZ59099c87Ze182Z4f13Z ~]# id -u admin
500

Performance Test command, on another machine :
[root@aceZtestZ607c2b5bZ0bcbZ4768ZbZ ~]# ab -c 100 -n 50000
http://121.199.24.74:9527/tmall.com_files/T1oKF9Fo8gXXcR3qY4-200-320.png_q90.jpg
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 121.199.24.74 (be patient)
apr_socket_recv: Connection reset by peer (104)
Total of 3031 requests completed


the attarchment is stacktrace info.

thanks a lot !

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56239] NullPointerException when finishing response under the Linux traffic control

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56239

--- Comment #4 from Mark Thomas <ma...@apache.org> ---
1. Fix your broken web application - you should not be bundling multiple
versions of the Servlet API in your web application.

2. Please provide a stack trace from the latest stable 7.0.x release. 7.0.39 in
not the latest stable 7.0.x release.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56239] NullPointerException when finishing response under the Linux traffic control

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56239

--- Comment #9 from Lsk <li...@hotmail.com> ---
(In reply to Mark Thomas from comment #6)
> In the original description you stated that you changed Tomcat version to
> 7.0.52 and still observed the same problem.
> 
> In comment #5 you stated that you could not reproduce the problem when using
> 7.0.52.
> 
> Which of those statement is correct?

I mean i changed tomcat version to 7.0.52 then, NullPointerException has gone
..
and my testcases was right..

but i don't understand what is the difference between 7.0.39 and 7.0.52 ?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56239] NullPointerException when finishing response under the Linux traffic control

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56239

--- Comment #2 from Lsk <li...@hotmail.com> ---
Created attachment 31380
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31380&action=edit
stacktrace

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56239] NullPointerException when finishing response under the Linux traffic control

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56239

--- Comment #6 from Mark Thomas <ma...@apache.org> ---
In the original description you stated that you changed Tomcat version to
7.0.52 and still observed the same problem.

In comment #5 you stated that you could not reproduce the problem when using
7.0.52.

Which of those statement is correct?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 56239] NullPointerException when finishing response under the Linux traffic control

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56239

--- Comment #10 from Christopher Schultz <ch...@christopherschultz.net> ---
You can read the changelog (as you have done) or you can view diffs in
Subversion. Nobody is going to hunt-down the exact patch that fixes this
particular issue for you.

As for the changelog, search for anything NIO-related. A lot of things have
been modified in the connectors recently to make them more similar to each
other and easier to maintain. It's possible that your edge-case was removed as
a part of that effort, and so it doesn't appear as a particular bugfix, etc.

If you really want to track down exactly what fixed it, start with 7.0.40 and
keep upgrading until you hit a release that does not reproduce the problem.
Then you can look at diffs.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org