7 Replies Latest reply on Feb 27, 2002 12:52 PM by wokkel

    Running JBoss with green threads

    wokkel

      I saw in the testsuite results that running JBoss 3.0alpha with green threads under Linux works. However, when I change the -server option to -green in run.sh to enable green treads, starting the server hangs around starting the HA part. When i remove that it comes as far as the Mail service and then hangs. Anybody got this working under Blackdown JDK 1.3.1fcs?
      If more info is needed I can mail the output of a SIGQUIT to the stalled VM.

        • 1. Re: Running JBoss with green threads
          wokkel

          Damn, I hate replying to myself..

          to make it clear: I'm running JBoss3.0alpha using both the ClientVM or the ServerVM without trouble, it's just that sometimes I run out of threads, hence the -green option for user threads.

          • 2. Re: Running JBoss with green threads

            The automated testsuite runs using green threads on
            a blackdown VM. It also uses the option nojit.

            Here's a link to lastnight's results, look at the bottom

            http://lubega.com/testarchive/reports-20020208-0431/org/jboss/test/management/test/package-summary.html

            Regards,
            Adrian

            • 3. Re: Running JBoss with green threads
              wokkel

              Yeah, I saw the testsuite running with green threads. I tried it at work using 2 machines (different kernels and make etc.) and it didn't work. To my surprise it did work at home (al using the fcs02 release from januari 2002). With and without the sunwjit compiler, so I don't get it. Weird.

              • 4. Re: Running JBoss with green threads
                wokkel

                Ok. On closer inspection in the SIGQUIT trace I see this remarkeble fact. I got this trace by starting JBoss until it hung displaying "[MailService] Starting".

                "jboss-main" (TID:0x4358b910, sys_thread_t:0x81aa6d8, state:MW) prio=5
                at org.jboss.system.URLClassLoader.loadClassLocally(URLClassLoader.java:113)
                at org.jboss.system.ServiceLibraries.loadClass(ServiceLibraries.java:355)
                at org.jboss.system.URLClassLoader.loadClass(URLClassLoader.java:107)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
                at org.jboss.mail.MailService.startService(MailService.java:89)
                at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:130)
                at java.lang.reflect.Method.invoke(Native Method)
                at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
                at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:745)
                at $Proxy0.start(Unknown Source)
                at org.jboss.system.ServiceController.start(ServiceController.java:324)
                at java.lang.reflect.Method.invoke(Native Method)
                at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
                at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                at org.jboss.deployment.ServiceDeployer.invoke(ServiceDeployer.java:767)
                at org.jboss.deployment.ServiceDeployer.deploy(ServiceDeployer.java:281)
                at org.jboss.deployment.DeployerMBeanSupport.deploy(DeployerMBeanSupport.java:101)
                at java.lang.reflect.Method.invoke(Native Method)
                at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
                at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                at org.jboss.system.Server.(Server.java:159)
                at org.jboss.Main.boot(Main.java:204)
                at org.jboss.Main.run(Main.java:40)
                at java.lang.Thread.run(Thread.java:484)

                A thread thats stuck in classloading??

                And indeed (if I'm reading this correctly) :
                org.jboss.system.URLClassLoader@43608C70/4694ED90: owner "jboss-main" (0x81aa6d8) 2 entries
                Waiting to enter:
                "Thread-9" (0x8b71e28)
                "AutoDeployer" (0x8c30798)

                Thread 9 seems to be HSQL:

                "Thread-9" (TID:0x43af01f8, sys_thread_t:0x8b71e28, state:MW) prio=5
                at org.jboss.system.URLClassLoader.loadClassLocally(URLClassLoader.java:113)
                at org.jboss.system.ServiceLibraries.loadClass(ServiceLibraries.java:355)
                at org.jboss.system.URLClassLoader.loadClass(URLClassLoader.java:107)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
                at org.jboss.jdbc.HypersonicDatabase$2.run(HypersonicDatabase.java:160)
                at java.lang.Thread.run(Thread.java:484)


                So something fishy is going on. Both threads need to load something and one is keeping the lock too long or so. But HyperSonic seems to be started already according to the logmessages. I'm assuming that the line URLClassloader:113 pertains to the JBoss URLClassloader which has the following code there:

                110 public Class loadClassLocally(String name, boolean resolve)
                111 throws ClassNotFoundException
                112 {
                113 return super.loadClass(name, resolve);
                114 }

                (the files last modified 3 jan 2002 in my checkout).

                The super is indeed a synchronized method, so my guess is that the code is doing something weird and ending up in a deadlock (but not on all machines). Hmm. Need more coffee to solve this one.

                • 5. Re: Running JBoss with green threads

                  You might want to try checking out 2002-01-19 from CVS,
                  that's pretty stable for an Alpha release :-)

                  This could be an early problem with the service
                  dependency code of 3.0? (I'm guessing)
                  Regards,
                  Adrian

                  • 6. Re: Running JBoss with green threads
                    wokkel

                    Yeah, I should keep up with CVS, but the coding there is fast and furious and I want to finish my app without too many hassles :-). I'll try a new checkout next week or so. For now, we'll have to live with incidental out-of-threads (or I could increase the maximal ammount of threads or limit the number of RMI requests per second :-)).

                    Thanks.

                    • 7. Re: Running JBoss with green threads
                      wokkel

                      Problem solved with the 25-02-2002 checkout.