What does "Program XXX interrupted" really mean?

Staffan Larsen staffan.larsen at oracle.com
Mon Aug 3 06:29:56 UTC 2015

The relevant code is here: http://hg.openjdk.java.net/code-tools/jtreg/file/055251d38f29/src/share/classes/com/sun/javatest/regtest/ProcessCommand.java#l283 <http://hg.openjdk.java.net/code-tools/jtreg/file/055251d38f29/src/share/classes/com/sun/javatest/regtest/ProcessCommand.java#l283>

Since the message says “interrupted” and not “timed out”, the alarm didn’t fire which means there was no timeout involved. So the other option is that Process.waitFor threw an InterruptedException.

But looking at the code for Alarm [1], I see now that the ‘fired’ field is not thread safe (I think it should be declared volatile). So it could be that the message should really say “timed out” and that there was a timeout for the javac command.


[1] http://hg.openjdk.java.net/code-tools/jtreg/file/055251d38f29/src/share/classes/com/sun/javatest/regtest/agent/Alarm.java#l104

> On 3 aug 2015, at 07:07, David Holmes <david.holmes at oracle.com> wrote:
> Hi,
> I see a test failure where after ~12 seconds of elapsed time (as per the jtr file) we get:
> result: Error. Program `.../bin/javac' interrupted!
> What exactly does jtreg detect to report this?
> Thanks,
> David

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/jtreg-use/attachments/20150803/b219369d/attachment.html>

More information about the jtreg-use mailing list