5 Replies Latest reply on Mar 30, 2005 12:00 PM by danielsmolenaars

    Threads stuck in "unknown" state with UIL2

    rsoto

      I am currently experiencing some problems when using UIL2 invocation layer. I have been seeing incorrect thread counts for some time (~ when I upgraded to 3.2.2 I think). If I look at the ServerInfo MBean and look at the thread dump, the count is nowhere near the number of threads the dump is reporting. I started up JBoss in debug mode and when I connect to it with a jdb session, I can see in the JBossMQ thread group there are many (a couple thousand) threads laying around that are reported to be in state "unkown". Where all threads are either in a "running" or "waiting" state, these threads in the "waiting" state do not appear in a thread dump as well. When I look at a stack trace for any of these threads I can see that they are instances of "SImpleTimerThread" instantiated from somepoint (can't remember exactly where) in the UIL2 layer. Has anyone seen this before? I am running in a pub/sub environment with ~350 topics created and up to 400 UIL2 connections and ~50 OIL connections. This did happen whether or not I was creating any OIL connections.

      Thanks.

        • 1. Re: Threads stuck in "unknown" state with UIL2
          rsoto

          One other note, this happens whether I use HyperSQL or MySQL for JMS persistence.

          • 2. Re: Threads stuck in "unknown" state with UIL2

            This is the new scheduled delivery processing.
            It instatiates an object of SimpleTimer per subscription
            which extends java.lang.Thread

            The thread isn't actually running so it is state "Unknown".
            The JVM just counts the number of java.lang.Thread
            objects rather than the real system threads.

            Thanks for pointing me at this code. It is crying out
            for a ThreadPool.

            Regards,
            Adrian

            • 3. Re: Threads stuck in "unknown" state with UIL2
              rsoto

              Ok. Phew! I thought there might be some massive thread leak and I was starting to get nervous. Do these threads ever start? It also appears that the objects never get cleaned up, even after the connection has closed.


              Thanks.
              Ray.

              • 4. Re: Threads stuck in "unknown" state with UIL2

                They are not part of the connection, they are part of the
                queue/subscription.

                They do start if you schedule a message for delivery.
                Which is why I said it should use a thread pool
                with one thread waking up when the next delivery is
                required.

                Regards,
                Adrian

                • 5. Re: Threads stuck in
                  danielsmolenaars

                  Hi, I am having the same problem with Jboss 4.0.1, the msg is sent to the Queue, the msg is executed, but It create some kind of thread zombies even if the msg is processed with success.

                  And the threads never desapear until we reboot the server.

                  What should I do?

                  Thanks.