Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-14466

ConcurrentManager can throw NPE if managed object is closed more than once

XMLWordPrintable

      Seen in wildfly-clustering-spring-session when authentication fails:

      	java.lang.NullPointerException
      		at org.wildfly.clustering.ee.cache.ConcurrentManager$2.apply(ConcurrentManager.java:60)
      		at org.wildfly.clustering.ee.cache.ConcurrentManager$2.apply(ConcurrentManager.java:57)
      		at java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1908)
      		at org.wildfly.clustering.ee.cache.ConcurrentManager$3.run(ConcurrentManager.java:87)
      		at org.wildfly.clustering.web.cache.session.ConcurrentSessionManager$ConcurrentSession.close(ConcurrentSessionManager.java:182)
      		at org.wildfly.clustering.web.spring.DistributableSession.close(DistributableSession.java:207)
      		at org.wildfly.clustering.web.spring.DistributableSessionRepository.save(DistributableSessionRepository.java:142)
      		at org.wildfly.clustering.web.spring.DistributableSessionRepository.save(DistributableSessionRepository.java:50)
      		at org.wildfly.clustering.web.spring.hotrod.HotRodSessionRepository.save(HotRodSessionRepository.java:372)
      		at org.wildfly.clustering.web.spring.hotrod.HotRodSessionRepository.save(HotRodSessionRepository.java:103)
      		at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.commitSession(SessionRepositoryFilter.java:225)
      		at org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper.access$100(SessionRepositoryFilter.java:192)
      		at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:144)
      		at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:82)
      		at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358)
      		at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271)
      		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
      		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
      		at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
      		at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
      		at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
      		at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
      		at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      		at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
      		at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
      		at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346)
      		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
      		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
      		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:887)
      		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1684)
      		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      		at java.base/java.lang.Thread.run(Thread.java:834)
      

      We should tolerate this condition for containers that have a loose interpretation of session lifecycle.

            pferraro@redhat.com Paul Ferraro
            pferraro@redhat.com Paul Ferraro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: