Uploaded image for project: 'Synapse'
  1. Synapse
  2. SYNAPSE-592

If a url with a space submitted to the synapse, nhttp transport goes in to an infinite loop

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0
    • None
    • None

    Description

      I've submitted an invalid url (a url with a space) to synapse. When this happens NIO transport goes to an infinite loop. It shows the following exception repeatedly. The reason for this is a Null point exception.

      In case of HTTP error, synapse ServerHandler doesn't get called for the input. But the outputready method of the ServerHandler is called. In the output ready method we check a output buffer variable. But since the input is not given to syanpse this buffer is not set. Resulting in the null point. I've done a simple fix to avoid this. But I think this should be handled in the HTTP Core Nio level. It shouldn't call the output ready method when there is an error.

      2009-10-13 15:07:46,671 [-] [http-Listener I/O dispatcher-1] WARN HttpCoreNIOListener System may be unstable: IOReactor encountered a runtime exception : null
      java.lang.NullPointerException
      at org.apache.synapse.transport.nhttp.ServerHandler.outputReady(ServerHandler.java:209)
      at org.apache.http.impl.nio.DefaultNHttpServerConnection.produceOutput(DefaultNHttpServerConnection.java:207)
      at org.apache.http.impl.nio.DefaultServerIOEventDispatch.outputReady(DefaultServerIOEventDispatch.java:153)
      at org.apache.http.impl.nio.reactor.BaseIOReactor.writable(BaseIOReactor.java:185)
      at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:342)
      at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:319)
      at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:275)
      at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
      at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:528)
      at java.lang.Thread.run(Thread.java:595)
      2009-10-13 15:07:46,750 [-] [http-Listener I/O dispatcher-1] WARN HttpCoreNIOListener System may be unstable: IOReactor encountered a runtime exception : null
      java.lang.NullPointerException
      at org.apache.synapse.transport.nhttp.ServerHandler.outputReady(ServerHandler.java:209)
      at org.apache.http.impl.nio.DefaultNHttpServerConnection.produceOutput(DefaultNHttpServerConnection.java:207)
      at org.apache.http.impl.nio.DefaultServerIOEventDispatch.outputReady(DefaultServerIOEventDispatch.java:153)
      at org.apache.http.impl.nio.reactor.BaseIOReactor.writable(BaseIOReactor.java:185)
      at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:342)
      at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:319)
      at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:275)
      at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
      at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:528)
      at java.lang.Thread.run(Thread.java:595)
      2009-10-13 15:07:46,843 [-] [http-Listener I/O dispatcher-1] WARN HttpCoreNIOListener System may be unstable: IOReactor encountered a runtime exception : null
      java.lang.NullPointerException

      Attachments

        1. SYNAPSE-592.patch
          2 kB
          Supun Kamburugamuva

        Issue Links

          Activity

            People

              ruwan Ruwan Linton
              supun Supun Kamburugamuva
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: