Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-12554

Ignite instance couldn't be restarted if it's parent thread group has been called destroy once

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.6
    • 2.9
    • cache
    • None
    • Do not use dedicated ThreadGroup for IgniteThread threads anymore.
    • Docs Required, Release Notes Required

    Description

      I am using an inhouse platform which manage the life cycle of ignite instance by calling ignition.start() and ignition.stop() from a web application.

      it could be started without issue for the first time. however, if it stop the ignite by calling ignition.stop() and followed by destroying the parent thread group which starting it.

      Calling ignition.start() in the 2nd time will throw the following exception 

      Exception in thread "kickOff" java.lang.IllegalThreadStateExceptionException in thread "kickOff" java.lang.IllegalThreadStateException at java.lang.ThreadGroup.addUnstarted(ThreadGroup.java:867) at java.lang.Thread.init(Thread.java:405) at java.lang.Thread.init(Thread.java:349) at java.lang.Thread.<init>(Thread.java:599) at org.apache.ignite.thread.IgniteThread.<init>(IgniteThread.java:96) at org.apache.ignite.internal.util.StripedExecutor$Stripe.start(StripedExecutor.java:474) at org.apache.ignite.internal.util.StripedExecutor.<init>(StripedExecutor.java:121) at org.apache.ignite.internal.util.StripedExecutor.<init>(StripedExecutor.java:80) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1842) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1730) at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1158) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:589) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:565) at org.apache.ignite.Ignition.start(Ignition.java:305) at com.faculty.poc.ignite.app.NodeRestartTesting.run(NodeRestartTesting.java:60) at java.lang.Thread.run(Thread.java:748)

      Please find my demo code for this issue.

      Walk through into Ignite code, it should be caused by a static thread group created in IgniteThread class. (private static final ThreadGroup DFLT_GRP = new ThreadGroup("ignite")

      Destroyed the parent thread group which start the ignite instance will result in causing the DFLT_GRP go into destroyed state. Therefore, when Ignite was start ifor the 2nd time, this static thread group has been destroyed and no longer able to run the ignite. 

       

       

      Attachments

        1. NodeRestartTesting.java
          2 kB
          ha faculty

        Issue Links

          Activity

            People

              Pavlukhin Ivan Pavlukhin
              hafaculty ha faculty
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m