Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2022127 | 1.2.0 | Gordon Hirsch | P3 | Resolved | Fixed | 1.2fcs |
Name: mf23781 Date: 08/03/98
To reproduce the problem simply do the following once you
have compiled the attached test case:
jdb J8_3_D1
stop in J8_3_D1.main
run
next
step
step
stop at J8_3_C3:41
cont
next
next
.
.
.
Will eventually freeze jdb.
Test case:
public class J8_3_D1
{
public void f2()
{
J8_3_C3 o1 = new J8_3_C3();
J8_3_C4 o2 = new J8_3_C4();
o1.start();
o2.start();
}
public static void main( String [] args )
{
J8_3_D1 o = new J8_3_D1();
o.f2();
}
}
class J8_3_C2
{
static volatile int i=0, j=0;
public static void f1() { i++; j++; }
public static void f2()
{
System.out.println("i="+i+" j="+j);
}
}
class J8_3_C3 extends Thread
{
J8_3_C2 o = new J8_3_C2();
public void run()
{
while (o.i<1000000)
{
o.f1();
}
}
}
class J8_3_C4 extends Thread
{
J8_3_C2 o = new J8_3_C2();
public void run()
{
while (o.i<1000000)
{
o.f2();
}
}
}
The outputs on 1.1.6, 1.1.7 and 1.2beta4 vary but sample ones are
included below:
Against 1.1.6:
jdb J8_3_D1
Initializing jdb...
Warning: JIT compiler "symcjit" not found. Will use interpreter.
Warning: JIT compiler "symcjit" not found. Will use interpreter.
0xf8fb68:class(J8_3_D1)
> stop in J8_3_D1.main
Breakpoint set in J8_3_D1.main
> run
run J8_3_D1
running ...
main[1]
Breakpoint hit: J8_3_D1.main (J8_3_D1:17)
main[1] next
main[1]
Breakpoint hit: J8_3_D1.main (J8_3_D1:18)
main[1] step
main[1]
Breakpoint hit: J8_3_D1.f2 (J8_3_D1:8)
main[1] step
main[1]
Breakpoint hit: J8_3_C3.<init> (J8_3_C3:33)
main[1] stop at J8_3_C3:41
Breakpoint set at J8_3_C3:41
main[1] cont
main[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-96[1] next
Thread-96[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-96[1] next
Thread-96[1] i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-96[1] next
Thread-96[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-96[1] next
Thread-96[1] i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
i=2 j=2
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-96[1] next
Thread-96[1] next
Then jdb hangs. Doens't always hang at the same point.
Against 1.1.7:
jdb J8_3_D1
Initializing jdb...
0xf8ff70:class(J8_3_D1)
> stop in J8_3_D1.main
Breakpoint set in J8_3_D1.main
> run
run J8_3_D1
running ...
main[1]
Breakpoint hit: J8_3_D1.main (J8_3_D1:17)
main[1] next
main[1]
Breakpoint hit: J8_3_D1.main (J8_3_D1:18)
main[1] step
main[1]
Breakpoint hit: J8_3_D1.f2 (J8_3_D1:8)
main[1] step
main[1]
Breakpoint hit: J8_3_C3.<init> (J8_3_C3:33)
main[1] stop at J8_3_C3:41
Breakpoint set at J8_3_C3:41
main[1] cont
main[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-95[1] next
Thread-95[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-95[1] next
Thread-95[1] i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
i=1 j=1
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-95[1] next
Thread-95[1] next
Then jdb hangs. Again jdb doesn't always hang at the same point though.
Against 1.2beta4:
jdb J8_3_D1
Initializing jdb...
0x9e:class(J8_3_D1)
> stop in J8_3_D1.main
Breakpoint set in J8_3_D1.main
> run
run J8_3_D1
running ...
main[1]
Breakpoint hit: J8_3_D1.main (J8_3_D1:17)
main[1] next
main[1]
Breakpoint hit: J8_3_D1.main (J8_3_D1:18)
main[1] step
main[1]
Breakpoint hit: J8_3_D1.f2 (J8_3_D1:8)
main[1] step
main[1]
Breakpoint hit: J8_3_C3.<init> (J8_3_C3:33)
main[1] stop at J8_3_C3:41
Breakpoint set at J8_3_C3:41
main[1] cont
main[1]
Current thread "main" died. Execution continuing...
>
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-1[1] next
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-1[1] Thread-1[1] next
Thread-1[1]
Breakpoint hit: J8_3_C3.run (J8_3_C3:39)
Thread-1[1] next
Breakpoint hit: J8_3_C3.run (J8_3_C3:41)
Thread-1[1] Thread-1[1] next
Thread-1[1] i=13 j=13
i=13 j=13next
This again hangs jdb after a random period of time.
======================================================================
- backported by
-
JDK-2022127 Step debugging thread seems to hang debugger
-
- Resolved
-
- duplicates
-
JDK-4173308 Debugger hangs on handling the interrupted exception
-
- Closed
-
-
JDK-4162762 Debugger hangs on handling the interrupted exception
-
- Closed
-
- relates to
-
JDK-4123677 Timing dependent exceptions in println-heavy multi-threaded application
-
- Closed
-