1 2 Previous Next 24 Replies Latest reply on Sep 29, 2016 3:56 PM by tomjenkinson Go to original post
      • 15. Re: Help building blacktie.
        fhitchen

        I hacked the HybridConnectionImpl.cxx to move the delete out of the locked block and yes, the client test now whizzes through without any pauses.

         

        That is until later as you predicted. The first 10 whiz through and then after that there seems to be a 7 request periodicity with a three second hang that comes in to the picture.

         

        regards, Francis.

         

        git diff blacktie/hybrid/src/main/cpp/HybridConnectionImpl.cxx

        diff --git a/blacktie/hybrid/src/main/cpp/HybridConnectionImpl.cxx b/blacktie/hybrid/src/main/cpp/HybridConnectionImpl.cxx

        index 5fed6dc..c9af44d 100644

        --- a/blacktie/hybrid/src/main/cpp/HybridConnectionImpl.cxx

        +++ b/blacktie/hybrid/src/main/cpp/HybridConnectionImpl.cxx

        @@ -316,10 +316,11 @@ void HybridConnectionImpl::closeSession(int id) {

                sessionMapLock->lock();

                if (sessionMap[id]) {

                        HybridSocketSessionImpl* session = sessionMap[id];

        +                sessionMapLock->unlock();

                        delete session;

                        sessionMap[id] = NULL;

                }

        -       sessionMapLock->unlock();

        +//     sessionMapLock->unlock();

        }

         

        void HybridConnectionImpl::disconnectSession(int id) {

        • 16. Re: Help building blacktie.
          zhfeng

          Thanks Tom for your great investigating,  and this is a good chance for me to review these codes.

           

          1. The apr_pollset_poll in HybridSocketEndpointQueue.cxx is blocking and timing out after 3 second. It is the root cause for the tpcall delaying.

          2. It does not happen on CI because this is a timing issue. The disconnect() method setting the shutdown flag runs before the connecting to the callback server. So the apr_pollset_poll does not get the chance to run.

          3. In the non-conversion, the xatmi server just sent the response and no needs to recv from the client. So the fix should be adding the if block at narayana/HybridSocketEndpointQueue.cxx at master · jbosstm/narayana · GitHub

          diff --git a/blacktie/hybrid/src/main/cpp/HybridSocketEndpointQueue.cxx b/blacktie/hybrid/src/main/cpp/HybridSocketEndpointQueue.cxx

          index cdb7f56..160b6ea 100644

          --- a/blacktie/hybrid/src/main/cpp/HybridSocketEndpointQueue.cxx

          +++ b/blacktie/hybrid/src/main/cpp/HybridSocketEndpointQueue.cxx

          @@ -425,16 +425,18 @@ void HybridSocketEndpointQueue::run() {

                                                          apr_pollset_remove(pollset, &pfd);

                                                          LOG4CXX_DEBUG(logger, (char*) "remove socket for connected");

           

          -                                               serv_buffer_t *buf = (serv_buffer_t*)apr_palloc(pool, sizeof(serv_buffer_t));

          -                                               buf->sock = socket;

          -                                               buf->context = pool;

          -                                               buf->len = 0;

          -                                               buf->rcvlen = 0;

          -

          -                                               apr_pollfd_t pfd_s = { pool, APR_POLL_SOCKET, APR_POLLIN, 0, { NULL }, buf};

          -                                               pfd_s.desc.s = socket;

          -                                               apr_pollset_add(pollset, &pfd_s);

          -                                               LOG4CXX_DEBUG(logger, (char*) "add socket in pollset");

          +                                               if (session->getIsConv()) {

          +                                                       serv_buffer_t *buf = (serv_buffer_t*)apr_palloc(pool, sizeof(serv_buffer_t));

          +                                                       buf->sock = socket;

          +                                                       buf->context = pool;

          +                                                       buf->len = 0;

          +                                                       buf->rcvlen = 0;

          +

          +                                                       apr_pollfd_t pfd_s = { pool, APR_POLL_SOCKET, APR_POLLIN, 0, { NULL }, buf};

          +                                                       pfd_s.desc.s = socket;

          +                                                       apr_pollset_add(pollset, &pfd_s);

          +                                                       LOG4CXX_DEBUG(logger, (char*) "add socket in pollset for the conversion");

          +                                               }

                                                  }

                                          } else if (ret_pfd[i].rtnevents & APR_POLLIN) {

                                                  if(ret_pfd[i].desc.s == socket) {

          • 17. Re: Help building blacktie.
            zhfeng

            yeah, I'm trying to reproduce the issue on my machine. It might be useful to add some delay to simulate the situation before the disconnect() to set the shutdown flag in narayana/HybridSocketEndpointQueue.cxx at master · jbosstm/narayana · GitHub

            • 18. Re: Help building blacktie.
              zhfeng
              • 19. Re: Help building blacktie.
                tomjenkinson

                Just a small update that I raised this: [JBTM-2721] Downgrade the version of WildFly to last released version - JBoss Issue Tracker to hopefully prevent the WildFly SNAPSHOT issue in the future. Occasionally we do need to use the SNAPSHOT if there is something fundamentally altered in WildFly unfortunately.

                • 20. Re: Help building blacktie.
                  zhfeng

                  I had build the apr-1.5 artifacts with fc18x64, centos55x32, centos54x64 but there was an issue to deploy them to the https://repository.jboss.org/nexus/#stagingRepositories

                  Also I'm trying to build with vc9x32 on the window machine. I will work with Tom to resolve the deploy issue and hope to fix [JBTM-2723] Upgrade the apr to 1.5 - JBoss Issue Tracker

                  as soon as possible.

                   

                  Thanks for your patients,

                  Amos

                  • 21. Re: Help building blacktie.
                    tomjenkinson

                    Thanks for the update Amos. I have managed to upload your artifacts to Nexus but in your pom for the patch Amos you will need to use the version 1.5.2.BT2 (as in BlackTie patch 2). The artifacts were failing our uniqueness check as they were not uploaded all at the same time (or were uploaded to different staging repositories as they were on different machines). I updated deploy.sh in blacktie/utils/thirdparty to reflect the issue.

                    • 22. Re: Help building blacktie.
                      tomjenkinson

                      Just to add another update, after some battling Amos seems to have root-caused this now. We have a patch being reviewed over: JBTM-2719 tpcall get three seconds delay in the fooapp quickstart by zhfeng · Pull Request #1045 · jbosstm/narayana · Gi…

                       

                      There is just an outstanding question on whether or not the apr-1.so -> apr-1.so0 is in the actual binary distribution for picking up by quickstarts. zhfeng is taking a look at that now.

                      • 23. Re: Help building blacktie.
                        zhfeng

                        yeah, this symbol link is added in the binary distribution and I think the quickstarts should work with them.

                        and Francis, JBTM-2719 tpcall get three seconds delay in the fooapp quickstart by zhfeng · Pull Request #1045 · jbosstm/narayana · Gi… has been merged into the master. So you could try to update and rebuild to see if it fixes the issue. and I think Tom will release the Narayana 5.3.5.Final soon. if you have any question about using the Blacktie, feel free to discuss on the forum,

                         

                        Thanks,

                        Amos

                        • 24. Re: Help building blacktie.
                          tomjenkinson

                          Just to mention that I released 5.3.5 today: Downloads · Narayana

                          1 2 Previous Next