[jdk11u-dev] RFR: 8181313: SA: Remove libthread_db dependency on Linux
Severin Gehwolf
sgehwolf at openjdk.java.net
Wed Jun 16 09:00:55 UTC 2021
This backport fixes tier1 test failures in the serviceability area for systems using glibc 2.33. On those system attaching to a different process doesn't work currently:
$ export LIBSAPROC_DEBUG=true
$ jhsdb clhsdb --pid 148082
Attaching to process 148082, please wait...
libsaproc DEBUG: lookup failed for symbol 'nptl_version' in obj 'libpthread.so.0'
libsaproc DEBUG: can't create libthread_db agent
libsaproc DEBUG: lookup failed for symbol '__vt_10JavaThread' in obj 'libjvm.so'
libsaproc DEBUG: lookup failed for symbol '__vt_10JavaThread' in obj 'libjvm.so'
Warning: Nashorn engine is planned to be removed from a future JDK release
javax.script.ScriptException: TypeError: sapkg.runtime.VM.getVM is not a function in sa.js at line number 54
javax.script.ScriptException: TypeError: sapkg.runtime.VM.getVM is not a function in sa.js at line number 54
Warning! JS Engine can't start, some commands will not be available.
hsdb> threads
148099 Common-Cleaner
State: BLOCKED
libsaproc DEBUG: ptrace(PTRACE_GETREGS, ...) failed for lwp 148099
Error: sun.jvm.hotspot.debugger.DebuggerException: sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp
hsdb>
See also this related gdb bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=27526
The proposal is to remove the need of thread_db entirely as it's not need (which brings JDK 11) in line with JDK 17+
The patch didn't apply cleanly. Conflicts where only in copyright headers.
Testing:
- [x] tier1 on Linux x86_64 with glibc 2.33 (fails prior, passes after patch).
Thoughts?
-------------
Commit messages:
- Backport ef3336ec27665397783550ec880e1bc6b711a247
Changes: https://git.openjdk.java.net/jdk11u-dev/pull/34/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk11u-dev&pr=34&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8181313
Stats: 177 lines in 9 files changed: 7 ins; 129 del; 41 mod
Patch: https://git.openjdk.java.net/jdk11u-dev/pull/34.diff
Fetch: git fetch https://git.openjdk.java.net/jdk11u-dev pull/34/head:pull/34
PR: https://git.openjdk.java.net/jdk11u-dev/pull/34
More information about the jdk-updates-dev
mailing list