JDK-6776147 : java/util/Timer/KillThread.java fails in fastdebug with Exception: We failed silently on Solaris
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 6u12,7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • CPU: generic
  • Submitted: 2008-11-25
  • Updated: 2012-06-06
  • Resolved: 2012-06-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b15Fixed
Related Reports
Relates :  
Relates :  
Description
java/util/Timer/KillThread.java fails in fastdebug mode on Solaris with


----------messages:(3/120)----------
command: main KillThread
reason: Assumed action based on file name: run main KillThread 
elapsed time (seconds): 63.846
----------System.out:(0/0)----------
----------System.err:(13/685)----------
java.lang.Exception: We failed silently
	at KillThread.main(KillThread.java:57)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:623)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:713)


originally failed with  -Xcomp -server, but seemed to fail with default options too,
just more intermittent.

Comments
EVALUATION Fixed by CR#6818464.
21-12-2011

SUGGESTED FIX diff --git a/test/java/util/Timer/KillThread.java b/test/java/util/Timer/KillThread.java --- a/test/java/util/Timer/KillThread.java +++ b/test/java/util/Timer/KillThread.java @@ -31,21 +31,27 @@ import java.util.*; public class KillThread { + static Thread tdThread; public static void main (String[] args) throws Exception { + tdThread = null; Timer t = new Timer(); // Start a mean event that kills the timer thread t.schedule(new TimerTask() { public void run() { + tdThread = Thread.currentThread(); throw new ThreadDeath(); } }, 0); // Wait for mean event to do the deed and thread to die. try { + do { Thread.sleep(100); + } while(tdThread == null); } catch(InterruptedException e) { } + tdThread.join(); // Try to start another event try {
11-11-2011

EVALUATION Main thread should wait for the timer thread to be started and then join the thread before attempting the second timer scheduling.
11-11-2011