Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4292935

VM hangs up after suspend, resume, sleep

XMLWordPrintable

    • rc1
    • x86
    • windows_nt



        Name: dkC59003 Date: 11/19/99



        VM hangs up while executing the test below.
        If either thr1.suspend(); or Thread.sleep(500); is omitted then the test
        works fine.
        Classic passes the test.

        Running on HS 1.3fcs-P the test outputs:

        $ java test
        java version "1.3.0"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-O)
        Java HotSpot(TM) Client VM (build 1.3-P, mixed mode)
        main: after suspend/resume
        main: at the end

        <hangs>

        -------------------------------------------------------------- test.java
        public class test {
           
            public static void main(String[] args) {
        Thread thr1 = new Thread(new test_a(), "thr1");
        thr1.start();
        thr1.suspend();
        thr1.resume();
        System.out.println("main: after suspend/resume");

        try {
        Thread.sleep(500);
        } catch(InterruptedException e) {}

        System.out.println("main: at the end");
            }
        }

        class test_a implements Runnable {
            public void run() {
        System.out.println("thr1: at the end");
            }
        }

        ======================================================================

              smitrovisunw Srdjan Mitrovic (Inactive)
              dkhukhrosunw Dmitry Khukhro (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: