-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sporadic NPE in ArrayByteBufferPool.evict() #11098
Comments
Can you share how did you configure the |
We're not touching that class in our code. I checked with the debugger, and I see that it is it initiated by its empty constructor from the Server constructor: |
@lorban I think the problem is as follows. The eviction happens when In this case, calling This is a rare case because it needs to happen that there is at least one |
Reorganized ArrayByteBufferPool.evict() code to avoid NPE. Small change to ConcurrentPool: no need to null check the final ConcurrentEntry.holder field. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet I'm sorry, but I find it a bit too risky to test it in our production environment (which is the only place this happens) |
* Reorganized ArrayByteBufferPool.evict() code to avoid NPE. * Fixed acquire logic to take into account that a reserved entry may fail to be enabled because it may be concurrently removed. * Small change to ConcurrentPool: no need to null check the final ConcurrentEntry.holder field. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Fixed by #11204. |
Jetty version(s)
12.0.5
Jetty Environment
ee10
Java version/vendor
(use: java -version)
openjdk 21.0.1 2023-10-17 LTS
OpenJDK Runtime Environment Temurin-21.0.1+12 (build 21.0.1+12-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.1+12 (build 21.0.1+12-LTS, mixed mode, sharing)
OS type/version
Ubuntu 22.04
Description
NullPointerException occurs in ArrayByteBufferPool.evict(). This exception is thrown hundreds of times within approximately 15 seconds. It has occurred twice in our production environment but has not been reproducible in any other environments.
How to reproduce?
The text was updated successfully, but these errors were encountered: