Duplicate :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
The following program intermittently hangs when run. The hang is "hard", ^C or a simple kill has no effect. Apparently only "kill -9" has any effect on the moribund process. ----------------------------------------------------------------- import java.util.concurrent.*; public class Bug { public static void main(String[] args) throws Throwable { final int threadCount = 10; ThreadPoolExecutor tpe = new ThreadPoolExecutor (threadCount, threadCount, 30, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(2*threadCount)); for (int i = 0; i < threadCount; i++) tpe.submit(new Runnable() { public void run() {}}); tpe.shutdown(); } } ----------------------------------------------------------------- perl -e 'for ($i = 0;; $i++) { print STDERR "$i "; system("/u/martin/ws/mustang/build/solaris-sparc/j2sdk-image/bin/java Bug"); do {print STDERR "$1\n"; exit 1} if $? != 0; }' ----------------------------------------------------------------- When the above is run repeatedly (substitute your own mustang binaries) it eventually hangs forever, only on Solaris. I tried substituting the binaries from the pending hotspot integration for b50, and they greatly reduce the rate of occurrence of the problem, but it persists. Instead of occurring once in app. 30 times, it occurs once in app. 100 times. Hangs have been observed on both solaris-sparc and solaris-i586, both Solaris 9 and Solaris 10.
|