You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jo...@ventusproxy.com on 2024/12/11 08:36:00 UTC
Tomcat 10.1.34 log messages
Hello,
After migrating to Tomcat 10.1.34, I see these messages on the tomcat log.
It's not affecting our application at all, I paste them below just for your
information.
Dec 10, 2024 2:39:02 PM
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor doRun
SEVERE: Error running socket processor
java.lang.NullPointerException: Cannot invoke
"java.nio.ByteBuffer.limit(int)" because "this.byteBuffer" is null
at
org.apache.coyote.http11.Http11InputBuffer.recycle(Http11InputBuffer.java:26
2)
at
org.apache.coyote.http11.Http11Processor.recycle(Http11Processor.java:1447)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.release(AbstractProtoco
l.java:1094)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtoco
l.java:1069)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.jav
a:1741)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:
52)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecut
or.java:1190)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecu
tor.java:659)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
va:63)
at java.base/java.lang.Thread.run(Thread.java:898)
And:
Dec 10, 2024 2:57:00 PM org.apache.tomcat.util.net.NioEndpoint$Poller events
WARNING: Invalid null socket channel while processing poller event
Regards,
Joan.
Re: Tomcat 10.1.34 log messages
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Mark,
On 12/11/24 3:57 AM, Mark Thomas wrote:
> On 11/12/2024 08:36, joan.balaguero@ventusproxy.com wrote:
>> Hello,
>>
>>
>> After migrating to Tomcat 10.1.34, I see these messages on the tomcat
>> log.
>> It's not affecting our application at all, I paste them below just for
>> your
>> information.
>
> Which version did you migrate from?
>
> How often do you see these messages? Do they correlate with any
> particular (failed?) request.
>
>> Dec 10, 2024 2:39:02 PM
>> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor doRun
>>
>> SEVERE: Error running socket processor
>>
>> java.lang.NullPointerException: Cannot invoke
>> "java.nio.ByteBuffer.limit(int)" because "this.byteBuffer" is null
>
> That is odd. I wouldn't expect byteBuffer to be null at the end of a
> request.
Use-after-free(/recycle)?
>> And:
>>
>> Dec 10, 2024 2:57:00 PM org.apache.tomcat.util.net.NioEndpoint$Poller
>> events
>>
>> WARNING: Invalid null socket channel while processing poller event
>
> Another odd one. I don't immediately see how that could happen either.
>
> Any more information you can provided, particularly how to trigger
> either of these issues, would be appreciated.
This seems like something that could happen if the application were to
be holding on to references it's not supposed to be holding on to.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat 10.1.34 log messages
Posted by jo...@ventusproxy.com.
Perfect Mark, thanks.
-----Original Message-----
From: Mark Thomas <ma...@apache.org>
Sent: Thursday, December 19, 2024 5:12 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat 10.1.34 log messages
Hi Joan,
Thanks for the extra information.
I can see several legitimate ways the NPE might happen. I've added a null check to avoid any NPE in that case.
I can also see a couple of ways the warning message could appear in normal usage so I've dropped that to debug.
Both changes will be in the January releases.
Mark
On 15/12/2024 16:20, joan.balaguero@ventusproxy.com wrote:
> Hi Mark,
>
> No, I'm not using TLS but yes, I'm using async servlet with non-blocking io (read and write listeners).
>
> Thanks,
> Joan.
>
> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Sunday, December 15, 2024 3:15 PM
> To: users@tomcat.apache.org
> Subject: Re: Tomcat 10.1.34 log messages
>
> On 13/12/2024 11:00, joan.balaguero@ventusproxy.com wrote:
>> Hi Mark,
>>
>> Which version did you migrate from?
>> 10.1.30
>>
>> How often do you see these messages?
>> Hardly ever, maybe a dozen of times ... we have millions of daily
>> requests
>>
>> Do they correlate with any particular (failed?) request.
>> No
>>
>> I don't have more information, just these traces. The first trace
>> (NullPointerException) is new, the second one (Warning) was also
>> occurring in 10.1.30
>
> Thanks for the additional information.
>
> I think I might see a route for the second trace (Warning) to occur in normal usage when the connection is closed. We might need to downgrade the log level for that one. Do you use any of:
> - WebSocket
> - Servlet async
> - Servlet Non-blocking IO in your application?
>
> I've definitely found a route for the NPE to occur although it has been present for several years. Are you using TLS on this connector?
>
> Thanks,
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 10.1.34 log messages
Posted by Mark Thomas <ma...@apache.org>.
Hi Joan,
Thanks for the extra information.
I can see several legitimate ways the NPE might happen. I've added a
null check to avoid any NPE in that case.
I can also see a couple of ways the warning message could appear in
normal usage so I've dropped that to debug.
Both changes will be in the January releases.
Mark
On 15/12/2024 16:20, joan.balaguero@ventusproxy.com wrote:
> Hi Mark,
>
> No, I'm not using TLS but yes, I'm using async servlet with non-blocking io (read and write listeners).
>
> Thanks,
> Joan.
>
> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Sunday, December 15, 2024 3:15 PM
> To: users@tomcat.apache.org
> Subject: Re: Tomcat 10.1.34 log messages
>
> On 13/12/2024 11:00, joan.balaguero@ventusproxy.com wrote:
>> Hi Mark,
>>
>> Which version did you migrate from?
>> 10.1.30
>>
>> How often do you see these messages?
>> Hardly ever, maybe a dozen of times ... we have millions of daily
>> requests
>>
>> Do they correlate with any particular (failed?) request.
>> No
>>
>> I don't have more information, just these traces. The first trace
>> (NullPointerException) is new, the second one (Warning) was also
>> occurring in 10.1.30
>
> Thanks for the additional information.
>
> I think I might see a route for the second trace (Warning) to occur in normal usage when the connection is closed. We might need to downgrade the log level for that one. Do you use any of:
> - WebSocket
> - Servlet async
> - Servlet Non-blocking IO in your application?
>
> I've definitely found a route for the NPE to occur although it has been present for several years. Are you using TLS on this connector?
>
> Thanks,
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat 10.1.34 log messages
Posted by jo...@ventusproxy.com.
Hi Mark,
No, I'm not using TLS but yes, I'm using async servlet with non-blocking io (read and write listeners).
Thanks,
Joan.
-----Original Message-----
From: Mark Thomas <ma...@apache.org>
Sent: Sunday, December 15, 2024 3:15 PM
To: users@tomcat.apache.org
Subject: Re: Tomcat 10.1.34 log messages
On 13/12/2024 11:00, joan.balaguero@ventusproxy.com wrote:
> Hi Mark,
>
> Which version did you migrate from?
> 10.1.30
>
> How often do you see these messages?
> Hardly ever, maybe a dozen of times ... we have millions of daily
> requests
>
> Do they correlate with any particular (failed?) request.
> No
>
> I don't have more information, just these traces. The first trace
> (NullPointerException) is new, the second one (Warning) was also
> occurring in 10.1.30
Thanks for the additional information.
I think I might see a route for the second trace (Warning) to occur in normal usage when the connection is closed. We might need to downgrade the log level for that one. Do you use any of:
- WebSocket
- Servlet async
- Servlet Non-blocking IO in your application?
I've definitely found a route for the NPE to occur although it has been present for several years. Are you using TLS on this connector?
Thanks,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 10.1.34 log messages
Posted by Mark Thomas <ma...@apache.org>.
On 13/12/2024 11:00, joan.balaguero@ventusproxy.com wrote:
> Hi Mark,
>
> Which version did you migrate from?
> 10.1.30
>
> How often do you see these messages?
> Hardly ever, maybe a dozen of times ... we have millions of daily requests
>
> Do they correlate with any particular (failed?) request.
> No
>
> I don't have more information, just these traces. The first trace (NullPointerException) is new, the second one (Warning) was also occurring in 10.1.30
Thanks for the additional information.
I think I might see a route for the second trace (Warning) to occur in
normal usage when the connection is closed. We might need to downgrade
the log level for that one. Do you use any of:
- WebSocket
- Servlet async
- Servlet Non-blocking IO in your application?
I've definitely found a route for the NPE to occur although it has been
present for several years. Are you using TLS on this connector?
Thanks,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat 10.1.34 log messages
Posted by jo...@ventusproxy.com.
Hi Mark,
Which version did you migrate from?
10.1.30
How often do you see these messages?
Hardly ever, maybe a dozen of times ... we have millions of daily requests
Do they correlate with any particular (failed?) request.
No
I don't have more information, just these traces. The first trace (NullPointerException) is new, the second one (Warning) was also occurring in 10.1.30
Best,
Joan.
-----Original Message-----
From: Mark Thomas <ma...@apache.org>
Sent: Wednesday, December 11, 2024 9:57 AM
To: users@tomcat.apache.org
Subject: Re: Tomcat 10.1.34 log messages
On 11/12/2024 08:36, joan.balaguero@ventusproxy.com wrote:
> Hello,
>
>
>
> After migrating to Tomcat 10.1.34, I see these messages on the tomcat log.
> It's not affecting our application at all, I paste them below just for
> your information.
Which version did you migrate from?
How often do you see these messages? Do they correlate with any particular (failed?) request.
> Dec 10, 2024 2:39:02 PM
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor doRun
>
> SEVERE: Error running socket processor
>
> java.lang.NullPointerException: Cannot invoke
> "java.nio.ByteBuffer.limit(int)" because "this.byteBuffer" is null
That is odd. I wouldn't expect byteBuffer to be null at the end of a request.
> And:
>
> Dec 10, 2024 2:57:00 PM org.apache.tomcat.util.net.NioEndpoint$Poller events
>
> WARNING: Invalid null socket channel while processing poller event
Another odd one. I don't immediately see how that could happen either.
Any more information you can provided, particularly how to trigger
either of these issues, would be appreciated.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 10.1.34 log messages
Posted by Mark Thomas <ma...@apache.org>.
On 11/12/2024 08:36, joan.balaguero@ventusproxy.com wrote:
> Hello,
>
>
>
> After migrating to Tomcat 10.1.34, I see these messages on the tomcat log.
> It's not affecting our application at all, I paste them below just for your
> information.
Which version did you migrate from?
How often do you see these messages? Do they correlate with any
particular (failed?) request.
> Dec 10, 2024 2:39:02 PM
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor doRun
>
> SEVERE: Error running socket processor
>
> java.lang.NullPointerException: Cannot invoke
> "java.nio.ByteBuffer.limit(int)" because "this.byteBuffer" is null
That is odd. I wouldn't expect byteBuffer to be null at the end of a
request.
> And:
>
> Dec 10, 2024 2:57:00 PM org.apache.tomcat.util.net.NioEndpoint$Poller events
>
> WARNING: Invalid null socket channel while processing poller event
Another odd one. I don't immediately see how that could happen either.
Any more information you can provided, particularly how to trigger
either of these issues, would be appreciated.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org