hs-comp: VM is not exiting

Andrew Haley aph at redhat.com
Thu Jun 11 16:17:53 UTC 2015


I'm building a clean hs-comp, and I find that the VM  does not exit
when a Timer is scheduled.  The VM seems to be deadlocked.

import java.util.Timer;
import java.util.TimerTask;

public class TimerTest {

    static volatile boolean finished = true;
    static Timer timer = new Timer();

    public static void main(String[] args) {
        TimerTask t = new TimerTask() {
            public void run() {
                finished = true;
            }
        };
        timer.schedule(t, 1000);
        throw new RuntimeException();
    }
}

Is this a known bug?

Thanks,
Andrew.


More information about the hotspot-dev mailing list