libjvm.so stripped

1. libjvm.so stripped

  即:libjvm.so这个文件被处理过,很多符号调试信息被玻璃了。类似的apache等软件编译时也可以选择是否剥离调试信息。

 

剥离符号信息的意义在于可以减少当前模块的大小,减少加载后占用的内存大小;造成的影响时,jvm crash后,很多符号调试信息都看不到了,分析crash过程变得很复杂。

 

2. 查看libjvm情况:

查看命令:file /opt/.../java/jre/lib/amd64/server/libjvm.so

 

 

     libjvm.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), stripped

 

    没有被stripped的则是not stripped

 

3. libjvm stripped造成的影响会导致attach不上core文件

 

     命令: $jstack java core.24706

Attaching to core core.24706 from executable java, please wait...
Error attaching to core file: Can't attach to the core file
 

4. 查看具体找不到的符号

     详见地址:https://gist.github.com/1525916

 

$ export LIBSAPROC_DEBUG=1
$ jstack -m $JAVA_HOME/bin/java core.11028 
Attaching to core core.11028 from executable /opt/taobao/java/bin/java, please wait...
libsaproc DEBUG: Note header with n_type = 1 and n_descsz = 336
libsaproc DEBUG: got integer regset for lwp 11386
libsaproc DEBUG: integer regset
libsaproc DEBUG:        r15 = 0x2aab79aac1b8
libsaproc DEBUG:        r14 = 0x466290c0
libsaproc DEBUG:        r13 = 0x0
libsaproc DEBUG:        r12 = 0x4a
libsaproc DEBUG:        rbp = 0x46619040
libsaproc DEBUG:        rbx = 0x4a
libsaproc DEBUG:        r11 = 0x2b0418151548
libsaproc DEBUG:        r10 = 0xbc4
libsaproc DEBUG:        r9 = 0x2aaaca680f48
libsaproc DEBUG:        r8 = 0x46619070
libsaproc DEBUG:        rax = 0x2b04181446a0
libsaproc DEBUG:        rcx = 0x4a
libsaproc DEBUG:        rdx = 0x0
libsaproc DEBUG:        rsi = 0x466290c0
libsaproc DEBUG:        rdi = 0x2aab79aac000
libsaproc DEBUG:        orig_rax = 0xffffffffffffffff
libsaproc DEBUG:        rip = 0x2b0417c60971
libsaproc DEBUG:        cs = 0xe033
libsaproc DEBUG:        eflags = 0x10206
libsaproc DEBUG:        rsp = 0x46618fc0
libsaproc DEBUG:        ss = 0xe02b
libsaproc DEBUG:        fs_base = 0x0
libsaproc DEBUG:        gs_base = 0x0
libsaproc DEBUG:        ds = 0x0
libsaproc DEBUG:        es = 0x0
libsaproc DEBUG:        fs = 0x63
libsaproc DEBUG:        gs = 0x0
libsaproc DEBUG: Note header with n_type = 3 and n_descsz = 136
libsaproc DEBUG: Note header with n_type = 6 and n_descsz = 256
libsaproc DEBUG: Note header with n_type = 1 and n_descsz = 336
libsaproc DEBUG: got integer regset for lwp 12741
libsaproc DEBUG: integer regset
libsaproc DEBUG:        r15 = 0x2aab7a5db000
libsaproc DEBUG:        r14 = 0x2aab7a5db000
...
libsaproc DEBUG: base = 0x7fffbaa67000  size = 86016
libsaproc DEBUG: lookup failed for symbol 'UseSharedSpaces' in obj '/opt/taobao/install/jdk-1.6.0_17/jre/lib/amd64/server/libjvm.so'
libsaproc DEBUG: can't lookup 'UseSharedSpaces' flag
Error attaching to core file: Can't attach to the core file
$ 
 

 

 

 

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值