Michael,
On 1/20/25 3:44 PM, Michael wrote:
On Fri, Jan 17, 2025 at 7:45 PM Michael <eftern...@gmail.com> wrote:
On Fri, Jan 17, 2025 at 3:51 PM Chuck Caldarale <n82...@gmail.com> wrote:
In various logs from nightly(?) Tomcat test runs, I've been able to
find a similar problem. See this, for instance:
https://nightlies.apache.org/tomcat/tomcat-10.1.x/logs/1309/TEST-org.apache.coyote.http2.TestAsyncError.NIO.txt
I believe that the test referred to above intentionally causes the error.
Okay, that sounds plausible.
It surprises me, though, that it's okay to provoke a NPE from the
application code, but again, I'm no expert in this :-)
Also, it seems that the error is sporadic in this log and logs from other tests.
I looked up some of the other tests where this happens. A recent
example (from a 10.1.35-dev version) is this one:
07-Jan-2025 12:30:28.836 INFO [testBug54928]
org.apache.catalina.connector.TestCoyoteAdapter$AsyncServlet$1.run
Exception caught java.lang.NullPointerException: Cannot invoke
"org.apache.catalina.connector.OutputBuffer.setErrorException(java.lang.Exception)"
because "this.ob" is null
from
https://nightlies.apache.org/tomcat/tomcat-10.1.x/logs/1564/TEST-org.apache.catalina.connector.TestCoyoteAdapter.NIO.txt
That test seems to run into the problem quite often.
Would it be helpful if I tried to find out how to run those tests so I
could start investigating how this.ob becomes null when inside
this.ob.flush()? Or should I just be prepared for NPEs?
Running the unit tests is fairly easy.
Download the source package. You will need Apache ant available but
everything else will be downloaded on-demand by the build script.
$ ant deploy
Gets you a working local Tomcat build based upon that source.
$ ant test
Runs the entire set of test suites. If you wan to run only a single test:
$ ant -Dtest.entry=org.apache.whatever.Test test
This sounds suspiciously like the application is keeping references to requests
or responses that have already been committed and recycled.
If so, I can only imagine that this is in that of our applications
that does async processing. Can I turn on some debugging to see if
this is the case?
Yes, but you are likely to get a huge amount of output. I wouldn't
recommend this in production.
https://tomcat.apache.org/tomcat-10.1-doc/logging.html
It's a relatively short read but will help you configure your loggers to
get information out of Tomcat. The hard part is knowing which loggers to
enable... but I suspect you can see which loggers would be interesting
given the code/classes you've already been looking at.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org