5 Replies Latest reply on Nov 6, 2008 11:17 AM by peterj

    Multiple Jboss Proccesses

    idweiss

      Can it be that a JBoss instance will launch other JBoss instances?
      We observed JBoss duplicate processes on our system running JBoss 4.2.0.GA on Sun T5220 machines with Solaris 10.
      After we run JBoss for several hours we sometime see several JBoss processes running instead of only one, although we launch only one JBoss instance (we made sure by adding logging to the JBoss run.sh launch script). Also the new duplicate JBoss processes have the parent pid of the original JBoss process (the original JBoss process has a parent pid of it's run.sh process). The JBoss processes have the same parameters as the original JBoss process and take the same amount of memory.

      Here's an example of running the ps -ef | grep run.sh command:
      anauser 16082 1 0 12:45:50 ? 0:00 /bin/sh /export/home/ana41/jboss/bin/run.sh -b 0.0.0.0
      anauser 16093 16082 2 12:45:50 ? 960:40 /export/home/ana41/java/bin/java -Dprogram.name=run.sh -server -Xms2048m -Xmx20
      anauser 5623 16093 0 00:48:39 ? 0:00 /export/home/ana41/java/bin/java -Dprogram.name=run.sh -server -Xms2048m -Xmx20
      anauser 5627 16093 0 00:48:43 ? 0:00 /export/home/ana41/java/bin/java -Dprogram.name=run.sh -server -Xms2048m -Xmx20
      anauser 5590 16093 0 00:48:31 ? 0:00 /export/home/ana41/java/bin/java -Dprogram.name=run.sh -server -Xms2048m -Xmx20

      We also see that the Total Running time of these duplicate processes are almost always 0. We saw only once a duplicate JBoss process with a running time of 2, and then that process disappeared. I have a theory that maybe these Processes are stuck because their output stream are not read or directed to anywhere. We still have no idea what launched these processes.

      Will appreciate any advise.

      Thanks,
      Ido

        • 1. Re: Multiple Jboss Proccesses
          dimitris

          This must have to do with the threading model of the O/S. It shows as different processes the threads inside the single JBoss process.

          It has nothing to do with JBoss.

          • 2. Re: Multiple Jboss Proccesses
            rafaelliu

            Interesting. My guess:

            I've already heard about threading in Solaris, but never saw it, as I now Solaris have a lightweight threads and Java can use them, so threads started may be seem in ps. That must be it, threads are being launched. I may be Tomcat, how many processes are started? Tomcat uses a Thread Pool, so check server.xml and see if the numbers (e.g. max, min) match what you see. (suposing your app doesn't use threads itself)

            • 3. Re: Multiple Jboss Proccesses
              idweiss

              Thanks for the responses.
              The extra processes reflect JBoss threads for the following reasons:
              I've never see Solaris threads shown as processes before.
              We start only a single JBoss process,
              Also I've seen that each one of these additional processes do take memory (3Gb, as the original JBoss process), and when I stop them the memory is released.
              The extra processes are seen only a few hours after JBoss is running, and not consistently.

              • 4. Re: Multiple Jboss Proccesses
                project17

                Hi idweiss ,

                We are having the same issue, with exactly the same configuration.
                So finally :

                - Are the entries processes or threads ?
                - Are they consuming or sharing the memory ?
                - Is there a command to chack what's the real memory consumption ?

                Thanks.

                • 5. Re: Multiple Jboss Proccesses
                  peterj

                  The entries are threads and they are sharing memory.

                  For real memory consumption, about the best way I know how is to note the difference in memory usage as reported by top with the app running and not running. For a full discussion, see http://virtualthreads.blogspot.com/2006/02/understanding-memory-usage-on-linux.html