You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
starts ok, and I can see messages in JDK mission control. I can execute few requests manually in browser, and they work ok...
But, when I do a load test with JMeter - i get exceptions:
java.util.NoSuchElementException: null
at java.base/java.util.ArrayDeque.getFirst(ArrayDeque.java:402) ~[na:na]
at org.springframework.core.metrics.jfr.FlightRecorderApplicationStartup.start(FlightRecorderApplicationStartup.java:55) ~[spring-core-5.3.0.jar:5.3.0]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:160) ~[spring-context-5.3.0.jar:5.3.0]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:426) ~[spring-context-5.3.0.jar:5.3.0]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:383) ~[spring-context-5.3.0.jar:5.3.0]
at org.springframework.web.servlet.FrameworkServlet.publishRequestHandledEvent(FrameworkServlet.java:1141) ~[spring-webmvc-5.3.0.jar:5.3.0]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1023) ~[spring-webmvc-5.3.0.jar:5.3.0]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.0.jar:5.3.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) ~[tomcat-embed-core-9.0.39.jar:4.0.FR]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.0.jar:5.3.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.39.jar:4.0.FR]
Thanks for the sample. This looks like a Spring Framework issue to me. We'll transfer the issue to the Framework repository so that they can take a look.
bclozel
transferred this issue from spring-projects/spring-boot
Nov 9, 2020
It happens for me on (I think) every authenticated request at some point after starting. Application was not run with JFR attached.
java.util.NoSuchElementException: null
at java.util.ArrayDeque.getFirst(ArrayDeque.java:403)
at org.springframework.core.metrics.jfr.FlightRecorderApplicationStartup.start(FlightRecorderApplicationStartup.java:55)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:160)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:426)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:383)
at org.springframework.security.access.intercept.AbstractSecurityInterceptor.publishEvent(AbstractSecurityInterceptor.java:452)
at org.springframework.security.access.intercept.AbstractSecurityInterceptor.attemptAuthorization(AbstractSecurityInterceptor.java:248)
at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:208)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:113)
...
After considering several approaches, I decided to remove the instrumentation around listeners invocations. One of the main design points behind the ApplicationStartup is about the single-threaded nature of the application context refresh phase. Listener invocation can be concurrent, so we can't guarantee proper behavior here.
We'll consider other instrumentation points and metrics with ApplicationStartup in the future (feel free to suggest some!).
Spring Boot 2.4.0-RC1 application with
starts ok, and I can see messages in JDK mission control. I can execute few requests manually in browser, and they work ok...
But, when I do a load test with JMeter - i get exceptions:
Please find test application at:
https://github.com/lvivJavaClub/jfr-demo/tree/issue_branch
and very simple jmeter scenario https://github.com/lvivJavaClub/jfr-demo/blob/issue_branch/jfr_test_plan.jmx
The text was updated successfully, but these errors were encountered: