Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8153270

SIGSEGV in stack walking with Sun Studio Performance Analyzer

XMLWordPrintable

    • svc

      I've recently tried to profile a Java application with the Sun Studio Performance Analyzer on a solaris_x86 machine. The command line I've used was

      collect -j on java -Xcomp <app>

      Profiling failed due to a segmentation fault in what seems to be caused by stack walking:

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0xffff80ff4939ec65, pid=7477, tid=2
      #

      Stack: [0xffff80ffbed4f000,0xffff80ffbee4f000], sp=0xffff80ffbee47b28, free space=994k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C 0xffff80ff4939ec65
      V [libjvm.so+0x1cda89f] int Method::bci_from(unsigned char*)const+0x7f
      V [libjvm.so+0x1cda9a3] int Method::validate_bci_from_bcp(unsigned char*)const+0x63
      V [libjvm.so+0x15ab8bc] bool frame::is_interpreted_frame_valid(JavaThread*)const+0xbc
      V [libjvm.so+0x15a9efa] bool frame::safe_for_sender(JavaThread*)+0x31a
      V [libjvm.so+0x159816a] void forte_fill_call_trace_given_top(JavaThread*,ASGCT_CallTrace*,int,frame)+0x5ba
      V [libjvm.so+0x1598b23] AsyncGetCallTrace+0x243
      C [libcollector.so+0x30905] __collector_ext_jstack_unwind+0x115
      C [libcollector.so+0x3123a] __collector_get_frame_info_walk+0x26a
      C [libcollector.so+0x3e4f8] __collector_getUserCtx+0x28
      C [libcollector.so+0x1f22c] __collector_ext_profile_handler+0x13c
      C [libcollector.so+0x19f3f] collector_sigprof_dispatcher+0x6f
      C [libc.so.1+0x122476] __sighndlr+0x6
      C [libc.so.1+0x115972] call_user_handler+0x2ce
      C [libc.so.1+0x115e1b] sigacthandler+0xdb
      C 0xffffffffffffffff
      V [libjvm.so+0x1edb3b5] char*ResourceArea::allocate_bytes(unsigned long,AllocFailStrategy::AllocFailEnum)+0x185
      V [libjvm.so+0x1d51242] void nmethod::check_all_dependencies(DepChange&)+0x362
      V [libjvm.so+0x13a242f] int CodeCache::mark_for_deoptimization(KlassDepChange&)+0x10f
      V [libjvm.so+0x13a324a] void CodeCache::flush_dependents_on(instanceKlassHandle)+0x6a
      V [libjvm.so+0x1fff88f] void SystemDictionary::add_to_hierarchy(instanceKlassHandle,Thread*)+0x6f
      V [libjvm.so+0x1ffc070] Klass*SystemDictionary::parse_stream(Symbol*,Handle,Handle,ClassFileStream*,const Klass*,GrowableArray<Handle>*,Thread*)+0x390
      V [libjvm.so+0x20a11fc] instanceKlassHandle Unsafe_DefineAnonymousClass_impl(JNIEnv_*,_jclass*,_jbyteArray*,_jobjectArray*,unsigned char**,Thread*)+0x84c
      V [libjvm.so+0x20a179c] Unsafe_DefineAnonymousClass0+0x1fc
      J 1952 java.base@9-internal9-internal (0 bytes) @ 0xffff80ff982f3f31 [0xffff80ff982f3dc0+0x0000000000000171]
      J 2046 C1 java.base@9-internal9-internal (103 bytes) @ 0xffff80ff91432924 [0xffff80ff91432240+0x00000000000006e4]
      J 2097 C1 java.base@9-internal9-internal (106 bytes) @ 0xffff80ff9146de74 [0xffff80ff9146dde0+0x0000000000000094]
      J 2048 C2 java.base@9-internal9-internal (37 bytes) @ 0xffff80ff982fe294 [0xffff80ff982fdf40+0x0000000000000354]
      J 2096 C1 java.base@9-internal9-internal (32 bytes) @ 0xffff80ff9146d88c [0xffff80ff9146d820+0x000000000000006c]
      J 2893 C2 java.base@9-internal9-internal (84 bytes) @ 0xffff80ff983809e4 [0xffff80ff983809a0+0x0000000000000044]
      j java.lang.invoke.BoundMethodHandle$Species_L13.make(Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;\
      Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/invoke/BoundMethodHandle;
      [error occurred during error reporting (printing native stack), id 0xb]

      The problem is reproducable roughly once in 100 runs.

            Unassigned Unassigned
            zmajo Zoltan Majo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: