Uploaded image for project: 'mod_cluster'
  1. mod_cluster
  2. MODCLUSTER-433

remove_session_route causes an infinite loop when parsing jsessionid out of URLs

    XMLWordPrintable

Details

    • Hide

      -Set up httpd/mod_cluster as usual with 2 JBoss nodes behind it.
      -Set sticky-session-remove to true on JBoss:

                  <mod-cluster-config advertise-socket="modcluster" proxy-list="127.0.0.1:6666" connector="ajp" sticky-session-remove="true">
      

      -Confirm node1 is reached via sticky sessions:

      curl localhost/yourapp\;jsessionid=tesing.node1
      

      -Kill node1 and attempt the same request again:

      kill -9 <node1_pid>
      curl localhost/yourapp\;jsessionid=tesing.node1
      

      This should cause the request to failover to node2, resulting in remove_session_route's execution and the problem loop.

      Show
      -Set up httpd/mod_cluster as usual with 2 JBoss nodes behind it. -Set sticky-session-remove to true on JBoss: <mod-cluster-config advertise-socket= "modcluster" proxy-list= "127.0.0.1:6666" connector= "ajp" sticky-session-remove= " true " > -Confirm node1 is reached via sticky sessions: curl localhost/yourapp\;jsessionid=tesing.node1 -Kill node1 and attempt the same request again: kill -9 <node1_pid> curl localhost/yourapp\;jsessionid=tesing.node1 This should cause the request to failover to node2, resulting in remove_session_route's execution and the problem loop.
    • Workaround Exists
    • Hide

      -Use sticky-session-remove="false" in the JBoss mod-cluster-config (the default)

      Show
      -Use sticky-session-remove="false" in the JBoss mod-cluster-config (the default)
    • Low

    Description

      remove_session_route causes an infinite loop when parsing jsessionid out of URLs. The stack of the looping thread is:

      #0  0x00007f4cf2b66e45 in remove_session_route () from /etc/httpd/modules/mod_proxy_cluster.so
      #1  0x00007f4cf2b68ad9 in ?? () from /etc/httpd/modules/mod_proxy_cluster.so
      #2  0x00007f4cf2f7d116 in proxy_run_pre_request () from /etc/httpd/modules/mod_proxy.so
      #3  0x00007f4cf2f84186 in ap_proxy_pre_request () from /etc/httpd/modules/mod_proxy.so
      #4  0x00007f4cf2f813c2 in ?? () from /etc/httpd/modules/mod_proxy.so
      #5  0x00007f4cf776df70 in ap_run_handler ()
      #6  0x00007f4cf777180e in ap_invoke_handler ()
      #7  0x00007f4cf777cfd0 in ap_process_request ()
      #8  0x00007f4cf7779d48 in ?? ()
      #9  0x00007f4cf7775a58 in ap_run_process_connection ()
      #10 0x00007f4cf7781fa7 in ?? ()
      #11 0x00007f4cf77822ca in ?? ()
      #12 0x00007f4cf7782f4c in ap_mpm_run ()
      #13 0x00007f4cf7759ab5 in main ()
      

      That is looping here:

      mod_proxy_cluster.c
                      while (*path !='&' || *path !='\0')
                          path++;
      

      "*path !='&' || *path !='\0'" is a tautology so the while never ends. It should be an && instead of ||.

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-jclere Jean-Frederic Clere
              rhn-support-aogburn Aaron Ogburn
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: