-
Notifications
You must be signed in to change notification settings - Fork 40.6k
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
java.lang.NullPointerException: null occurs in HttpExchangeTracer #15819
Comments
It hard to reproduce on the local machine. |
Assuming that the line numbers match up, the NPE from @bclozel, is it expected that |
@wilkinsona When I investigated stacktrace I found different errors, one of that when HttpExchangeTracer got response headers method size() from TomcatHeadersAdapter |
Very strange behavior of MimeHeaders |
@wilkinsona @BalasDev Let me take a look. We might need to adapt things in our actuator support there. |
This is problem is can't created object |
@bclozel @wilkinsona |
@wilkinsona I managed to reproduce the problem by:
Here's what's happening, as suspected:
I don't think we can easily move that part off of With that in mind, I think the best move here would be to protect against such cases in the @BalasDev Did you leave the HTTP tracing enabled by choice, or just because this is the default behavior? Just so you know, this is being considered in #15039 for exactly this type of use cases. |
Thanks for investigating, @bclozel
This sounds like a bit of a flaw to me. In the servlet case we capture the headers in a filter and use ordering so that it's called at a defined point in the chain. Perhaps we should consider a similar approach in the reactive case. I would prefer to predictably miss header changes made by certain filters that run later than unpredictably get the wrong headers due to the object being recycled. |
Thank you @bclozel, |
@wilkinsona I think we could capture the status and response headers right before the response is committed with: |
When we are doing performance test for our endpoint, time to time happens the exception:
Spring Boot version is 2.1.2.RELEASE
The text was updated successfully, but these errors were encountered: