Bug 64149 - NullPointerException in AbstractAccessLogValve
Summary: NullPointerException in AbstractAccessLogValve
Alias: None
Product: Tomcat 9
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 9.0.31
Hardware: PC Linux
: P2 regression (vote)
Target Milestone: -----
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2020-02-17 14:03 UTC by Roland Wachinger
Modified: 2020-03-25 08:08 UTC (History)
0 users

our server.xml (8.19 KB, text/xml)
2020-03-24 11:22 UTC, Roland Wachinger

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Wachinger 2020-02-17 14:03:57 UTC

we have a regression with version 9.0.31, it worked before with 9.0.30.

Cause seems to be this commit: https://github.com/apache/tomcat/commit/fdcb3656239065654909ca55994787c027dbe583#diff-dc73b9f0609a4d3593f8a1f789ac1496

17-Feb-2020 09:45:56.925 SCHWERWIEGEND [catalina-exec-5] org.apache.coyote.http11.Http11Processor.service Fehler bei der Verarbeitung der Anfrage
		at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:685)
		at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
		at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639)
		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

Kind regards,
Comment 1 Remy Maucherat 2020-02-17 14:14:06 UTC
Please post the configuration.
Comment 2 Roland Wachinger 2020-02-17 15:07:59 UTC
Sorry, can't help you with that atm as I don't have access. I'll see what I can get.

Aside from that, I suppose a null check won't hurt?
Comment 3 Mark Thomas 2020-02-17 15:36:05 UTC
We need to find out why the NPE is occurring first. We don't want to mask a symptom of a bug elsewhere. Better to see the NPE so we know there is a problem. Hence the request for more info so we can figure out what is going on.
Comment 4 Roland Wachinger 2020-03-24 11:22:12 UTC
Created attachment 37118 [details]
our server.xml

I attached the server.xml. I think the problem here is one of the valves in the end. This used to work in 9.0.30.
We also switched the handler to rotatable = false in the logging config, aside from that it is all defaults.

The problem still persists in 9.0.33
Comment 5 Remy Maucherat 2020-03-24 15:40:31 UTC
Ok, I can reproduce and will fix this "issue".
Comment 6 Remy Maucherat 2020-03-24 15:57:44 UTC
There was a NPE when no pattern is specified. In that case, the valve does nothing so remove it.
The fix will be in 10.0.0-M4, 9.0.34 and 8.5.54.
Comment 7 Roland Wachinger 2020-03-25 08:08:21 UTC
Aweseome :) Thank you very much