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

JVM crashes with # Problematic frame: # V [libjvm.so+0x3df610] Method::access_flags() const+0xc | OpenJDK 8u272

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      ADDITIONAL SYSTEM INFORMATION :
      OS: Windows 10 / RHEL7.7
      Java: 8u271

      A DESCRIPTION OF THE PROBLEM :
      The JVM could crash on the debug build.
      The CodeCahe::print_internals() function checks is_native_method about nmethod,
      but the _method variable could be NULL when class is unloaded.
      In that case, it refers to a NULL pointer and causes an access violation.
      Not only is_native_method function but also is_java_method function has the same problem.

      This problem was fixed at JDK-8029799, but the fix is not enough.
      It should be fix by applying the implementation of compiledMethod.hpp of JDK9 to nmethod.hpp of JDK8.

      JDK-8029799
      - if(nm->is_native_method()) { nmethodNative++; }
      + if(nm->method() != NULL && nm->is_native_method()) { nmethodNative++; }

      JDK-8151956 (the first commit for compiledMethod.hpp)
      - bool is_java_method() const { return !method()->is_native(); }
      - bool is_native_method() const { return method()->is_native(); }
      + bool is_native_method() const { return _method != NULL && _method->is_native(); }

      + bool is_java_method() const { return _method != NULL && !_method->is_native(); }

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. build hotspot with debug enabled
      2. run java process with -XX:+PrintCodeCache2 option
      3. execute the jit compile and unload the compiled classes

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      CodeCache is printed without JVM crashing.
      ACTUAL -
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00007f5316e1b610, pid=20322, tid=0x00007f5318cbc700
      #
      # JRE version: OpenJDK Runtime Environment (8.0_272-b09) (build 1.8.0_272-2020-10-19-Fujitsu-B01-b09)
      # Java VM: OpenJDK 64-Bit Server VM (25.71-b01-internal-debug mixed mode linux-amd64 compressed oops)
      # Problematic frame:
      # V [libjvm.so+0x3df610] Method::access_flags() const+0xc
      #
      # Core dump written. Default location: /tmp/bugreport/core or core.20322
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/bugreport/crash.jsp
      #

      --------------- T H R E A D ---------------

      Current thread (0x00007f531000b800): JavaThread "DestroyJavaVM" [_thread_in_vm, id=20323, stack(0x00007f5318bbd000,0x00007f5318cbd000)]

      siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000028

      Registers:
      RAX=0x0000000000000000, RBX=0x0000000000000001, RCX=0x0000000000000006, RDX=0x00007f5317530800
      RSP=0x00007f5318cbbae0, RBP=0x00007f5318cbbae0, RSI=0x00007f530122d800, RDI=0x0000000000000000
      R8 =0x0000000000000000, R9 =0x00007f53100237f0, R10=0x0000000000000330, R11=0x0000000000000286
      R12=0x00007f5310199ac8, R13=0x00007f531000d488, R14=0x00007f531000d460, R15=0x00007f531000d458
      RIP=0x00007f5316e1b610, EFLAGS=0x0000000000010206, CSGSFS=0x0000000000000033, ERR=0x0000000000000004
        TRAPNO=0x000000000000000e

      Top of Stack: (sp=0x00007f5318cbbae0)
      0x00007f5318cbbae0: 00007f5318cbbb10 00007f5316e1b82a
      0x00007f5318cbbaf0: 00007f5318cbbb10 0000000000000000
      0x00007f5318cbbb00: 00007f530122d0d0 00007f530122d810
      0x00007f5318cbbb10: 00007f5318cbbb30 00007f5316f67588
      0x00007f5318cbbb20: 00007f530122d0d0 00007f530122d810
      0x00007f5318cbbb30: 00007f5318cbbc80 00007f531702389c
      0x00007f5318cbbb40: 00007f5318cbbb60 00007f5316e1ea7c
      0x00007f5318cbbb50: 00007f5318cbbb90 00007f5316e3d2be
      0x00007f5318cbbb60: 0000000000000000 00007f5310007368
      0x00007f5318cbbb70: 0000000000000000 00007f5318cbbbc0
      0x00007f5318cbbb80: 00007f5317f968f0 00007f531000c430
      0x00007f5318cbbb90: 00007f531000a190 00007f531000a1b0
      0x00007f5318cbbba0: 00007f531000a588 00000000000003d8
      0x00007f5318cbbbb0: 00007f531000b800 0000000000000000
      0x00007f5318cbbbc0: 0000003d00000003 0000000100000192
      0x00007f5318cbbbd0: 0000000b00000001 00000002000001e3
      0x00007f5318cbbbe0: 0000000100000002 0000000200000000
      0x00007f5318cbbbf0: 000008a000000000 00007f530122d810
      0x00007f5318cbbc00: 00007f531000b800 00007f5310007360
      0x00007f5318cbbc10: 00007f530122d810 00007f531751df83
      0x00007f5318cbbc20: 00007f531000b800 00007f5310007360
      0x00007f5318cbbc30: 00007f5318cbbc50 00007f531751dfa9
      0x00007f5318cbbc40: 00007f5316ca4b3a 00007f5310007360
      0x00007f5318cbbc50: 00007f5318cbbc80 00007f5316e5dda2
      0x00007f5318cbbc60: 00007f5300000000 0000000100000010
      0x00007f5318cbbc70: 00007f5310007360 0000000000000001
      0x00007f5318cbbc80: 00007f5318cbbcd0 00007f53172c54f6
      0x00007f5318cbbc90: 00007f5317f974d0 00007f5310007360
      0x00007f5318cbbca0: 00007f5318cbbcc0 00007f5317564237
      0x00007f5318cbbcb0: 0000000000000001 0000004100000000
      0x00007f5318cbbcc0: 00007f5318cbbcd0 00007f5317559401
      0x00007f5318cbbcd0: 00007f5318cbbd70 00007f53172c596a

      Instructions: (pc=0x00007f5316e1b610)
      0x00007f5316e1b5f0: c3 90 55 48 89 e5 48 89 7d f8 48 8b 45 f8 48 8b
      0x00007f5316e1b600: 40 10 c9 c3 55 48 89 e5 48 89 7d f8 48 8b 45 f8
      0x00007f5316e1b610: 8b 40 28 c9 c3 90 55 48 89 e5 48 83 ec 08 48 89
      0x00007f5316e1b620: 7d f8 48 8b 45 f8 48 89 c7 e8 c4 ff ff ff 48 89

      Register to memory mapping:

      RAX=0x0000000000000000 is an unknown value
      RBX=0x0000000000000001 is an unknown value
      RCX=0x0000000000000006 is an unknown value
      RDX=0x00007f5317530800: <offset 0xaf4800> in /tmp/openjdk8orgdebug/jre/lib/amd64/server/libjvm.so at 0x00007f5316a3c000
      RSP=0x00007f5318cbbae0 is pointing into the stack for thread: 0x00007f531000b800
      RBP=0x00007f5318cbbae0 is pointing into the stack for thread: 0x00007f531000b800
      RSI=0x00007f530122d800 is an unknown value
      RDI=0x0000000000000000 is an unknown value
      R8 =0x0000000000000000 is an unknown value
      R9 =0x00007f53100237f0 is an unknown value
      R10=0x0000000000000330 is an unknown value
      R11=0x0000000000000286 is an unknown value
      R12=0x00007f5310199ac8 is an unknown value
      R13=0x00007f531000d488 is an unknown value
      R14=0x00007f531000d460 is an unknown value
      R15=0x00007f531000d458 is an unknown value


      Stack: [0x00007f5318bbd000,0x00007f5318cbd000], sp=0x00007f5318cbbae0, free space=1018k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x3df610] Method::access_flags() const+0xc
      V [libjvm.so+0x3df82a] Method::is_native() const+0x18
      V [libjvm.so+0x52b588] nmethod::is_native_method() const+0x20
      V [libjvm.so+0x5e789c] CodeCache::print_internals()+0x2c0
      V [libjvm.so+0x8894f6] print_statistics()+0x378
      V [libjvm.so+0x88996a] before_exit(JavaThread*)+0x284
      V [libjvm.so+0xca8983] Threads::destroy_vm()+0x127
      V [libjvm.so+0x8ceb63] jni_DestroyJavaVM+0x138
      C [libjli.so+0x84b8] JavaMain+0x598
      C [libpthread.so.0+0x7ea5] start_thread+0xc5


      --------------- P R O C E S S ---------------

      Java Threads: ( => current thread )
      =>0x00007f531000b800 JavaThread "DestroyJavaVM" [_thread_in_vm, id=20323, stack(0x00007f5318bbd000,0x00007f5318cbd000)]
        0x00007f5310163000 JavaThread "Service Thread" daemon [_thread_blocked, id=20333, stack(0x00007f52fe916000,0x00007f52fea17000)]
        0x00007f5310157000 JavaThread "C1 CompilerThread1" daemon [_thread_blocked, id=20332, stack(0x00007f52fea18000,0x00007f52feb18000)]
        0x00007f5310153800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=20331, stack(0x00007f52feb19000,0x00007f52fec19000)]
        0x00007f531010d000 JavaThread "Finalizer" daemon [_thread_blocked, id=20329, stack(0x00007f52fed1a000,0x00007f52fee1b000)]
        0x00007f5310103800 JavaThread "Reference Handler" daemon [_thread_blocked, id=20328, stack(0x00007f52fee1b000,0x00007f52fef1c000)]

      Other Threads:
        0x00007f53100f8800 VMThread [stack: 0x00007f52fef1d000,0x00007f52ff01d000] [id=20327]

      VM state:not at safepoint (normal execution)

      VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
      [0x00007f5310007360] CodeCache_lock - owner thread: 0x00007f531000b800

      heap address: 0x00000000c6400000, size: 924 MB, Compressed Oops mode: 32-bit
      Narrow klass base: 0x0000000000000000, Narrow klass shift: 3
      Compressed class space size: 1073741824 Address: 0x0000000100000000

      Heap:
       PSYoungGen total 17408K, used 9623K [0x00000000ecc00000, 0x00000000edf00000, 0x0000000100000000)
        eden space 15360K, 49% used [0x00000000ecc00000,0x00000000ed36dc20,0x00000000edb00000)
        from space 2048K, 98% used [0x00000000edb00000,0x00000000edcf8020,0x00000000edd00000)
        to space 2048K, 0% used [0x00000000edd00000,0x00000000edd00000,0x00000000edf00000)
       ParOldGen total 39936K, used 1320K [0x00000000c6400000, 0x00000000c8b00000, 0x00000000ecc00000)
        object space 39936K, 3% used [0x00000000c6400000,0x00000000c654a000,0x00000000c8b00000)
       Metaspace used 12734K, capacity 16490K, committed 16768K, reserved 1060864K
        class space used 3811K, capacity 4386K, committed 4480K, reserved 1048576K

      Card table byte_map: [0x00007f5315739000,0x00007f5315908000] byte_map_base: 0x00007f5315107000

      Marking Bits: (ParMarkBitMap*) 0x00007f5318076120
       Begin Bits: [0x00007f52ff320000, 0x00007f5300190000)
       End Bits: [0x00007f5300190000, 0x00007f5301000000)

      Polling page: 0x00007f5318cd5000

      CodeCache: size=245760Kb used=9740Kb max_used=9740Kb free=236019Kb
       bounds [0x00007f5301000000, 0x00007f5301990000, 0x00007f5310000000]
       total_blobs=4694 nmethods=4188 adapters=427
       compilation: enabled

      Compilation events (10 events):
      Event: 48.701 Thread 0x00007f5310157000 4885 1 Foo1::foo (5 bytes)
      Event: 48.702 Thread 0x00007f5310157000 nmethod 4885 0x00007f5301984190 code [0x00007f5301984300, 0x00007f5301984438]
      Event: 48.702 Thread 0x00007f5310157000 4886 1 Foo2::foo (5 bytes)
      Event: 48.703 Thread 0x00007f5310157000 nmethod 4886 0x00007f53019844d0 code [0x00007f5301984640, 0x00007f5301984778]
      Event: 48.704 Thread 0x00007f5310157000 4887 1 Foo3::foo (5 bytes)
      Event: 48.705 Thread 0x00007f5310157000 nmethod 4887 0x00007f5301984810 code [0x00007f5301984980, 0x00007f5301984ab8]
      Event: 48.705 Thread 0x00007f5310157000 4888 1 Foo4::foo (5 bytes)
      Event: 48.706 Thread 0x00007f5310157000 nmethod 4888 0x00007f5301984b50 code [0x00007f5301984cc0, 0x00007f5301984df8]
      Event: 48.715 Thread 0x00007f5310157000 4889 % 3 SomeClass::<clinit> @ 49 (72 bytes)
      Event: 48.744 Thread 0x00007f5310157000 nmethod 4889% 0x00007f5301984e90 code [0x00007f5301985220, 0x00007f53019868f0]

      GC Heap History (2 events):
      Event: 29.861 GC heap before
      {Heap before GC invocations=1 (full 0):
       PSYoungGen total 17408K, used 15360K [0x00000000ecc00000, 0x00000000edf00000, 0x0000000100000000)
        eden space 15360K, 100% used [0x00000000ecc00000,0x00000000edb00000,0x00000000edb00000)
        from space 2048K, 0% used [0x00000000edd00000,0x00000000edd00000,0x00000000edf00000)
        to space 2048K, 0% used [0x00000000edb00000,0x00000000edb00000,0x00000000edd00000)
       ParOldGen total 39936K, used 0K [0x00000000c6400000, 0x00000000c8b00000, 0x00000000ecc00000)
        object space 39936K, 0% used [0x00000000c6400000,0x00000000c6400000,0x00000000c8b00000)
       Metaspace used 9321K, capacity 12464K, committed 12544K, reserved 1058816K
        class space used 2633K, capacity 3044K, committed 3072K, reserved 1048576K
      Event: 30.064 GC heap after
      Heap after GC invocations=1 (full 0):
       PSYoungGen total 17408K, used 2016K [0x00000000ecc00000, 0x00000000edf00000, 0x0000000100000000)
        eden space 15360K, 0% used [0x00000000ecc00000,0x00000000ecc00000,0x00000000edb00000)
        from space 2048K, 98% used [0x00000000edb00000,0x00000000edcf8020,0x00000000edd00000)
        to space 2048K, 0% used [0x00000000edd00000,0x00000000edd00000,0x00000000edf00000)
       ParOldGen total 39936K, used 1320K [0x00000000c6400000, 0x00000000c8b00000, 0x00000000ecc00000)
        object space 39936K, 3% used [0x00000000c6400000,0x00000000c654a000,0x00000000c8b00000)
       Metaspace used 9321K, capacity 12464K, committed 12544K, reserved 1058816K
        class space used 2633K, capacity 3044K, committed 3072K, reserved 1048576K
      }

      Deoptimization events (1 events):
      Event: 30.066 Thread 0x00007f531000b800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00007f53013c4734 method=java.lang.ref.SoftReference.get()Ljava/lang/Object; @ 17

      Classes redefined (0 events):
      No events

      Internal exceptions (2 events):
      Event: 0.262 Thread 0x00007f531000b800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.defineClass(Ljava/lang/String;[BII)Ljava/lang/Class; name or signature does not match> (0x00000000ecc07cc0) thrown at [/tmp/hotspot_openjdkorg/hotspot/src/share/vm/prims/jni.cpp, li
      Event: 0.262 Thread 0x00007f531000b800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.prefetchRead(Ljava/lang/Object;J)V name or signature does not match> (0x00000000ecc07fa8) thrown at [/tmp/hotspot_openjdkorg/hotspot/src/share/vm/prims/jni.cpp, line 4014]

      Events (10 events):
      Event: 48.684 loading class Foo3 done
      Event: 48.687 loading class Foo4
      Event: 48.687 loading class Foo4 done
      Event: 48.709 Thread 0x00007f531000b800 Thread exited: 0x00007f531000b800
      Event: 48.709 Thread 0x00007f531000b800 Thread added: 0x00007f531000b800
      Event: 48.709 loading class java/lang/Shutdown
      Event: 48.710 loading class java/lang/Shutdown done
      Event: 48.712 loading class java/lang/Shutdown$Lock
      Event: 48.713 loading class java/lang/Shutdown$Lock done
      Event: 48.736 Thread 0x00007f5310151000 Thread exited: 0x00007f5310151000


      Dynamic libraries:
      c6400000-c8b00000 rw-p 00000000 00:00 0
      c8b00000-ecc00000 ---p 00000000 00:00 0
      ecc00000-edf00000 rw-p 00000000 00:00 0
      edf00000-100000000 ---p 00000000 00:00 0
      100000000-100460000 rw-p 00000000 00:00 0
      100460000-140000000 ---p 00000000 00:00 0
      5620db112000-5620db113000 r-xp 00000000 fd:01 77318524 /tmp/openjdk8orgdebug/bin/java
      5620db312000-5620db313000 r--p 00000000 fd:01 77318524 /tmp/openjdk8orgdebug/bin/java
      5620db313000-5620db314000 rw-p 00001000 fd:01 77318524 /tmp/openjdk8orgdebug/bin/java
      5620db5f2000-5620db613000 rw-p 00000000 00:00 0 [heap]
      7f52cc000000-7f52cc021000 rw-p 00000000 00:00 0
      7f52cc021000-7f52d0000000 ---p 00000000 00:00 0
      7f52d0000000-7f52d0021000 rw-p 00000000 00:00 0
      7f52d0021000-7f52d4000000 ---p 00000000 00:00 0
      7f52d4000000-7f52d484a000 rw-p 00000000 00:00 0
      7f52d484a000-7f52d8000000 ---p 00000000 00:00 0
      7f52d8000000-7f52d8bb3000 rw-p 00000000 00:00 0
      7f52d8bb3000-7f52dc000000 ---p 00000000 00:00 0
      7f52dc000000-7f52dc021000 rw-p 00000000 00:00 0
      7f52dc021000-7f52e0000000 ---p 00000000 00:00 0
      7f52e1ad6000-7f52e8000000 r--p 00000000 fd:01 230976 /usr/lib/locale/locale-archive
      7f52e8000000-7f52e8021000 rw-p 00000000 00:00 0
      7f52e8021000-7f52ec000000 ---p 00000000 00:00 0
      7f52ec000000-7f52ec021000 rw-p 00000000 00:00 0
      7f52ec021000-7f52f0000000 ---p 00000000 00:00 0
      7f52f0000000-7f52f0021000 rw-p 00000000 00:00 0
      7f52f0021000-7f52f4000000 ---p 00000000 00:00 0
      7f52f4000000-7f52f4021000 rw-p 00000000 00:00 0
      7f52f4021000-7f52f8000000 ---p 00000000 00:00 0
      7f52f8000000-7f52f8021000 rw-p 00000000 00:00 0
      7f52f8021000-7f52fc000000 ---p 00000000 00:00 0
      7f52fdfe9000-7f52fe1e9000 rw-p 00000000 00:00 0
      7f52fe1e9000-7f52fe3e9000 rw-p 00000000 00:00 0
      7f52fe3e9000-7f52fe401000 r-xp 00000000 fd:01 77352586 /tmp/openjdk8orgdebug/jre/lib/amd64/libnet.so
      7f52fe401000-7f52fe600000 ---p 00018000 fd:01 77352586 /tmp/openjdk8orgdebug/jre/lib/amd64/libnet.so
      7f52fe600000-7f52fe601000 r--p 00017000 fd:01 77352586 /tmp/openjdk8orgdebug/jre/lib/amd64/libnet.so
      7f52fe601000-7f52fe602000 rw-p 00018000 fd:01 77352586 /tmp/openjdk8orgdebug/jre/lib/amd64/libnet.so
      7f52fe602000-7f52fe613000 r-xp 00000000 fd:01 77352619 /tmp/openjdk8orgdebug/jre/lib/amd64/libnio.so
      7f52fe613000-7f52fe813000 ---p 00011000 fd:01 77352619 /tmp/openjdk8orgdebug/jre/lib/amd64/libnio.so
      7f52fe813000-7f52fe814000 r--p 00011000 fd:01 77352619 /tmp/openjdk8orgdebug/jre/lib/amd64/libnio.so
      7f52fe814000-7f52fe815000 rw-p 00012000 fd:01 77352619 /tmp/openjdk8orgdebug/jre/lib/amd64/libnio.so
      7f52fe815000-7f52fe816000 ---p 00000000 00:00 0
      7f52fe816000-7f52fe916000 rw-p 00000000 00:00 0
      7f52fe916000-7f52fe919000 ---p 00000000 00:00 0
      7f52fe919000-7f52fea17000 rw-p 00000000 00:00 0
      7f52fea17000-7f52fea1b000 ---p 00000000 00:00 0
      7f52fea1b000-7f52feb18000 rw-p 00000000 00:00 0
      7f52feb18000-7f52feb1c000 ---p 00000000 00:00 0
      7f52feb1c000-7f52fec19000 rw-p 00000000 00:00 0
      7f52fec19000-7f52fec1c000 ---p 00000000 00:00 0
      7f52fec1c000-7f52fed1a000 rw-p 00000000 00:00 0
      7f52fed1a000-7f52fed1d000 ---p 00000000 00:00 0
      7f52fed1d000-7f52fee1b000 rw-p 00000000 00:00 0
      7f52fee1b000-7f52fee1e000 ---p 00000000 00:00 0
      7f52fee1e000-7f52fef1c000 rw-p 00000000 00:00 0
      7f52fef1c000-7f52fef1d000 ---p 00000000 00:00 0
      7f52fef1d000-7f5301000000 rw-p 00000000 00:00 0
      7f5301000000-7f5301990000 rwxp 00000000 00:00 0
      7f5301990000-7f5310000000 ---p 00000000 00:00 0
      7f5310000000-7f5310bd9000 rw-p 00000000 00:00 0
      7f5310bd9000-7f5314000000 ---p 00000000 00:00 0
      7f5314091000-7f5314779000 rw-p 00000000 00:00 0
      7f5314779000-7f531494a000 r--s 03c92000 fd:01 77356623 /tmp/openjdk8orgdebug/jre/lib/rt.jar
      7f531494a000-7f5315403000 rw-p 00000000 00:00 0
      7f5315403000-7f5315404000 ---p 00000000 00:00 0
      7f5315404000-7f5315504000 rw-p 00000000 00:00 0
      7f5315504000-7f5315505000 ---p 00000000 00:00 0
      7f5315505000-7f5315619000 rw-p 00000000 00:00 0
      7f5315619000-7f5315739000 ---p 00000000 00:00 0
      7f5315739000-7f531574d000 rw-p 00000000 00:00 0
      7f531574d000-7f531586d000 ---p 00000000 00:00 0
      7f531586d000-7f5315877000 rw-p 00000000 00:00 0
      7f5315877000-7f5315907000 ---p 00000000 00:00 0
      7f5315907000-7f531592f000 rw-p 00000000 00:00 0
      7f531592f000-7f5315cc8000 ---p 00000000 00:00 0
      7f5315cc8000-7f5315ce3000 r-xp 00000000 fd:01 77352584 /tmp/openjdk8orgdebug/jre/lib/amd64/libzip.so
      7f5315ce3000-7f5315ee2000 ---p 0001b000 fd:01 77352584 /tmp/openjdk8orgdebug/jre/lib/amd64/libzip.so
      7f5315ee2000-7f5315ee3000 r--p 0001a000 fd:01 77352584 /tmp/openjdk8orgdebug/jre/lib/amd64/libzip.so
      7f5315ee3000-7f5315ee4000 rw-p 0001b000 fd:01 77352584 /tmp/openjdk8orgdebug/jre/lib/amd64/libzip.so
      7f5315ee4000-7f5315ef0000 r-xp 00000000 fd:01 100757821 /usr/lib64/libnss_files-2.17.so
      7f5315ef0000-7f53160ef000 ---p 0000c000 fd:01 100757821 /usr/lib64/libnss_files-2.17.so
      7f53160ef000-7f53160f0000 r--p 0000b000 fd:01 100757821 /usr/lib64/libnss_files-2.17.so
      7f53160f0000-7f53160f1000 rw-p 0000c000 fd:01 100757821 /usr/lib64/libnss_files-2.17.so
      7f53160f1000-7f53160f7000 rw-p 00000000 00:00 0
      7f53160f7000-7f5316121000 r-xp 00000000 fd:01 77352583 /tmp/openjdk8orgdebug/jre/lib/amd64/libjava.so
      7f5316121000-7f5316320000 ---p 0002a000 fd:01 77352583 /tmp/openjdk8orgdebug/jre/lib/amd64/libjava.so
      7f5316320000-7f5316321000 r--p 00029000 fd:01 77352583 /tmp/openjdk8orgdebug/jre/lib/amd64/libjava.so
      7f5316321000-7f5316323000 rw-p 0002a000 fd:01 77352583 /tmp/openjdk8orgdebug/jre/lib/amd64/libjava.so
      7f5316323000-7f5316330000 r-xp 00000000 fd:01 77352532 /tmp/openjdk8orgdebug/jre/lib/amd64/libverify.so
      7f5316330000-7f531652f000 ---p 0000d000 fd:01 77352532 /tmp/openjdk8orgdebug/jre/lib/amd64/libverify.so
      7f531652f000-7f5316531000 r--p 0000c000 fd:01 77352532 /tmp/openjdk8orgdebug/jre/lib/amd64/libverify.so
      7f5316531000-7f5316532000 rw-p 0000e000 fd:01 77352532 /tmp/openjdk8orgdebug/jre/lib/amd64/libverify.so
      7f5316532000-7f5316539000 r-xp 00000000 fd:01 100757865 /usr/lib64/librt-2.17.so
      7f5316539000-7f5316738000 ---p 00007000 fd:01 100757865 /usr/lib64/librt-2.17.so
      7f5316738000-7f5316739000 r--p 00006000 fd:01 100757865 /usr/lib64/librt-2.17.so
      7f5316739000-7f531673a000 rw-p 00007000 fd:01 100757865 /usr/lib64/librt-2.17.so
      7f531673a000-7f531683b000 r-xp 00000000 fd:01 100757811 /usr/lib64/libm-2.17.so
      7f531683b000-7f5316a3a000 ---p 00101000 fd:01 100757811 /usr/lib64/libm-2.17.so
      7f5316a3a000-7f5316a3b000 r--p 00100000 fd:01 100757811 /usr/lib64/libm-2.17.so
      7f5316a3b000-7f5316a3c000 rw-p 00101000 fd:01 100757811 /usr/lib64/libm-2.17.so
      7f5316a3c000-7f5317d29000 r-xp 00000000 fd:01 107432456 /tmp/openjdk8orgdebug/jre/lib/amd64/server/libjvm.so
      7f5317d29000-7f5317f28000 ---p 012ed000 fd:01 107432456 /tmp/openjdk8orgdebug/jre/lib/amd64/server/libjvm.so
      7f5317f28000-7f5318018000 rw-p 012ec000 fd:01 107432456 /tmp/openjdk8orgdebug/jre/lib/amd64/server/libjvm.so
      7f5318018000-7f53180b0000 rw-p 00000000 00:00 0
      7f53180b0000-7f5318273000 r-xp 00000000 fd:01 100757803 /usr/lib64/libc-2.17.so
      7f5318273000-7f5318473000 ---p 001c3000 fd:01 100757803 /usr/lib64/libc-2.17.so
      7f5318473000-7f5318477000 r--p 001c3000 fd:01 100757803 /usr/lib64/libc-2.17.so
      7f5318477000-7f5318479000 rw-p 001c7000 fd:01 100757803 /usr/lib64/libc-2.17.so
      7f5318479000-7f531847e000 rw-p 00000000 00:00 0
      7f531847e000-7f5318480000 r-xp 00000000 fd:01 100757809 /usr/lib64/libdl-2.17.so
      7f5318480000-7f5318680000 ---p 00002000 fd:01 100757809 /usr/lib64/libdl-2.17.so
      7f5318680000-7f5318681000 r--p 00002000 fd:01 100757809 /usr/lib64/libdl-2.17.so
      7f5318681000-7f5318682000 rw-p 00003000 fd:01 100757809 /usr/lib64/libdl-2.17.so
      7f5318682000-7f5318699000 r-xp 00000000 fd:01 77360783 /tmp/openjdk8orgdebug/lib/amd64/jli/libjli.so
      7f5318699000-7f5318898000 ---p 00017000 fd:01 77360783 /tmp/openjdk8orgdebug/lib/amd64/jli/libjli.so
      7f5318898000-7f5318899000 r--p 00016000 fd:01 77360783 /tmp/openjdk8orgdebug/lib/amd64/jli/libjli.so
      7f5318899000-7f531889a000 rw-p 00017000 fd:01 77360783 /tmp/openjdk8orgdebug/lib/amd64/jli/libjli.so
      7f531889a000-7f53188b1000 r-xp 00000000 fd:01 100757861 /usr/lib64/libpthread-2.17.so
      7f53188b1000-7f5318ab0000 ---p 00017000 fd:01 100757861 /usr/lib64/libpthread-2.17.so
      7f5318ab0000-7f5318ab1000 r--p 00016000 fd:01 100757861 /usr/lib64/libpthread-2.17.so
      7f5318ab1000-7f5318ab2000 rw-p 00017000 fd:01 100757861 /usr/lib64/libpthread-2.17.so
      7f5318ab2000-7f5318ab6000 rw-p 00000000 00:00 0
      7f5318ab6000-7f5318ad8000 r-xp 00000000 fd:01 100757796 /usr/lib64/ld-2.17.so
      7f5318af1000-7f5318bbc000 rw-p 00000000 00:00 0
      7f5318bbc000-7f5318bc0000 ---p 00000000 00:00 0
      7f5318bc0000-7f5318cc1000 rw-p 00000000 00:00 0
      7f5318cc7000-7f5318cca000 rw-p 00000000 00:00 0
      7f5318cca000-7f5318ccc000 r--s 00002000 fd:01 77356611 /tmp/openjdk8orgdebug/jre/lib/ext/jef.jar
      7f5318ccc000-7f5318cd4000 rw-s 00000000 fd:01 3302559 /tmp/hsperfdata_isadmin/20322
      7f5318cd4000-7f5318cd5000 rw-p 00000000 00:00 0
      7f5318cd5000-7f5318cd6000 r--p 00000000 00:00 0
      7f5318cd6000-7f5318cd7000 rw-p 00000000 00:00 0
      7f5318cd7000-7f5318cd8000 r--p 00021000 fd:01 100757796 /usr/lib64/ld-2.17.so
      7f5318cd8000-7f5318cd9000 rw-p 00022000 fd:01 100757796 /usr/lib64/ld-2.17.so
      7f5318cd9000-7f5318cda000 rw-p 00000000 00:00 0
      7ffdf8f56000-7ffdf8f77000 rw-p 00000000 00:00 0 [stack]
      7ffdf8fa5000-7ffdf8fa7000 r-xp 00000000 00:00 0 [vdso]
      ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

      VM Arguments:
      jvm_args: -XX:+PrintCodeCache2
      java_command: NmethodLogTest
      java_class_path (initial): .
      Launcher Type: SUN_STANDARD

      Environment Variables:
      PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/isadmin/.local/bin:/home/isadmin/bin
      LD_LIBRARY_PATH=
      SHELL=/bin/bash

      Signal Handlers:
      SIGSEGV: [libjvm.so+0xd051ec], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
      SIGBUS: [libjvm.so+0xd051ec], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
      SIGFPE: [libjvm.so+0xb2c4bf], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
      SIGPIPE: [libjvm.so+0xb2c4bf], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
      SIGXFSZ: [libjvm.so+0xb2c4bf], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
      SIGILL: [libjvm.so+0xb2c4bf], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
      SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
      SIGUSR2: [libjvm.so+0xb2bcd0], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO
      SIGHUP: [libjvm.so+0xb27f07], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
      SIGINT: [libjvm.so+0xb27f07], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
      SIGTERM: [libjvm.so+0xb27f07], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
      SIGQUIT: [libjvm.so+0xb27f07], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO


      --------------- S Y S T E M ---------------

      OS:Red Hat Enterprise Linux Server release 7.7 (Maipo)

      uname:Linux 3.10.0-1062.el7.x86_64 #1 SMP Thu Jul 18 20:25:13 UTC 2019 x86_64
      libc:glibc 2.17 NPTL 2.17
      rlimit: STACK 8192k, CORE infinity, NPROC 4096, NOFILE 4096, AS infinity
      load average:4.05 3.93 5.72

      /proc/meminfo:
      MemTotal: 3783084 kB
      MemFree: 2628344 kB
      MemAvailable: 2757692 kB
      Buffers: 64 kB
      Cached: 324872 kB
      SwapCached: 81576 kB
      Active: 466484 kB
      Inactive: 476732 kB
      Active(anon): 399736 kB
      Inactive(anon): 222164 kB
      Active(file): 66748 kB
      Inactive(file): 254568 kB
      Unevictable: 0 kB
      Mlocked: 0 kB
      SwapTotal: 8290300 kB
      SwapFree: 7944956 kB
      Dirty: 264 kB
      Writeback: 0 kB
      AnonPages: 609696 kB
      Mapped: 71540 kB
      Shmem: 3620 kB
      Slab: 71732 kB
      SReclaimable: 24788 kB
      SUnreclaim: 46944 kB
      KernelStack: 6928 kB
      PageTables: 25156 kB
      NFS_Unstable: 0 kB
      Bounce: 0 kB
      WritebackTmp: 0 kB
      CommitLimit: 10181840 kB
      Committed_AS: 2587228 kB
      VmallocTotal: 34359738367 kB
      VmallocUsed: 14280 kB
      VmallocChunk: 34359721488 kB
      HardwareCorrupted: 0 kB
      AnonHugePages: 258048 kB
      CmaTotal: 0 kB
      CmaFree: 0 kB
      HugePages_Total: 0
      HugePages_Free: 0
      HugePages_Rsvd: 0
      HugePages_Surp: 0
      Hugepagesize: 2048 kB
      DirectMap4k: 190440 kB
      DirectMap2M: 4003840 kB

      container (cgroup) information:
      container_type: cgroupv1
      cpu_cpuset_cpus: 0-1
      cpu_memory_nodes: 0
      active_processor_count: 2
      cpu_quota: -1
      cpu_period: 100000
      cpu_shares: -1
      memory_limit_in_bytes: -1
      memory_and_swap_limit_in_bytes: -1
      memory_soft_limit_in_bytes: -1
      memory_usage_in_bytes: 957243392
      memory_max_usage_in_bytes: 0


      CPU:total 2 (initial active 2) (1 cores per cpu, 1 threads per core) family 6 model 61 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, tsc, bmi1, bmi2

      /proc/cpuinfo:
      processor : 0
      vendor_id : GenuineIntel
      cpu family : 6
      model : 61
      model name : Intel Core Processor (Broadwell, IBRS)
      stepping : 2
      microcode : 0x1
      cpu MHz : 1995.395
      cache size : 4096 KB
      physical id : 0
      siblings : 1
      core id : 0
      cpu cores : 1
      apicid : 0
      initial apicid : 0
      fpu : yes
      fpu_exception : yes
      cpuid level : 13
      wp : yes
      flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm ibrs ibpb fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt spec_ctrl
      bogomips : 3990.79
      clflush size : 64
      cache_alignment : 64
      address sizes : 46 bits physical, 48 bits virtual
      power management:

      processor : 1
      vendor_id : GenuineIntel
      cpu family : 6
      model : 61
      model name : Intel Core Processor (Broadwell, IBRS)
      stepping : 2
      microcode : 0x1
      cpu MHz : 1995.395
      cache size : 4096 KB
      physical id : 1
      siblings : 1
      core id : 0
      cpu cores : 1
      apicid : 1
      initial apicid : 1
      fpu : yes
      fpu_exception : yes
      cpuid level : 13
      wp : yes
      flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm ibrs ibpb fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt spec_ctrl
      bogomips : 3990.79
      clflush size : 64
      cache_alignment : 64
      address sizes : 46 bits physical, 48 bits virtual
      power management:



      Memory: 4k page, physical 3783084k(2628344k free), swap 8290300k(7944956k free)

      vm_info: OpenJDK 64-Bit Server VM (25.71-b01-internal-debug) for linux-amd64 JRE (1.8.0), built on Oct 21 2020 18:34:16 by "isadmin" with gcc 4.4.7 20120313 (Red Hat 4.4.7-11)

      time: Wed Oct 21 10:28:05 2020
      timezone: UTC
      elapsed time: 48.765769 seconds (0d 0h 0m 48s)

      ---------- BEGIN SOURCE ----------
      import java.net.URL;
      import java.net.URLClassLoader;

      public class NmethodLogTest {

          public static void main(String args[]) throws Exception {

              URL url = NmethodLogTest.class.getProtectionDomain().getCodeSource().getLocation();

              for (int j=0; j<500; j++) {
                  ClassLoader cl;
                  Class clazz;

                  cl = new MyClassLoader(url);
                  clazz = cl.loadClass("SomeClass");
                  refClass(clazz);

                  cl = new MyClassLoader(url);
                  clazz = cl.loadClass("SomeClass");
                  refClass(clazz);
              }
          }

          private static void refClass(Class clazz) throws Exception {
              java.lang.reflect.Field name = clazz.getDeclaredField("NAME");
              name.setAccessible(true);
              name.get(null);
          }

          private static class MyClassLoader extends URLClassLoader {
              public MyClassLoader(URL url) {
                  super(new URL[]{url}, null);
              }
              protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
                  try {
                      return super.loadClass(name, resolve);
                  } catch (ClassNotFoundException e) {
                      return Class.forName(name, resolve, NmethodLogTest.class.getClassLoader());
                  }
              }
              protected void finalize() throws Throwable {
                  super.finalize();
              }
          }
      }

      abstract class Foo {
          public abstract int foo();
      }
      class Foo1 extends Foo {
          private int a;
          public int foo() { return a; }
      }
      class Foo2 extends Foo {
          private int a;
          public int foo() { return a; }
      }
      class Foo3 extends Foo {
          private int a;
          public int foo() { return a; }
      }
      class Foo4 extends Foo {
          private int a;
          public int foo() { return a; }
      }

      class SomeClass {
          static final String NAME = "name";

          static {
              int res =0;
              Foo[] foos = new Foo[] { new Foo1(), new Foo2(), new Foo3(), new Foo4() };
              for (int i = 0; i < 100000; i++) {
                  res = foos[i % foos.length].foo();
              }
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      no workaround

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              sswsharm swati sharma
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: