-
Bug
-
Resolution: Fixed
-
P3
-
20, 21, 22, 23, 24
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8336127 | 23.0.1 | Coleen Phillimore | P3 | Resolved | Fixed | b03 |
JDK-8335189 | 23 | Coleen Phillimore | P3 | Resolved | Fixed | b30 |
JDK-8335546 | 21.0.5-oracle | Coleen Phillimore | P3 | Resolved | Fixed | b01 |
JDK-8336725 | 21.0.5 | Matthias Baesken | P3 | Resolved | Fixed | b01 |
- use the code:
class A {
static void foo(int k) {
if (k == 2) {
System.out.println("HIT = " + k); // set breakpoint here
}
}
}
public class HelloWorld {
public static void main(String[] args) throws InterruptedException {
System.out.println("Start");
for (int i = 1; i <= 100; i++) {
int k = i;
Thread t = new Thread(() -> {
System.out.println("i = " + k);
A.foo(k);
});
t.start();
}
Thread.sleep(2000);
System.out.println("Finish");
}
}
- compile
- use jdb to set a breakpoint and run:
>jdb HelloWorld
Initializing jdb ...
> stop at A:4
Deferring breakpoint A:4.
It will be set after the class is loaded.
> run
run HelloWorld
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started: Start
i = 21
i = 45
i = 11
i = 16
i = 23
i = 7
i = 51
i = 39
i = 20
i = 40
i = 31
i = 5
i = 6
i = 4
i = 41
i = 53
i = 9
i = 2
i = 13
i = 1
i = 3
i = 15
i = 22
HIT = 2
i = 10
i = 8
i = 14
i = 12
i = 17
i = 52
i = 19
i = 24
i = 44
i = 18
i = 55
i = 25
i = 56
i = 26
i = 34
i = 43
i = 37
i = 33
i = 28
i = 30
i = 32
i = 35
i = 38
i = 27
i = 47
i = 49
i = 59
i = 60
i = 48
i = 62
i = 54
i = 58
i = 64
i = 67
i = 68
i = 70
i = 73
i = 69
i = 29
i = 75
i = 77
i = 76
i = 74
i = 84
i = 81
i = 80
i = 85
i = 36
i = 86
i = 87
i = 91
i = 93
i = 92
i = 95
i = 99
i = 90
i = 96
Set deferred breakpoint A:4
i = 46
i = 61
i = 42
i = 50
i = 57
i = 63
i = 65
i = 66
i = 71
i = 72
i = 79
i = 78
i = 83
i = 82
i = 88
i = 89
i = 94
i = 98
i = 97
i = 100
Finish
The application exited
The breakpoint is fully skipped.
This was working in version before 20.
- backported by
-
JDK-8335189 Breakpoint in parallel code does not work
- Resolved
-
JDK-8335546 Breakpoint in parallel code does not work
- Resolved
-
JDK-8336127 Breakpoint in parallel code does not work
- Resolved
-
JDK-8336725 Breakpoint in parallel code does not work
- Resolved
- relates to
-
JDK-8288064 Class initialization locking
- Resolved
-
JDK-8338447 Remove InstanceKlass::_is_marked_dependent
- Resolved
-
JDK-8335134 Test com/sun/jdi/BreakpointOnClassPrepare.java timeout
- Resolved
-
JDK-8337622 IllegalArgumentException in java.lang.reflect.Field.get
- Resolved
- links to
-
Commit openjdk/jdk/7040de19
-
Commit openjdk/jdk/b3bf31a0
-
Commit(master) openjdk/jdk21u-dev/69aab6ae
-
Review openjdk/jdk/19755
-
Review openjdk/jdk/19938
-
Review(master) openjdk/jdk21u-dev/823