xmt@server005:/tmp/hsperfdata_xmt$ jps 130257 MyDeadLock 130413 Jps xmt@server005:/tmp/hsperfdata_xmt$ jstack -l 130257 2017-10-3014:45:07 Full thread dump OpenJDK 64-Bit Server VM(24.91-b01 mixed mode): "Attach Listener" daemon prio=10 tid=0x00007f0b8c001000 nid=0x1fd6c waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None "DestroyJavaVM" prio=10 tid=0x00007f0c6400a000 nid=0x1fcd2 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None "2" prio=10 tid=0x00007f0c64130000 nid=0x1fd02 waiting for monitor entry [0x00007f0bf8ada000] java.lang.Thread.State: BLOCKED (on object monitor) at MyDeadLock$MyRunnable.run(MyDeadLock.java:42) - waiting to lock <0x00000006b0f51b18> (a java.lang.Object) - locked <0x00000006b0f51b28> (a java.lang.Object) at java.lang.Thread.run(Thread.java:745) Locked ownable synchronizers: - None "1" prio=10 tid=0x00007f0c6412e000 nid=0x1fd01 waiting for monitor entry [0x00007f0bf8bdb000] java.lang.Thread.State: BLOCKED (on object monitor) at MyDeadLock$MyRunnable.run(MyDeadLock.java:30) - waiting to lock <0x00000006b0f51b28> (a java.lang.Object) - locked <0x00000006b0f51b18> (a java.lang.Object) at java.lang.Thread.run(Thread.java:745)
Locked ownable synchronizers: - None ... Found one Java-level deadlock: ============================= "2": waiting to lock monitor 0x00007f0b900062c8 (object 0x00000006b0f51b18, a java.lang.Object), which is held by "1" "1": waiting to lock monitor 0x00007f0b90004e28 (object 0x00000006b0f51b28, a java.lang.Object), which is held by "2" Java stack information for the threads listed above: =================================================== "2": at MyDeadLock$MyRunnable.run(MyDeadLock.java:42) - waiting to lock <0x00000006b0f51b18> (a java.lang.Object) - locked <0x00000006b0f51b28> (a java.lang.Object) at java.lang.Thread.run(Thread.java:745) "1": at MyDeadLock$MyRunnable.run(MyDeadLock.java:30) - waiting to lock <0x00000006b0f51b28> (a java.lang.Object) - locked <0x00000006b0f51b18> (a java.lang.Object) at java.lang.Thread.run(Thread.java:745) Found 1 deadlock.
JVM 常见参数
选项
描述
-XX:+TraceClassLoading
打印类加载日志,别名 -verbose:class
-Xms
初始堆大小。如:-Xms256m
-Xmx
最大堆大小。如:-Xmx512m
-Xmn
新生代大小。通常为最大堆的 1/3 或 1/4。新生代 = Eden + 2 个 Survivor 空间。实际可用空间为 = Eden + From,即 90% 的空间
xmt@server005:~/$ javadoc -d mydoc annotation.subdir Creating destination directory: "mydoc/" Loading source files for package annotation.subdir... Constructing Javadoc information... Standard Doclet version 1.7.0_91 Building tree for all the packages and classes... Generating mydoc/annotation/subdir/Testable.html... Generating mydoc/annotation/subdir/TestJavaDoc.html... Generating mydoc/annotation/subdir/package-frame.html... Generating mydoc/annotation/subdir/package-summary.html... Generating mydoc/annotation/subdir/package-tree.html... Generating mydoc/constant-values.html... Building index for all the packages and classes... Generating mydoc/overview-tree.html... Generating mydoc/index-all.html... Generating mydoc/deprecated-list.html... Building index for all classes... Generating mydoc/allclasses-frame.html... Generating mydoc/allclasses-noframe.html... Generating mydoc/index.html... Generating mydoc/help-doc.html...