6 Replies Latest reply on May 23, 2007 2:21 AM by ron_sigal

    Need help debugging JBoss Remoting

    sergeypk

      Hi,

      when I run the full JBoss Messaging test suite on my machine (Windows XP SP2, JDK 1.5.0_11) it often hangs on a test. Running that test alone works fine. I suspect remoting may be the cause of the lock up. Can you offer any advice in debugging this problem?

      Thanks,
      Sergey

        • 1. Re: Need help debugging JBoss Remoting
          ron_sigal

          Hi Sergey,

          When I've had problems with JBossMessaging tests, I've spent a lot of time looking at log files with logging set to TRACE. Sometimes I've added log statements to Remoting and put a custom jboss-remoting.jar in ${MESSAGING_HOME}/lib.

          I've had the experience of JBM tests passing on their own and failing as part of the test suite. There were a couple of places where earlier tests had failed to close a connection (or something like that) that impacted a later test. I made those changes on the branch I was working on, but I don't know that they ever made it to the main branch.

          Which test is hanging? In the past I've had to exclude org.jboss.test.messaging.jms.bridge.BridgeTest, which was hanging for me. At the time my impression was that the test just wasn't ready to be run, but I don't know its current status.

          -Ron

          • 2. Re: Need help debugging JBoss Remoting
            sergeypk

            Yes, BridgeTest.testStressSameServer_DuplicatesOk_P_50 was the one that I found hung up today in the morning. I'll try looking in the logs next time, though I'm not sure what to look for.

            Why does the problem only happen on Windows? Tim runs messaging tests on Linux and says they work fine there.

            • 3. Re: Need help debugging JBoss Remoting
              sergeypk

              I re-ran the tests and looked in the logs this time. I can't really tell anything from them so far, but there is this error I have also seen under many different circumstances:

              00:41:57,328 DEBUG @WorkerThread#82[127.0.0.1:3127] [ServerThread] WorkerThread#82[127.0.0.1:3127] closing socketWrapper: ServerSocketWrapper[Socket[addr=/127.0.0.1,port=3127,localport=2946].1d9d4e0]
              00:41:57,328 DEBUG @WorkerThread#82[127.0.0.1:3127] [ServerSocketWrapper] cannot write CLOSING byte
              java.net.SocketException: Connection reset by peer: socket write error
               at java.net.SocketOutputStream.socketWrite0(Native Method)
               at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
               at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
               at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
               at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
               at java.io.DataOutputStream.flush(DataOutputStream.java:106)
               at org.jboss.jms.server.remoting.ServerSocketWrapper.close(ServerSocketWrapper.java:74)
               at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:481)
               at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
              00:41:57,328 DEBUG @WorkerThread#82[127.0.0.1:3127] [SocketWrapper] ServerSocketWrapper[Socket[addr=/127.0.0.1,port=3127,localport=2946].1d9d4e0] closing
              


              Why does this happen? It's only given DEBUG level in the logs, so it doesn't mean anything serious?

              • 4. Re: Need help debugging JBoss Remoting
                ron_sigal

                Hi Sergey,

                You're right - it's not important. In response to JBREM-690 I had ServerSocketWrapper.close() write a couple of bytes which tell the client side of the connection that the server side is closing. But if the client side closes first, then the server side can't write those bytes. I guess it's kind of annoying though, so I'll reduce the log level to TRACE. Maybe I'll just take it out altogether.

                -Ron

                • 5. Re: Need help debugging JBoss Remoting
                  sergeypk

                  Hi Ron,

                  actually, this exception only occurs near the point where the test suite hangs, so it might be useful, don't take it out just yet :)

                  Sergey

                  • 6. Re: Need help debugging JBoss Remoting
                    ron_sigal

                    I'm not that efficient. :-)