What does "Program XXX interrupted" really mean?
David Holmes
david.holmes at oracle.com
Mon Aug 3 06:39:38 UTC 2015
On 3/08/2015 4:29 PM, Staffan Larsen wrote:
> 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
>
> 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.
Thanks for that. So I need to see why waitFor would throw IE (other than
the obvious t.interrupt() case).
> 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.
With only 12 seconds elapsing I don't see how it would be an actual
timeout. But yes "fired" should be volatile.
Thanks again,
David
> Regards,
> /Staffan
>
>
>
> [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
>> <mailto: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
>
More information about the jtreg-use
mailing list