Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-19760

[GSS](7.3.z) WEJBHTTP-45 - UT000103 thrown when WildflyClientOutputStream size is exactly 1024 bytes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 7.3.2.CR2, 7.3.2.GA
    • 7.3.1.GA
    • None
    • None
    • +
    • Hide

      Compose an EJB method invocation with a stream length of exactly 1024.

      Release is actually 1.0.20.Final commit 9599620. I also tested 1.0.21.Final with same results.

      WEJBHTTP-45.jar

      Add the user:

      ./bin/add-user.sh -a -u ejbuser -p redhat1!

      Deploy the application

      java -cp $JBOSS_HOME/bin/client/jboss-cli-client.jar:$JBOSS_HOME/bin/client/jboss-client.jar:standalone/deployments/WEJBHTTP-45.jar com.jboss.examples.ejb.HelloClient

      Show
      Compose an EJB method invocation with a stream length of exactly 1024. Release is actually 1.0.20.Final commit 9599620. I also tested 1.0.21.Final with same results. WEJBHTTP-45 .jar Add the user: ./bin/add-user.sh -a -u ejbuser -p redhat1! Deploy the application java -cp $JBOSS_HOME/bin/client/jboss-cli-client.jar:$JBOSS_HOME/bin/client/jboss-client.jar:standalone/deployments/ WEJBHTTP-45 .jar com.jboss.examples.ejb.HelloClient

      Invoking an remote EJB method via http whose marshaled stream length is exactly 1024 throws UT000103 exception. Haven't tested other multiples of 1024 but it seems they would all produce the same result. The problem appears to be that the full buffer is written to streamSinkChannel before the WildflyClientOutputStream is closed. The code in the channel listener's handleEvent at line 69 "if (closed && (pooledBuffer ...)" attempts to deal with this situation but the state of the channel isn't correct. In this situation streamSinkChannel.writeFinal is never called.

      I've fixed the problem by commenting out the following lines 172-174:

      } else {
      {{ buffer.put(b, currentOff, currentLen);}}
      // if (buffer.remaining() == 0) {
      // runWriteTask();
      {{// }}}
      {{ return;}}
      {{} }}

      Exception thrown from AbstractFramedStreamSinkChannel line 218:

      UndertowLogger.ROOT_LOGGER.listenerNotProgressing();

              rchakrab Ranabir Chakraborty
              rhn-support-bmaxwell Brad Maxwell
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: