开发库是开发人员修改代码的地方。(开发人员可以随意修改)
受控库是测试版本代码存放的地方。(需要开发组长提交测试申请修改)
产品库是测试通过版本存放的地方。(需要测试报告来驱动修改)
java cpu 100% 无响应
占用cpu高的线程的堆栈如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
Thread 1 (process 17775): #0 0x00007fa870981179 in Klass::subklass() const () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #1 0x00007fa8706d15c5 in Dependencies::find_finalizable_subclass(Klass*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #2 0x00007fa8705df8ee in ciInstanceKlass::has_finalizable_subclass() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #3 0x00007fa87052483e in GraphBuilder::call_register_finalizer() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #4 0x00007fa87052b2a5 in GraphBuilder::method_return(Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #5 0x00007fa87053185f in GraphBuilder::iterate_bytecodes_for_block(int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #6 0x00007fa87052ec4b in GraphBuilder::iterate_all_blocks(bool) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #7 0x00007fa87052f5e6 in GraphBuilder::try_inline_full(ciMethod*, bool, Bytecodes::Code, Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #8 0x00007fa87052f7df in GraphBuilder::try_inline(ciMethod*, bool, Bytecodes::Code, Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #9 0x00007fa870530912 in GraphBuilder::invoke(Bytecodes::Code) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #10 0x00007fa87053183d in GraphBuilder::iterate_bytecodes_for_block(int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #11 0x00007fa87052ec4b in GraphBuilder::iterate_all_blocks(bool) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #12 0x00007fa87052f5e6 in GraphBuilder::try_inline_full(ciMethod*, bool, Bytecodes::Code, Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #13 0x00007fa87052f7df in GraphBuilder::try_inline(ciMethod*, bool, Bytecodes::Code, Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #14 0x00007fa870530912 in GraphBuilder::invoke(Bytecodes::Code) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #15 0x00007fa87053183d in GraphBuilder::iterate_bytecodes_for_block(int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #16 0x00007fa87052ebf2 in GraphBuilder::iterate_all_blocks(bool) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #17 0x00007fa8705337a7 in GraphBuilder::GraphBuilder(Compilation*, IRScope*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #18 0x00007fa87053c127 in IRScope::IRScope(Compilation*, IRScope*, int, ciMethod*, int, bool) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #19 0x00007fa87053c23f in IR::IR(Compilation*, ciMethod*, int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #20 0x00007fa87051b25b in Compilation::build_hir() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #21 0x00007fa87051b61e in Compilation::compile_java_method() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #22 0x00007fa87051b74e in Compilation::compile_method() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #23 0x00007fa87051babe in Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #24 0x00007fa87051c869 in Compiler::compile_method(ciEnv*, ciMethod*, int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #25 0x00007fa87066f43a in CompileBroker::invoke_compiler_on_method(CompileTask*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #26 0x00007fa8706703e6 in CompileBroker::compiler_thread_loop() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #27 0x00007fa870c2386f in JavaThread::thread_main_inner() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #28 0x00007fa870c2399c in JavaThread::run() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #29 0x00007fa870ad7de8 in java_start(Thread*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #30 0x0000003202c079d1 in start_thread () from /lib64/libpthread.so.0 #31 0x00000032028e88fd in clone () from /lib64/libc.so.6 |
gdb 跟进发现:线程在函数Dependencies::find_finalizable_subclass(Klass*) 中,应该有一个循环,不断地调用函数Klass::subklass()
解决办法:
The fix was simple – disable CMS class unloading options when -Xnoclassgc or -XX:-ClassUnloading are specified.
参考资料:
https://blogs.oracle.com/poonam/entry/jvm_hang_with_cms_collector
想阅读jvm源码吗? https://blogs.oracle.com/sundararajan/entry/so_you_want_to_read
可执行文件(ELF)格式的理解
ELF_百度百科
MMU_百度百科
零线和地线如何区分
docker容器中的crond中的任务如何获取环境变量
- 我们可以通过docker create时的-e选项设置环境变量
- crond会清空环境变量
- 如何设置一个cron中能够看到的环境变量呢?
解决办法:
- 指定一个自定义的SHELL ,该shell参考一下自定义的环境变量文件
参考:
linux 之 /proc/$pid/environ
我们知道 linux的 /proc 是一个虚拟的文件系统,而 /proc/$pid/ 下的文件也应该能反映进程的实时状态,但是 /proc/$pid/environ 并不能反映进程实时的环境变量,比如,这里不能体现setenv() 产生的变化,为什么呢?
- 这个是故意为之还是无意为之?
- 如果是故意为之,那么,为什么这么设计?
下面有一篇文章,分析的比较细致,但是没有给出任何的结论:https://codywu2010.wordpress.com/2014/09/14/procfs-environ-explained-in-depth-1/
linux /proc 之comm
进程的comm只有16字节,超长则自动截断,慎重参考
数据库原理名词之候选码,超级码,主码,主属性
若关系中的某一属性或属性组的值能唯一的标识一个元组,而其任何真子集都不能再标识,则称该属性组为(超级码)候选码。
例如:在学生实体中,“学号”是能唯一的区分学生实体的,同时又假设“姓名”、“班级”的属性组合足以区分学生实体,那么{学号}和{姓名,班级}都是(超级码)候选码。
简单的说,候选码(超级码)就是可以被选为主码的属性或属性组。
当一个关系有N个属性或属性组可以唯一标识时,则说明该关系有N个候选码,可以选定其中一个作为主码。
主属性就是包含在任何候选码中的属性;非主属性就是不包含在任何候选码中的属性。