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

SIGSEGV in call to VM_Version::get_processor_features() from JNI_CreateJavaVM

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      os_x

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_60"
      Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
      Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

      FULL OS VERSION :
      uname -a:

      Darwin crucible.iscinternal.com 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64


      EXTRA RELEVANT SYSTEM CONFIGURATION :
        Model Name: MacBook Pro
        Model Identifier: MacBookPro10,1
        Processor Name: Intel Core i7
        Processor Speed: 2.7 GHz
        Number of Processors: 1
        Total Number of Cores: 4
        L2 Cache (per Core): 256 KB
        L3 Cache: 8 MB
        Memory: 16 GB
        Boot ROM Version: MBP101.00EE.B09
        SMC Version (system): 2.3f36

      A DESCRIPTION OF THE PROBLEM :
      I am extending a C/C++ application to leverage the JavaSE. I need to call out to and manage Java Class interaction from C/C++. When I initialize and call JNI_CreateJavaVM while running under LLDB or GDB it gives the SIGSEGV signal. It completes correctly when hitting "continue" under the debug processes.

      The program runs fine when not running under GDB or LLDB.

      When linked against jdk1.7.0_80.jdk the program runs fine under GDB or LLDB and executes normally.

      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try

      REGRESSION. Last worked in version 7u80

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Install jdk1.8.0_60 on Mac OSX
      2. Compile and link a C/C++ program to jdk1.8.0_60 that launches JNI_CreateJavaVM
      3. From the command line or IDE launch the program executable with GDB or LLDB
      4. Once the debugger initializes type --> run
      5. When SIGSEGV, then hit continue.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      You will receive a SIGSEGV.
      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGBUS (0xa) at pc=0x00007fb288c06601, pid=95130, tid=1299
      #
      # JRE version: Java(TM) SE Runtime Environment (8.0_60-b27) (build 1.8.0_60-b27)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.60-b23 mixed mode bsd-amd64 compressed oops)
      # Problematic frame:
      # C 0x00007fb288c06601
      #
      # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
      #
      # 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 is native thread

      siginfo: si_signo: 10 (SIGBUS), si_code: 2 (BUS_ADRERR), si_addr: 0x00007fb288c06601

      Registers:
      RAX=0x00007fb288c06601, RBX=0x0000000000000000, RCX=0x0000000000000000, RDX=0x00007fff5cabcf68
      RSP=0x00007fff5cabcee8, RBP=0x00007fff5cabcf10, RSI=0x0000000103223f7e, RDI=0x00007fff5cabcfb0
      R8 =0x00007fff5cabced0, R9 =0x00007fb288c00000, R10=0x0000000000000005, R11=0x0000000000000202
      R12=0x0000000000000000, R13=0x0000000000000000, R14=0x0000000000000000, R15=0x0000000000000000
      RIP=0x00007fb288c06601, EFLAGS=0x0000000000010206, ERR=0x0000000000000015
        TRAPNO=0x000000000000000e

      Top of Stack: (sp=0x00007fff5cabcee8)
      0x00007fff5cabcee8: 000000010314a17f 0000000000000000
      0x00007fff5cabcef8: 00007fb288c06601 0000000103223f7e
      0x00007fff5cabcf08: 00007fff5cabcfb0 00007fff5cabcf90
      0x00007fff5cabcf18: 000000010314ae52 0000000000000000
      0x00007fff5cabcf28: 0000000000000000 0000000000000000
      0x00007fff5cabcf38: 00007fb288c06990 000000010320c300
      0x00007fff5cabcf48: 000000065cabd630 ffffffff5cabcf80
      0x00007fff5cabcf58: 0000000103223f06 00007fb288e0ea00
      0x00007fff5cabcf68: 0000000100010006 00007fb288e0ea00
      0x00007fff5cabcf78: 0000000600000000 00007fff5cabcfb0
      0x00007fff5cabcf88: 000000010320c2d9 00007fff5cabcfb0
      0x00007fff5cabcf98: 0000000103179c73 0000000000000006
      0x00007fff5cabcfa8: 00007fb288c05850 00007fff5cabcfd0
      0x00007fff5cabcfb8: 0000000103157ead 000000010322b2d0
      0x00007fff5cabcfc8: 00007fb288c06900 00007fff5cabd010
      0x00007fff5cabcfd8: 000000010320bd59 0000000055df78c0
      0x00007fff5cabcfe8: 00007fff5cabe060 00007fff5cabd010
      0x00007fff5cabcff8: 000000010315b6c9 00007fb288c06601
      0x00007fff5cabd008: 00007fff5cabe060 00007fff5cabd870
      0x00007fff5cabd018: 000000010320b639 00007fb288c067b8
      0x00007fff5cabd028: 00007fb288c067b8 00007fb288c067b8
      0x00007fff5cabd038: 00007fb288c067c8 00007fb288c067c8
      0x00007fff5cabd048: 00007fb288c067b8 00007fb288c067b8
      0x00007fff5cabd058: 00007fb288c067c0 00007fb288c067c0
      0x00007fff5cabd068: 00007fb288c067c0 00007fb288c067c0
      0x00007fff5cabd078: 00007fb288c066d0 00007fb288c05fc0
      0x00007fff5cabd088: 00007fff5cabe0a0 00007fff5cabe1f0
      0x00007fff5cabd098: 00007fff5cabd618 0000000000000000
      0x00007fff5cabd0a8: 0000000103224165 00007fff5cabd5e8
      0x00007fff5cabd0b8: 00007fb288c06990 0000000000000009
      0x00007fff5cabd0c8: 00000001032254cd 00007fff5cabd600
      0x00007fff5cabd0d8: 00007fff5cabe1f0 00007fb288c066d0

      Instructions: (pc=0x00007fb288c06601)
      0x00007fb288c065e1: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10
      0x00007fb288c065f1: d0 22 03 01 00 00 00 01 00 00 00 00 00 00 00 02
      0x00007fb288c06601: 74 00 00 00 00 00 00 00 10 2d 03 01 00 00 00 00
      0x00007fb288c06611: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10

      Register to memory mapping:

      RAX=0x00007fb288c06601 is an unknown value
      RBX=0x0000000000000000 is an unknown value
      RCX=0x0000000000000000 is an unknown value
      RDX=0x00007fff5cabcf68 is an unknown value
      RSP=0x00007fff5cabcee8 is an unknown value
      RBP=0x00007fff5cabcf10 is an unknown value
      RSI=0x0000000103223f7e: _ZTSN5Catch12_GLOBAL__N_111RegistryHubE+0x1de in /Users/iranhutchinson/Library/Caches/clion11/cmake/generated/64bb97bd/64bb97bd/Debug/./testJavaIntegration at 0x0000000103141000
      RDI=0x00007fff5cabcfb0 is an unknown value
      R8 =0x00007fff5cabced0 is an unknown value
      R9 =0x00007fb288c00000 is an unknown value
      R10=0x0000000000000005 is an unknown value
      R11=0x0000000000000202 is an unknown value
      R12=0x0000000000000000 is an unknown value
      R13=0x0000000000000000 is an unknown value
      R14=0x0000000000000000 is an unknown value
      R15=0x0000000000000000 is an unknown value


      Stack: [0x00007fff5c2bf000,0x00007fff5cabf000], sp=0x00007fff5cabcee8, free space=8183k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C 0x00007fb288c06601
      C [testJavaIntegration+0x9e52] _ZL30____C_A_T_C_H____T_E_S_T____27v+0x72
      C [testJavaIntegration+0x38c73] _ZNK5Catch20FreeFunctionTestCase6invokeEv+0x13
      C [testJavaIntegration+0x16ead] _ZNK5Catch8TestCase6invokeEv+0x2d
      C [testJavaIntegration+0xcad59] _ZN5Catch10RunContext20invokeActiveTestCaseEv+0x29
      C [testJavaIntegration+0xca639] _ZN5Catch10RunContext14runCurrentTestERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES8_+0x509
      C [testJavaIntegration+0x2eb93] _ZN5Catch10RunContext7runTestERKNS_8TestCaseE+0x283
      C [testJavaIntegration+0xdcec] _ZN5Catch8runTestsERKNS_3PtrINS_6ConfigEEE+0x90c
      C [testJavaIntegration+0x815d5] _ZN5Catch7Session3runEv+0x275
      C [testJavaIntegration+0x34483] _ZN5Catch7Session3runEiPKPc+0x53
      C [testJavaIntegration+0x2ce22] main+0x42
      C [libdyld.dylib+0x35c9] start+0x1


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

      VM state:at safepoint (shutting down)

      VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
      [0x00007fb288d13e20] Threads_lock - owner thread: 0x00007fb28983c000

      Heap:
       PSYoungGen total 305664K, used 15728K [0x00000007aab00000, 0x00000007c0000000, 0x00000007c0000000)
        eden space 262144K, 6% used [0x00000007aab00000,0x00000007aba5c358,0x00000007bab00000)
        from space 43520K, 0% used [0x00000007bd580000,0x00000007bd580000,0x00000007c0000000)
        to space 43520K, 0% used [0x00000007bab00000,0x00000007bab00000,0x00000007bd580000)
       ParOldGen total 699392K, used 0K [0x0000000780000000, 0x00000007aab00000, 0x00000007aab00000)
        object space 699392K, 0% used [0x0000000780000000,0x0000000780000000,0x00000007aab00000)
       Metaspace used 2638K, capacity 4490K, committed 4864K, reserved 1056768K
        class space used 287K, capacity 386K, committed 512K, reserved 1048576K

      Card table byte_map: [0x00000001136f2000,0x00000001138f3000] byte_map_base: 0x000000010faf2000

      Marking Bits: (ParMarkBitMap*) 0x0000000103bb5e20
       Begin Bits: [0x0000000114261000, 0x0000000115261000)
       End Bits: [0x0000000115261000, 0x0000000116261000)

      Polling page: 0x00000001032d6000

      CodeCache: size=245760Kb used=1122Kb max_used=1122Kb free=244637Kb
       bounds [0x0000000104332000, 0x00000001045a2000, 0x0000000113332000]
       total_blobs=266 nmethods=37 adapters=143
       compilation: enabled

      Compilation events (10 events):
      Event: 0.160 Thread 0x00007fb289017800 33 1 java.lang.ref.Reference::get (5 bytes)
      Event: 0.160 Thread 0x00007fb289017800 nmethod 33 0x0000000104446850 code [0x00000001044469a0, 0x0000000104446ab0]
      Event: 0.160 Thread 0x00007fb289017800 34 1 java.net.URL::getProtocol (5 bytes)
      Event: 0.160 Thread 0x00007fb289017800 nmethod 34 0x0000000104449cd0 code [0x0000000104449e20, 0x0000000104449f30]
      Event: 0.160 Thread 0x00007fb289017800 35 1 java.io.File::getPath (5 bytes)
      Event: 0.161 Thread 0x00007fb289017800 nmethod 35 0x0000000104449f90 code [0x000000010444a0e0, 0x000000010444a1f0]
      Event: 0.161 Thread 0x00007fb289017800 36 1 java.lang.StringCoding$StringEncoder::requestedCharsetName (5 bytes)
      Event: 0.161 Thread 0x00007fb289017800 nmethod 36 0x000000010444a250 code [0x000000010444a3a0, 0x000000010444a4b0]
      Event: 0.162 Thread 0x00007fb289017800 37 3 java.lang.AbstractStringBuilder::expandCapacity (50 bytes)
      Event: 0.163 Thread 0x00007fb289017800 nmethod 37 0x000000010444a510 code [0x000000010444a6c0, 0x000000010444ac18]

      GC Heap History (0 events):
      No events

      Deoptimization events (0 events):
      No events

      Internal exceptions (10 events):
      Event: 0.159 Thread 0x00007fb289006800 Exception <a 'java/security/PrivilegedActionException'> (0x00000007aaba4030) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u60/4407/hotspot/src/share/vm/prims/jvm.cpp, line 1386]
      Event: 0.159 Thread 0x00007fb289006800 Exception <a 'java/util/zip/ZipException'> (0x00000007aaba4db0) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u60/4407/hotspot/src/share/vm/prims/jni.cpp, line 709]
      Event: 0.159 Thread 0x00007fb289006800 Exception <a 'java/security/PrivilegedActionException'> (0x00000007aaba4fb8) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u60/4407/hotspot/src/share/vm/prims/jvm.cpp, line 1386]
      Event: 0.159 Thread 0x00007fb289006800 Exception <a 'java/security/PrivilegedActionException'> (0x00000007aaba51c8) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u60/4407/hotspot/src/share/vm/prims/jvm.cpp, line 1386]
      Event: 0.160 Thread 0x00007fb289006800 Exception <a 'java/util/zip/ZipException'> (0x00000007aaba5f48) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u60/4407/hotspot/src/share/vm/prims/jni.cpp, line 709]
      Event: 0.160 Thread 0x00007fb289006800 Exception <a 'java/security/PrivilegedActionException'> (0x00000007aaba6150) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u60/4407/hotspot/src/share/vm/prims/jvm.cpp, line 1386]
      Event: 0.160 Thread 0x00007fb289006800 Exception <a 'java/security/PrivilegedActionException'> (0x00000007aaba6360) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u60/4407/hotspot/src/share/vm/prims/jvm.cpp, line 1386]
      Event: 0.161 Thread 0x00007fb289006800 Exception <a 'java/util/zip/ZipException'> (0x00000007aabb7e60) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u60/4407/hotspot/src/share/vm/prims/jni.cpp, line 709]
      Event: 0.161 Thread 0x00007fb289006800 Exception <a 'java/security/PrivilegedActionException'> (0x00000007aabb8068) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u60/4407/hotspot/src/share/vm/prims/jvm.cpp, line 1386]
      Event: 0.161 Thread 0x00007fb289006800 Exception <a 'java/security/PrivilegedActionException'> (0x00000007aabb8278) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u60/4407/hotspot/src/share/vm/prims/jvm.cpp, line 1386]

      Events (10 events):
      Event: 0.163 loading class java/security/AllPermission done
      Event: 0.163 loading class java/security/UnresolvedPermission
      Event: 0.163 loading class java/security/UnresolvedPermission done
      Event: 0.163 loading class java/security/BasicPermissionCollection
      Event: 0.163 loading class java/security/BasicPermissionCollection done
      Event: 0.164 loading class java/lang/Shutdown
      Event: 0.164 loading class java/lang/Shutdown done
      Event: 0.164 loading class java/lang/Shutdown$Lock
      Event: 0.164 loading class java/lang/Shutdown$Lock done
      Event: 0.164 Thread 0x00007fb289006800 Thread exited: 0x00007fb289006800


      Dynamic libraries:
      0x00000001032d7000 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/server/libjvm.dylib
      0x0000000104267000 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/server/libjsig.dylib
      0x0000000104271000 /Users/iranhutchinson/Library/Caches/clion11/cmake/generated/64bb97bd/64bb97bd/Debug/libJavaIntegration.dylib
      0x0000000008ea2000 /usr/lib/libc++.1.dylib
      0x0000000008ea2000 /usr/lib/libSystem.B.dylib
      0x0000000008ea2000 /usr/lib/libstdc++.6.dylib
      0x0000000008ea2000 /usr/lib/system/libcache.dylib
      0x0000000008ea2000 /usr/lib/system/libcommonCrypto.dylib
      0x0000000008ea2000 /usr/lib/system/libcompiler_rt.dylib
      0x0000000008ea2000 /usr/lib/system/libcopyfile.dylib
      0x0000000008ea2000 /usr/lib/system/libcorecrypto.dylib
      0x0000000008ea2000 /usr/lib/system/libdispatch.dylib
      0x0000000008ea2000 /usr/lib/system/libdyld.dylib
      0x0000000008ea2000 /usr/lib/system/libkeymgr.dylib
      0x0000000008ea2000 /usr/lib/system/liblaunch.dylib
      0x0000000008ea2000 /usr/lib/system/libmacho.dylib
      0x0000000008ea2000 /usr/lib/system/libquarantine.dylib
      0x0000000008ea2000 /usr/lib/system/libremovefile.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_asl.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_blocks.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_c.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_configuration.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_coreservices.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_coretls.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_dnssd.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_info.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_kernel.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_m.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_malloc.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_network.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_networkextension.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_notify.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_platform.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_pthread.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_sandbox.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_secinit.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_stats.dylib
      0x0000000008ea2000 /usr/lib/system/libsystem_trace.dylib
      0x0000000008ea2000 /usr/lib/system/libunc.dylib
      0x0000000008ea2000 /usr/lib/system/libunwind.dylib
      0x0000000008ea2000 /usr/lib/system/libxpc.dylib
      0x0000000008ea2000 /usr/lib/libobjc.A.dylib
      0x0000000008ea2000 /usr/lib/libauto.dylib
      0x0000000008ea2000 /usr/lib/libc++abi.dylib
      0x0000000008ea2000 /usr/lib/libDiagnosticMessagesClient.dylib
      0x00000001042b0000 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/libverify.dylib
      0x00000001042be000 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/libjava.dylib
      0x0000000008ea2000 /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
      0x0000000008ea2000 /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
      0x0000000008ea2000 /System/Library/Frameworks/Security.framework/Versions/A/Security
      0x0000000008ea2000 /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
      0x0000000008ea2000 /usr/lib/libicucore.A.dylib
      0x0000000008ea2000 /usr/lib/libz.1.dylib
      0x0000000008ea2000 /usr/lib/libextension.dylib
      0x0000000008ea2000 /usr/lib/libarchive.2.dylib
      0x0000000008ea2000 /usr/lib/libxml2.2.dylib
      0x0000000008ea2000 /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
      0x0000000008ea2000 /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
      0x0000000008ea2000 /usr/lib/liblangid.dylib
      0x0000000008ea2000 /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
      0x0000000008ea2000 /usr/lib/libCRFSuite.dylib
      0x0000000008ea2000 /usr/lib/libbz2.1.0.dylib
      0x0000000008ea2000 /usr/lib/liblzma.5.dylib
      0x0000000008ea2000 /usr/lib/libbsm.0.dylib
      0x0000000008ea2000 /usr/lib/libsqlite3.dylib
      0x0000000008ea2000 /usr/lib/system/libkxld.dylib
      0x0000000008ea2000 /usr/lib/libxar.1.dylib
      0x0000000008ea2000 /usr/lib/libpam.2.dylib
      0x0000000008ea2000 /usr/lib/libOpenScriptingUtil.dylib
      0x0000000008ea2000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents
      0x0000000008ea2000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
      0x0000000008ea2000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
      0x0000000008ea2000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
      0x0000000008ea2000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
      0x0000000008ea2000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
      0x0000000008ea2000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
      0x0000000008ea2000 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
      0x0000000008ea2000 /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
      0x0000000008ea2000 /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
      0x0000000008ea2000 /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
      0x0000000008ea2000 /System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport
      0x0000000008ea2000 /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore
      0x0000000008ea2000 /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
      0x0000000008ea2000 /usr/lib/libmecabra.dylib
      0x0000000008ea2000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
      0x0000000008ea2000 /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
      0x0000000008ea2000 /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
      0x0000000008ea2000 /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
      0x0000000008ea2000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
      0x0000000008ea2000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
      0x0000000008ea2000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
      0x0000000008ea2000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
      0x0000000008ea2000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
      0x0000000008ea2000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
      0x0000000008ea2000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
      0x0000000008ea2000 /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
      0x0000000008ea2000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
      0x0000000008ea2000 /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
      0x0000000008ea2000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
      0x0000000008ea2000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
      0x0000000008ea2000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
      0x0000000008ea2000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
      0x0000000008ea2000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
      0x0000000008ea2000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
      0x0000000008ea2000 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
      0x0000000008ea2000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
      0x0000000008ea2000 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
      0x0000000008ea2000 /System/Library/PrivateFrameworks/AppleVPA.framework/Versions/A/AppleVPA
      0x0000000008ea2000 /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG
      0x0000000008ea2000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
      0x0000000008ea2000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
      0x0000000008ea2000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
      0x0000000008ea2000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
      0x0000000008ea2000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
      0x0000000008ea2000 /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
      0x0000000008ea2000 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
      0x0000000008ea2000 /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
      0x0000000008ea2000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
      0x0000000008ea2000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
      0x0000000008ea2000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
      0x0000000008ea2000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
      0x0000000008ea2000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
      0x0000000008ea2000 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
      0x0000000008ea2000 /usr/lib/libcups.2.dylib
      0x0000000008ea2000 /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
      0x0000000008ea2000 /System/Library/Frameworks/GSS.framework/Versions/A/GSS
      0x0000000008ea2000 /usr/lib/libresolv.9.dylib
      0x0000000008ea2000 /usr/lib/libiconv.2.dylib
      0x0000000008ea2000 /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
      0x0000000008ea2000 /usr/lib/libheimdal-asn1.dylib
      0x0000000008ea2000 /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
      0x0000000008ea2000 /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
      0x0000000008ea2000 /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
      0x0000000008ea2000 /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
      0x0000000008ea2000 /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
      0x0000000008ea2000 /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
      0x0000000008ea2000 /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
      0x0000000008ea2000 /usr/lib/libcmph.dylib
      0x0000000008ea2000 /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
      0x0000000008ea2000 /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
      0x0000000008ea2000 /usr/lib/libxslt.1.dylib
      0x0000000104329000 /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/libzip.dylib
      0x0000000118ecc000 /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/JavaRuntimeSupport
      0x0000000008ea2000 /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
      0x0000000118ee4000 /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Versions/A/JavaNativeFoundation
      0x0000000118ef9000 /System/Library/Frameworks/JavaVM.framework/Versions/A/JavaVM
      0x0000000008ea2000 /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
      0x0000000008ea2000 /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
      0x0000000008ea2000 /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
      0x0000000008ea2000 /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication
      0x0000000008ea2000 /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
      0x0000000008ea2000 /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage.framework/Versions/A/CoreImage
      0x0000000008ea2000 /System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport
      0x0000000008ea2000 /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
      0x0000000008ea2000 /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore
      0x0000000008ea2000 /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices
      0x0000000008ea2000 /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation
      0x0000000008ea2000 /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
      0x0000000008ea2000 /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
      0x0000000008ea2000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
      0x0000000008ea2000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
      0x0000000008ea2000 /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis
      0x0000000008ea2000 /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage
      0x0000000008ea2000 /System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing
      0x0000000008ea2000 /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup
      0x0000000008ea2000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
      0x0000000008ea2000 /System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity
      0x0000000008ea2000 /System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices
      0x0000000008ea2000 /System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary
      0x0000000008ea2000 /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211
      0x0000000008ea2000 /System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN
      0x0000000008ea2000 /System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth
      0x0000000008ea2000 /System/Library/PrivateFrameworks/CoreWiFi.framework/Versions/A/CoreWiFi
      0x0000000008ea2000 /System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth
      0x0000000008ea2000 /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols
      0x0000000008ea2000 /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication
      0x0000000008ea2000 /System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore
      0x0000000118f06000 /System/Library/PrivateFrameworks/JavaLaunching.framework/Versions/A/JavaLaunching
      0x0000000008ea2000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
      0x0000000008ea2000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
      0x0000000008ea2000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
      0x0000000008ea2000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
      0x0000000008ea2000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
      0x0000000008ea2000 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI

      VM Arguments:
      jvm_args: -verbose:jni -Xms1G -Xmx1G
      java_command: <unknown>
      java_class_path (initial): /Users/iranhutchinson/Workspaces/ISC/Workspace/ClionProjects/JavaIntegration/java/target/test-classes
      Launcher Type: generic

      Environment Variables:
      JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
      PATH=/Library/Frameworks/Python.framework/Versions/3.2/bin:/usr/bin:/usr/local/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin:/bin:/Developer/NVIDIA/CUDA-6.5/bin:/Users/iranhutchinson/Workspaces/Personal/Applications/Version-Control/Perforce:.:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/opt/nuodb/bin:/Library/Frameworks/Python.framework/Versions/3.2/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin:/Developer/NVIDIA/CUDA-6.5/bin:/Users/iranhutchinson/Workspaces/Personal/Applications/Version-Control/Perforce:.
      SHELL=/bin/bash

      Signal Handlers:
      SIGSEGV: [libjvm.dylib+0x5a6d31], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART
      SIGBUS: [libjvm.dylib+0x5a6d31], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
      SIGFPE: [testJavaIntegration+0xcb300], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART
      SIGPIPE: [libjvm.dylib+0x480a4c], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
      SIGXFSZ: [libjvm.dylib+0x480a4c], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
      SIGILL: [testJavaIntegration+0xcb300], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART
      SIGUSR1: SIG_DFL, sa_mask[0]=11011111011111100000000111000110, sa_flags=none
      SIGUSR2: [libjvm.dylib+0x48056a], sa_mask[0]=00100000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO
      SIGHUP: [libjvm.dylib+0x47eb41], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO
      SIGINT: [testJavaIntegration+0xcb300], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART
      SIGTERM: [testJavaIntegration+0xcb300], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART
      SIGQUIT: [libjvm.dylib+0x47eb41], sa_mask[0]=11111111011111110111111111111111, sa_flags=SA_RESTART|SA_SIGINFO


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

      OS:Bsduname:Darwin 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
      rlimit: STACK 8192k, CORE 0k, NPROC 709, NOFILE 10240, AS infinity
      load average:1.93 2.24 2.35

      CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 58 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, aes, clmul, erms, ht, tsc, tscinvbit, tscinv

      Memory: 4k page, physical 16777216k(1499428k free)

      /proc/meminfo:


      vm_info: Java HotSpot(TM) 64-Bit Server VM (25.60-b23) for bsd-amd64 JRE (1.8.0_60-b27), built on Aug 4 2015 10:47:24 by "java_re" with gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

      time: Thu Aug 27 16:53:20 2015
      elapsed time: 0 seconds (0d 0h 0m 0s)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      TEST_CASE("Test: Basic JVM Creation + Java Method Call", "[basic]") {
          JavaVM *jvm;
          JNIEnv *env;
          JavaVMInitArgs vm_args;
          JavaVMOption *options = new JavaVMOption[1];
          char *opt = "-Djava.class.path=/Users/iranhutchinson/Workspaces/ISC/Workspace/ClionProjects/JavaIntegration/java/target/test-classes";
          options[0].optionString = opt;
          vm_args.version = JNI_VERSION_1_6;
          vm_args.nOptions = 1;
          vm_args.options = options;
          
          vm_args.ignoreUnrecognized = false;

          jint response = JNI_CreateJavaVM(&jvm, (void **) &env, &vm_args);

          jclass cls = env->FindClass("com/intersystems/tbd/internal/TestRunner");
          jmethodID mid = env->GetStaticMethodID(cls, "main", "([Ljava/lang/String;)V");
          jobjectArray mainargs = env->NewObjectArray(2, env->FindClass("java/lang/String"), NULL);
          env->CallStaticVoidMethod(cls, mid, mainargs);

          delete options;

          jvm->DestroyJavaVM();
      }

      public class TestRunner {
          public TestRunner(){
              System.out.println("In Constructor of TestRunner");
          }
          public TestRunner(String args){
              if(args != null)
                  System.out.println("Args passed in: " + args);
          }
          public Object testObjectMethod(){
              return new Object();
          }
          public Object[] testObjectArrayMethod(){
              return new Object[10];
          }
          public Integer testObjectSizeMethod(Object... args){
              return args.length;
          }
          public Collection<String> testArrayCollectionMethod(){
              Collection<String> coll = new ArrayList<>(10);
              coll.add("Value One");
              return coll;
          }
          public Map<String, Object> testHashMapMethod(){
              Map<String, Object> map = new HashMap<>(10);
              map.put("Key One", "Value One");
              return map;
          }
          public int testHashMapMethod(Map<String, Object> args){
              return args.size();
          }
          protected String testProtectedStringMethod(){
              return "Test Protected String Method";
          }
          private String testStringMethod(){
              return "Test String Method";
          }
          private Long testLongMethod(){
              return Long.valueOf(0);
          }
          private Integer tesIntMethod(Integer arg){
              if(arg == 10)
                  return 0;
              else
                  return 1;
          }
          public static String[] testStringMethod(String...args){
              for(String s: args){
                  if(args != null){
                      System.out.println("s->" + s);
                  }
              }
              String[] value = {"Value 1", "Value 2"};
              return value;
          }

          public static void main(String args[]){
              System.out.println("Test Runner");
              if(args != null){
                  for(int idx=0; idx<args.length; idx++){
                      System.out.println("Argument "+ idx + "=" + args[idx]);
                  }
              }
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      None at the moment.

        Attachments

        1. CMakeLists.txt
          0.8 kB
        2. main.cpp
          1.0 kB
        3. README.txt
          4 kB

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: