3 Replies Latest reply on Mar 10, 2016 9:38 PM by Sammy Chu

    Calling Servlet forward after Servlet/ JSP include call will result in StackOverflowError in Wilfly internal and cause infinispan distributed session deadlock forever

    Sammy Chu Newbie

      Hi All,

      We just experienced an issue about infinispan distributed session hang forever in our cluster enabled environment. After investigation, we finally found it is due to a StackOverflowError throw in the Wildfly internal, after doing the following thing:


      <!-- some other HTML tag here, which is not related, just need to ensure something already write to the output -->
      <jsp:include page="/include.jsp" />



          // read and write some session attributes here, to lock the infinispan distributed session forever...
          session.setAttribute("someAttribute", "someValue");
          // then do a Servlet forward, will result in a StackOverflowError, and the infinispan cache lock will not be release, so the whole server hang...
          // while the "forward.jsp" is not related, can even be a blank JSP.
          request.getRequestDispatcher("/forward.jsp").forward(request, response);


      This issue already tested in Wildfly 8.2.1.Final, 9.0.2.Final and 10.0.0.Final with the shipped standalone-full-ha.xml configuration, both of them can be reproduced.

      The reproducible sample is enclosed.