-
Bug
-
Resolution: Fixed
-
P2
-
5.0u12, 5.0u11, 5.0u8, 6
-
b53
-
generic, x86
-
linux, solaris, solaris_10
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2154299 | 5.0u15 | Dmitriy Samersoff | P2 | Closed | Fixed | b01 |
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.
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.
- backported by
-
JDK-2154299 Hard hangs in concurrent code on Solaris and Linux
-
- Closed
-
- duplicates
-
JDK-6601725 1.5.0u12 hang on RHEL ES 4 Update 4 & 5
-
- Closed
-
-
JDK-6650933 A Java process which was hung
-
- Closed
-
- relates to
-
JDK-4764778 Interrupted thread can't load classes from classes directory (sol)
-
- Closed
-
-
JDK-6271298 java.util.concurrent unpark() may reference stale native thread structures
-
- Closed
-