Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.tools.jmap.JMap.runTool(JMap.java:201)
at sun.tools.jmap.JMap.main(JMap.java:130)
Caused by: java.lang.UnsatisfiedLinkError: /usr/local/jdk1.8.0_144/jre/lib/amd64/libsaproc.so: libthread_db.so.1: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.
at sun.jvm.hotspot.HotSpotAgent.setupDebuggerLinux(HotSpotAgent.java:607)
at sun.jvm.hotspot.HotSpotAgent.setupDebugger(HotSpotAgent.java:337)
at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:304)
at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:156)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:191)
at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:83)
... 6 more
libthread_db.so.1在容器内是存在的,但是始终让libsaproc.so找到它的依赖库libthread_db.so.1
[root@iodm-3163159656-31n27 log]# ldd /usr/local/jdk1.8.0_144/jre/lib/amd64/libsaproc.so
linux-vdso.so.1 => (0x00007ffdfd3fe000)
libthread_db.so.1 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007f8c4fd4d000)
/lib64/ld-linux-x86-64.so.2 (0x00007f8c5031e000)