Details
-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b23
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8324435 | 17.0.11 | Ludovic Henry | P4 | Resolved | Fixed | b01 |
JDK-8326918 | 11.0.24 | Gui Cao | P4 | Resolved | Fixed | b01 |
Description
The code of `ps_proc.c::process_get_lwp_regs` [2] try to use `PTRACE_GETREGS` first, and `PTRACE_GETREGSET` is a second option. It leads the `process_get_lwp_regs` fails at some special ENVs. In my local riscv-linux env, several tests failed.
The failed test is shown below:
```
serviceability/sa/ClhsdbCDSJstackPrintAll.java
serviceability/sa/ClhsdbDumpheap.java
serviceability/sa/ClhsdbFindPC.java#no-xcomp-process
serviceability/sa/ClhsdbJdis.java
serviceability/sa/ClhsdbJstack.java#id1
serviceability/sa/ClhsdbPrintAs.java
serviceability/sa/ClhsdbSource.java
serviceability/sa/ClhsdbThreadContext.java
serviceability/sa/ClhsdbWhere.java
serviceability/sa/TestClhsdbJstackLock.java
serviceability/sa/TestJhsdbJstackLock.java
```
The log of the failed test `serviceability/sa/ClhsdbCDSJstackPrintAll.java`:
```
java.lang.RuntimeException: Test ERROR java.lang.RuntimeException: 'LingeredApp.steadyState' missing from stdout/stderr
at ClhsdbCDSJstackPrintAll.main(ClhsdbCDSJstackPrintAll.java:117)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.RuntimeException: 'LingeredApp.steadyState' missing from stdout/stderr
at jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:340)
at ClhsdbLauncher.runCmd(ClhsdbLauncher.java:166)
at ClhsdbLauncher.run(ClhsdbLauncher.java:203)
at ClhsdbCDSJstackPrintAll.main(ClhsdbCDSJstackPrintAll.java:113)
... 4 more
JavaTest Message: Test threw exception: java.lang.RuntimeException: Test ERROR java.lang.RuntimeException: 'LingeredApp.steadyState' missing from stdout/stderr
```
[1] https://man7.org/linux/man-pages/man2/ptrace.2.html
[2] https://github.com/openjdk/jdk/blob/5d6cce0f8543e8ae966798aad685b190cc8101aa/src/jdk.hotspot.agent/linux/native/libsaproc/ps_proc.c#L148
Attachments
Issue Links
- backported by
-
JDK-8324435 Prefer to PTRACE_GETREGSET instead of PTRACE_GETREGS in method 'ps_proc.c::process_get_lwp_regs'
- Resolved
-
JDK-8326918 Prefer to PTRACE_GETREGSET instead of PTRACE_GETREGS in method 'ps_proc.c::process_get_lwp_regs'
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/0e94be62
-
Commit openjdk/jdk17u-dev/81624250
-
Commit openjdk/jdk/2f1c6548
-
Review openjdk/jdk11u-dev/2549
-
Review openjdk/jdk17u-dev/2152
-
Review openjdk/jdk/13939