Graal: [native-image]VMError.shouldNotReachHere: javax.crypto.JceSecurity.getCodeBase(Class) is reached at runtime

Created on 27 Nov 2018  路  7Comments  路  Source: oracle/graal

I created a Java class to handle csv file, compile and native-image succeed with following command:

[root@localhost yuyin]# javac -cp .:commons-lang-2.6.jar:javacsv-2.0.jar:fastjson-1.2.47.jar TranslateMe.java 
Note: TranslateMe.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[root@localhost yuyin]# native-image -cp .:commons-lang-2.6.jar:javacsv-2.0.jar:fastjson-1.2.47.jar:springfox-spring-web-2.9.2.jar:commons-codec-1.9.jar:guava-19.0.jar TranslateMe
Build on Server(pid: 12073, port: 39356)
[translateme:12073]    classlist:   1,817.08 ms
[translateme:12073]        (cap):   1,476.90 ms
[translateme:12073]        setup:   2,083.27 ms
[translateme:12073]   (typeflow):  12,302.75 ms
[translateme:12073]    (objects):   2,678.75 ms
[translateme:12073]   (features):     167.29 ms
[translateme:12073]     analysis:  15,521.68 ms
[translateme:12073]     universe:     700.79 ms
[translateme:12073]      (parse):   4,576.88 ms
[translateme:12073]     (inline):   4,462.09 ms
[translateme:12073]    (compile):  36,130.38 ms
[translateme:12073]      compile:  45,809.76 ms
[translateme:12073]        image:     875.62 ms
[translateme:12073]        write:     297.93 ms
[translateme:12073]      [total]:  67,160.56 ms

But the error threw when I executed the native image;

[root@localhost yuyin]# ./translateme 20181127090023.csv text.csv category.csv 
VMError.shouldNotReachHere: javax.crypto.JceSecurity.getCodeBase(Class) is reached at runtime. This should not happen. The contents of JceSecurity.verificationResults are computed and cached at image build time.

JavaFrameAnchor dump:

  No anchors

DeoptStubPointer address: 0000000000000000

TopFrame info:

  Lookup TotalFrameSize in CodeInfoTable:
  SourceTotalFrameSize 96

VMThreads info:

  VMThread 000000000155a050  STATUS_IN_JAVA (safepoints disabled)  java.lang.Thread@0x7f4e35815eb8

VM Thread State for current thread 000000000155a050:

  0 (8 bytes): com.oracle.svm.jni.JNIThreadLocalEnvironment.jniFunctions = (bytes) 
    000000000155a050: 0000000000000000

  8 (32 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.pinnedTLAB = (bytes) 
    000000000155a058: 0000000000000000 0000000000000000
    000000000155a068: 0000000000000000 0000000000000000


  40 (32 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.regularTLAB = (bytes) 
    000000000155a078: 00007f4e35c00000 00007f4e35d00000
    000000000155a088: 00007f4e35cc9aa8 0000000000000000


  72 (8 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.freeList = (Word) 0  0000000000000000
  80 (8 bytes): com.oracle.svm.core.stack.JavaFrameAnchors.lastAnchor = (Word) 0  0000000000000000
  88 (8 bytes): com.oracle.svm.core.thread.VMThreads.IsolateTL = (Word) 139973878173696  00007f4e35495000
  96 (8 bytes): com.oracle.svm.core.thread.VMThreads.OSThreadIdTL = (Word) 140008257120064  00007f56366e6740
  104 (8 bytes): com.oracle.svm.core.thread.VMThreads.nextTL = (Word) 0  0000000000000000
  112 (4 bytes): com.oracle.svm.core.genscavenge.PinnedAllocatorImpl.openPinnedAllocator = (Object) null
  116 (4 bytes): com.oracle.svm.core.heap.NoAllocationVerifier.openVerifiers = (Object) null
  120 (4 bytes): com.oracle.svm.core.jdk.IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) null
  124 (4 bytes): com.oracle.svm.core.snippets.SnippetRuntime.currentException = (Object) null
  128 (4 bytes): com.oracle.svm.core.thread.JavaThreads.currentThread = (Object) java.lang.Thread  00007f4e35815eb8
  132 (4 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.activeTimer = (Object) null
  136 (4 bytes): com.oracle.svm.jni.JNIThreadLocalHandles.handles = (Object) null
  140 (4 bytes): com.oracle.svm.jni.JNIThreadLocalPendingException.pendingException = (Object) null
  144 (4 bytes): com.oracle.svm.jni.JNIThreadLocalPinnedObjects.pinnedObjectsListHead = (Object) null
  148 (4 bytes): com.oracle.svm.jni.JNIThreadOwnedMonitors.ownedMonitors = (Object) null
  152 (4 bytes): com.oracle.svm.core.thread.Safepoint.safepointRequested = (int) -1694969  ffe62307
  156 (4 bytes): com.oracle.svm.core.thread.Safepoint.safepointRequestedValueBeforeSafepoint = (int) 0  00000000
  160 (4 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.currentPauseDepth = (int) 0  00000000
  164 (4 bytes): com.oracle.svm.core.thread.VMOperationControl.isLockOwner = (int) 0  00000000
  168 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.safepointsDisabledTL = (int) 1  00000001
  172 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.statusTL = (int) 1  00000001

VMOperation dump:

  No VMOperation in progress


RuntimeCodeCache dump:

  == [Recent RuntimeCodeCache operations: ]

  == [RuntimeCodeCache: 0 methods]

Deoptimizer dump:

  == [Recent Deoptimizer Events: 
  ]

Dump Counters:


Raw Stacktrace:

  00007ffe385fbb20: 00007f4e35cc9798 00000000006ff5ff
  00007ffe385fbb30: 00007f4e35c97e20 00000000004fc184
  00007ffe385fbb40: 00007f4e35cc9928 0000002b35cc9688
  00007ffe385fbb50: 000000b735cc9798 00007f4e356e9220
  00007ffe385fbb60: 00007f4e3577d518 00007f4e35495000
  00007ffe385fbb70: 00007f4e35cc9918 000000000054f67f
  00007ffe385fbb80: 00000000000000b7 00007f4e35cc9798
  00007ffe385fbb90: 00007f4e35cc9918 000000000052c783
  00007ffe385fbba0: 00007f4e35870518 000000070007b6a3
  00007ffe385fbbb0: 00007f4e35cc9918 00007f4e35cc96f0
  00007ffe385fbbc0: 00007f4e356f04f8 00000000007e3af4
  00007ffe385fbbd0: 00007f4e35c89420 000000000074d3e1
  00007ffe385fbbe0: 00007f4e35c8a598 00007f4e357778d8
  00007ffe385fbbf0: 00007f4e3581a2c0 00007f4e35495000
  00007ffe385fbc00: 00007f4e3581a2a0 00007f4e356f0480
  00007ffe385fbc10: 00007f4e35870518 00000000004fa35c
  00007ffe385fbc20: 0005739135c89328 00007f4e35c8a4c0
  00007ffe385fbc30: 00007f4e35870518 0000000035495000
  00007ffe385fbc40: 00007f4e35cbb1a0 00007f4e35c8a598
  00007ffe385fbc50: 00007f4e35c8a588 00007f4e35c8a558
  00007ffe385fbc60: 00007f4e3574e5d0 00007f4e356e8f48
  00007ffe385fbc70: 00049ea235c88898 0000000000000005
  00007ffe385fbc80: 0000000535814a30 00007f4e35c84b88
  00007ffe385fbc90: 00007f4e356e5640 00000000004082d7
  00007ffe385fbca0: 00007f4e35495000 0000000000540e03
  00007ffe385fbcb0: 00007f4e3586eb18 00000000007f7a5b
  00007ffe385fbcc0: 0000000000000000 0000000000000000
  00007ffe385fbcd0: 00007ffe385fbd10 00007ffe385fbcb0
  00007ffe385fbce0: 0000000000000000 000000000053fc13
  00007ffe385fbcf0: 00007f4e35495000 00007f4e35c8a528
  00007ffe385fbd00: 00007f4e35c88898 00007f4e35c893e8
  00007ffe385fbd10: 000fe87d00501ea0 00007f4e35c883b8
  00007ffe385fbd20: 0006ff3a0006ff3a 000fdebc0006ff3a
  00007ffe385fbd30: 00007f4e358149d0 00007f4e358149d0
  00007ffe385fbd40: 00007f4e358149d0 00007f4e35c845e0
  00007ffe385fbd50: 00007f4e35c845c0 00007f4e358149d0
  00007ffe385fbd60: 00007f4e356e55f0 000fdeaf00000002
  00007ffe385fbd70: 000fde96000fdea2 00007f4e35c84578
  00007ffe385fbd80: 00007f4e35c84510 00007f4e35c844b0
  00007ffe385fbd90: 00007f4e35c862d8 00007f4e35814a10
  00007ffe385fbda0: 00007f4e35c7d368 00007f4e356e55d0
  00007ffe385fbdb0: 00007f4e356c7180 00007f4e3574eda8
  00007ffe385fbdc0: 00007f4e35911798 00007f4e35911768
  00007ffe385fbdd0: 00007f4e35911738 00007f4e3574ec88
  00007ffe385fbde0: 00007f4e35911598 00007f4e3590a6a8
  00007ffe385fbdf0: 00007f4e35908350 0000000b00000003
  00007ffe385fbe00: 00007f4e35901098 00000000004fac4e
  00007ffe385fbe10: 00007f4e354953a8 00007f4e35495000
  00007ffe385fbe20: 000000b000000000 0000000000527149
  00007ffe385fbe30: 00007f4e35901098 00007f4e35901098
  00007ffe385fbe40: 00007f4e356e8f88 00007ffe385fbf98
  00007ffe385fbe50: 0000000435495000 0000000000501769
  00007ffe385fbe60: 00007f56362c4870 0000000000f0b5ff
  00007ffe385fbe70: 0000000000000001 00007ffe385fbf98
  00007ffe385fbe80: 00000004385fbeb0 0000000000000000
  00007ffe385fbe90: 0000000000000000 0000000000000000
  00007ffe385fbea0: 00007ffe385fbf90 0000000000402000
  00007ffe385fbeb0: 0000000000000000 00007f56356ba445
  00007ffe385fbec0: 0000002000000000 00007ffe385fbf98
  00007ffe385fbed0: 0000000400000000 00000000005016f0
  00007ffe385fbee0: 0000000000000000 31682007716fe0c5
  00007ffe385fbef0: 0000000000402000 00007ffe385fbf90
  00007ffe385fbf00: 0000000000000000 0000000000000000
  00007ffe385fbf10: ce9450b80cefe0c5 cfc44ad03695e0c5

Stacktrace Stage0:

  RSP 00007ffe385fbb20 RIP 000000000052e834 FrameSize 96
  RSP 00007ffe385fbb80 RIP 000000000054f67f FrameSize 32
  RSP 00007ffe385fbba0 RIP 000000000052c783 FrameSize 48
  RSP 00007ffe385fbbd0 RIP 00000000007e3af4 FrameSize 80
  RSP 00007ffe385fbc20 RIP 00000000004fa35c FrameSize 128
  RSP 00007ffe385fbca0 RIP 00000000004082d7 FrameSize 368
  RSP 00007ffe385fbe10 RIP 00000000004fac4e FrameSize 80
  RSP 00007ffe385fbe60 RIP 0000000000501769 FrameSize 1

Stacktrace Stage1:

  RSP 00007ffe385fbb20 RIP 000000000052e834  com.oracle.svm.core.code.ImageCodeInfo@0x7f4e35755be0 name = image code
  RSP 00007ffe385fbb80 RIP 000000000054f67f  com.oracle.svm.core.code.ImageCodeInfo@0x7f4e35755be0 name = image code
  RSP 00007ffe385fbba0 RIP 000000000052c783  com.oracle.svm.core.code.ImageCodeInfo@0x7f4e35755be0 name = image code
  RSP 00007ffe385fbbd0 RIP 00000000007e3af4  com.oracle.svm.core.code.ImageCodeInfo@0x7f4e35755be0 name = image code
  RSP 00007ffe385fbc20 RIP 00000000004fa35c  com.oracle.svm.core.code.ImageCodeInfo@0x7f4e35755be0 name = image code
  RSP 00007ffe385fbca0 RIP 00000000004082d7  com.oracle.svm.core.code.ImageCodeInfo@0x7f4e35755be0 name = image code
  RSP 00007ffe385fbe10 RIP 00000000004fac4e  com.oracle.svm.core.code.ImageCodeInfo@0x7f4e35755be0 name = image code
  RSP 00007ffe385fbe60 RIP 0000000000501769  com.oracle.svm.core.code.ImageCodeInfo@0x7f4e35755be0 name = image code

Full Stacktrace:

  RSP 00007ffe385fbb20 RIP 000000000052e834  [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shutdown(VMErrorSubstitutions.java:146)
  RSP 00007ffe385fbb80 RIP 000000000054f67f  [image code] com.oracle.svm.core.jdk.Target_com_oracle_svm_core_util_VMError.shouldNotReachHere(VMErrorSubstitutions.java:63)
  RSP 00007ffe385fbba0 RIP 000000000052c783  [image code] com.oracle.svm.core.jdk.JceSecurityUtil.shouldNotReach(SecuritySubstitutions.java:270)
  RSP 00007ffe385fbbd0 RIP 00000000007e3af4  [image code] com.oracle.svm.core.jdk.Target_javax_crypto_JceSecurity.getCodeBase(SecuritySubstitutions.java:236)
  RSP 00007ffe385fbbd0 RIP 00000000007e3af4  [image code] javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:189)
  RSP 00007ffe385fbc20 RIP 00000000004fa35c  [image code] javax.crypto.JceSecurity.canUseProvider(JceSecurity.java:204)
  RSP 00007ffe385fbc20 RIP 00000000004fa35c  [image code] javax.crypto.SecretKeyFactory.nextSpi(SecretKeyFactory.java:295)
  RSP 00007ffe385fbc20 RIP 00000000004fa35c  [image code] javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:121)
  RSP 00007ffe385fbc20 RIP 00000000004fa35c  [image code] javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:160)
  RSP 00007ffe385fbca0 RIP 00000000004082d7  [image code] TranslateMe.main(TranslateMe.java:116)
  RSP 00007ffe385fbe10 RIP 00000000004fac4e  [image code] com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:164)
  RSP 00007ffe385fbe60 RIP 0000000000501769  [image code] com.oracle.svm.core.code.CEntryPointCallStubs.com_002eoracle_002esvm_002ecore_002eJavaMainWrapper_002erun_0028int_002corg_002egraalvm_002enativeimage_002ec_002etype_002eCCharPointerPointer_0029(generated:0)

[Native image heap boundaries: 
  ReadOnly Primitives: 0x7f4e35495008 .. 0x7f4e356e4b50
  ReadOnly References: 0x7f4e356e5528 .. 0x7f4e3577a998
  Writable Primitives: 0x7f4e3577b000 .. 0x7f4e358147e0
  Writable References: 0x7f4e358147f0 .. 0x7f4e35890538]


[Heap:
  [Young generation: 
    [youngSpace:
      aligned: 0/0 unaligned: 0/0]]
  [Old generation: 
    [fromSpace:
      aligned: 0/0 unaligned: 0/0]
    [toSpace:
      aligned: 0/0 unaligned: 0/0]
    [pinnedFromSpace:
      aligned: 0/0 unaligned: 0/0]
    [pinnedToSpace:
      aligned: 0/0 unaligned: 0/0]]
  [Unused:
    aligned: 0/0]]

[root@localhost yuyin]# 
bug native-image

Most helpful comment

@wkgcass thank you for reporting back. On the latest RC the error message should also contain the suggestion to use the --enable-all-security-services option.

All 7 comments

same issue here, version rc9

$ ./totp 100 sx
VMError.shouldNotReachHere: javax.crypto.JceSecurity.getCodeBase(Class) is reached at runtime. This should not happen. The contents of JceSecurity.verificationResults are computed and cached at image build time.

JavaFrameAnchor dump:

  No anchors

DeoptStubPointer address: 0000000000000000

TopFrame info:

  Lookup TotalFrameSize in CodeInfoTable:
  SourceTotalFrameSize 96

VMThreads info:

  VMThread 00007fc5674004a0  STATUS_IN_JAVA (safepoints disabled)  java.lang.Thread@0x10803d078

VM Thread State for current thread 00007fc5674004a0:

  0 (8 bytes): com.oracle.svm.jni.JNIThreadLocalEnvironment.jniFunctions = (bytes)
    00007fc5674004a0: 0000000000000000

  8 (32 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.pinnedTLAB = (bytes)
    00007fc5674004a8: 0000000000000000 0000000000000000
    00007fc5674004b8: 0000000000000000 0000000000000000


  40 (32 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.regularTLAB = (bytes)
    00007fc5674004c8: 0000000108100000 0000000108200000
    00007fc5674004d8: 000000010815d050 0000000000000000


  72 (8 bytes): com.oracle.svm.core.genscavenge.PinnedAllocatorImpl.openPinnedAllocator = (Object) null
  80 (8 bytes): com.oracle.svm.core.heap.NoAllocationVerifier.openVerifiers = (Object) null
  88 (8 bytes): com.oracle.svm.core.jdk.IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) null
  96 (8 bytes): com.oracle.svm.core.snippets.SnippetRuntime.currentException = (Object) null
  104 (8 bytes): com.oracle.svm.core.thread.JavaThreads.currentThread = (Object) java.lang.Thread  000000010803d078
  112 (8 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.activeTimer = (Object) null
  120 (8 bytes): com.oracle.svm.jni.JNIThreadLocalHandles.handles = (Object) null
  128 (8 bytes): com.oracle.svm.jni.JNIThreadLocalPendingException.pendingException = (Object) null
  136 (8 bytes): com.oracle.svm.jni.JNIThreadLocalPinnedObjects.pinnedObjectsListHead = (Object) null
  144 (8 bytes): com.oracle.svm.jni.JNIThreadOwnedMonitors.ownedMonitors = (Object) null
  152 (8 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.freeList = (Word) 0  0000000000000000
  160 (8 bytes): com.oracle.svm.core.stack.JavaFrameAnchors.lastAnchor = (Word) 0  0000000000000000
  168 (8 bytes): com.oracle.svm.core.thread.VMThreads.IsolateTL = (Word) 4426727424  0000000107da8000
  176 (8 bytes): com.oracle.svm.core.thread.VMThreads.OSThreadIdTL = (Word) 4439479744  00000001089d15c0
  184 (8 bytes): com.oracle.svm.core.thread.VMThreads.nextTL = (Word) 0  0000000000000000
  192 (4 bytes): com.oracle.svm.core.thread.Safepoint.safepointRequested = (int) -170737  fffd650f
  196 (4 bytes): com.oracle.svm.core.thread.Safepoint.safepointRequestedValueBeforeSafepoint = (int) 0  00000000
  200 (4 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.currentPauseDepth = (int) 0  00000000
  204 (4 bytes): com.oracle.svm.core.thread.VMOperationControl.isLockOwner = (int) 0  00000000
  208 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.safepointsDisabledTL = (int) 1  00000001
  212 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.statusTL = (int) 1  00000001

VMOperation dump:

  No VMOperation in progress


RuntimeCodeCache dump:

  == [Recent RuntimeCodeCache operations: ]

  == [RuntimeCodeCache: 0 methods]

Deoptimizer dump:

  == [Recent Deoptimizer Events:
  ]

Dump Counters:


Raw Stacktrace:

  00007ffee8513130: 0000000107e26168 000000010779444b
  00007ffee8513140: 0000000107da8000 000000010815ced0
  00007ffee8513150: 000000b70815cd38 00000000000000b7
  00007ffee8513160: 000000010815cd38 0000000107f355c0
  00007ffee8513170: 0000000107fda538 0000000107da8000
  00007ffee8513180: 000000010815ceb8 000000010775165f
  00007ffee8513190: 00000000000000b7 000000010815cd38
  00007ffee85131a0: 000000010815ceb8 00000001077264a5
  00007ffee85131b0: 0000000000000138 0000000108094c30
  00007ffee85131c0: 000000010815ceb8 000000010815cc88
  00007ffee85131d0: 0000000107f3dca8 00000001078f14b5
  00007ffee85131e0: 0000000107f3de78 0000000108152ee0
  00007ffee85131f0: 0000000108101b00 0000000107fcbbc8
  00007ffee8513200: 0000000108046ae8 0000000107da8000
  00007ffee8513210: 0000000108046ab0 0000000107f3dc00
  00007ffee8513220: 0000000108094c30 00000001078f2dbb
  00007ffee8513230: 0000000000000010 0000000108101598
  00007ffee8513240: 0000000108152ee0 0000000108094c30
  00007ffee8513250: 000000010815cbc0 0000000108101b00
  00007ffee8513260: 0000000107f5f7d0 00000001076edeeb
  00007ffee8513270: 0000000107f39d98 0000000000000010
  00007ffee8513280: 0000000108101598 000000010779438c
  00007ffee8513290: 0000000108101ae0 0000000108101860
  00007ffee85132a0: 0000000107f5f7d0 00000001076ed154
  00007ffee85132b0: 00000010001a7fa8 0000000000000010
  00007ffee85132c0: 0000000108101550 0000000107792a11
  00007ffee85132d0: 0000000108101ae0 0000000107775201
  00007ffee85132e0: 0000000108101620 00000001081015c8
  00007ffee85132f0: 0000000108101860 0000000107f35120
  00007ffee8513300: 0000000108101580 00000001076ed75e
  00007ffee8513310: 0000000107f33dd8 000000010779d626
  00007ffee8513320: 00007ffee8513328 0000000108101538
  00007ffee8513330: 0000000108101500 000001677c368a8d
  00007ffee8513340: 0000000108101580 0000000107f35120
  00007ffee8513350: 0000000107da8000 00000001081013e0
  00007ffee8513360: 0000000108101100 00000001076ee205
  00007ffee8513370: 0000000107f33dd8 000000010803d008
  00007ffee8513380: 00000001081010c8 00000001076ee880
  00007ffee8513390: 0000000107da8118 0000000107da8000
  00007ffee85133a0: 00000000000000d8 0000000107720229
  00007ffee85133b0: 00000001081010c8 00000001081010c8
  00007ffee85133c0: 0000000107f35190 00007ffee8513458
  00007ffee85133d0: 0000000307da8000 00000001076f5919
  00007ffee85133e0: 00007ffee8513440 00000001076ec000
  00007ffee85133f0: 0000000e00000003 00007ffee8513458
  00007ffee8513400: 0000000300000000 00007ffee8513448
  00007ffee8513410: 0000000000000000 0000000000000000
  00007ffee8513420: 0000000000000000 0000000000000000
  00007ffee8513430: 0000000000000000 00007fff66bb308d
  00007ffee8513440: 00007fff66bb308d 0000000000000000
  00007ffee8513450: 0000000000000003 00007ffee8513638
  00007ffee8513460: 00007ffee851363f 00007ffee8513642
  00007ffee8513470: 0000000000000000 00007ffee8513651
  00007ffee8513480: 00007ffee851368d 00007ffee85136cf
  00007ffee8513490: 00007ffee851371b 00007fc567502870
  00007ffee85134a0: 00007ffee851373f 00007ffee851375d
  00007ffee85134b0: 00007ffee851376c 00007ffee8513784
  00007ffee85134c0: 00007ffee8513793 00007ffee85137ae
  00007ffee85134d0: 00007ffee85137c5 00007ffee8513ae1
  00007ffee85134e0: 00007ffee8513b2c 00007ffee8513b42
  00007ffee85134f0: 00007ffee8513b56 00007ffee8513b67
  00007ffee8513500: 00007ffee8513ba0 00007ffee8513baa
  00007ffee8513510: 00007ffee8513bbd 00007fc5676001c0
  00007ffee8513520: 00007ffee8513bec 00007ffee8513c29

Stacktrace Stage0:

  RSP 00007ffee8513130 RIP 0000000107728beb FrameSize 96
  RSP 00007ffee8513190 RIP 000000010775165f FrameSize 32
  RSP 00007ffee85131b0 RIP 00000001077264a5 FrameSize 48
  RSP 00007ffee85131e0 RIP 00000001078f14b5 FrameSize 80
  RSP 00007ffee8513230 RIP 00000001078f2dbb FrameSize 64
  RSP 00007ffee8513270 RIP 00000001076edeeb FrameSize 64
  RSP 00007ffee85132b0 RIP 00000001076ed154 FrameSize 96
  RSP 00007ffee8513310 RIP 00000001076ed75e FrameSize 96
  RSP 00007ffee8513370 RIP 00000001076ee205 FrameSize 32
  RSP 00007ffee8513390 RIP 00000001076ee880 FrameSize 80
  RSP 00007ffee85133e0 RIP 00000001076f5919 FrameSize 1

Stacktrace Stage1:

  RSP 00007ffee8513130 RIP 0000000107728beb  com.oracle.svm.core.code.ImageCodeInfo@0x107fb12e0 name = image code
  RSP 00007ffee8513190 RIP 000000010775165f  com.oracle.svm.core.code.ImageCodeInfo@0x107fb12e0 name = image code
  RSP 00007ffee85131b0 RIP 00000001077264a5  com.oracle.svm.core.code.ImageCodeInfo@0x107fb12e0 name = image code
  RSP 00007ffee85131e0 RIP 00000001078f14b5  com.oracle.svm.core.code.ImageCodeInfo@0x107fb12e0 name = image code
  RSP 00007ffee8513230 RIP 00000001078f2dbb  com.oracle.svm.core.code.ImageCodeInfo@0x107fb12e0 name = image code
  RSP 00007ffee8513270 RIP 00000001076edeeb  com.oracle.svm.core.code.ImageCodeInfo@0x107fb12e0 name = image code
  RSP 00007ffee85132b0 RIP 00000001076ed154  com.oracle.svm.core.code.ImageCodeInfo@0x107fb12e0 name = image code
  RSP 00007ffee8513310 RIP 00000001076ed75e  com.oracle.svm.core.code.ImageCodeInfo@0x107fb12e0 name = image code
  RSP 00007ffee8513370 RIP 00000001076ee205  com.oracle.svm.core.code.ImageCodeInfo@0x107fb12e0 name = image code
  RSP 00007ffee8513390 RIP 00000001076ee880  com.oracle.svm.core.code.ImageCodeInfo@0x107fb12e0 name = image code
  RSP 00007ffee85133e0 RIP 00000001076f5919  com.oracle.svm.core.code.ImageCodeInfo@0x107fb12e0 name = image code

Full Stacktrace:

  RSP 00007ffee8513130 RIP 0000000107728beb  [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shutdown(VMErrorSubstitutions.java:146)
  RSP 00007ffee8513190 RIP 000000010775165f  [image code] com.oracle.svm.core.jdk.Target_com_oracle_svm_core_util_VMError.shouldNotReachHere(VMErrorSubstitutions.java:63)
  RSP 00007ffee85131b0 RIP 00000001077264a5  [image code] com.oracle.svm.core.jdk.JceSecurityUtil.shouldNotReach(SecuritySubstitutions.java:270)
  RSP 00007ffee85131e0 RIP 00000001078f14b5  [image code] com.oracle.svm.core.jdk.Target_javax_crypto_JceSecurity.getCodeBase(SecuritySubstitutions.java:236)
  RSP 00007ffee85131e0 RIP 00000001078f14b5  [image code] javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:189)
  RSP 00007ffee8513230 RIP 00000001078f2dbb  [image code] javax.crypto.JceSecurity.canUseProvider(JceSecurity.java:204)
  RSP 00007ffee8513230 RIP 00000001078f2dbb  [image code] javax.crypto.Mac.getInstance(Mac.java:176)
  RSP 00007ffee8513270 RIP 00000001076edeeb  [image code] TOTP.hmac_sha(TOTP.java:242)
  RSP 00007ffee85132b0 RIP 00000001076ed154  [image code] TOTP.doGenerateTOTP(TOTP.java:194)
  RSP 00007ffee8513310 RIP 00000001076ed75e  [image code] TOTP.generateTOTP(TOTP.java:120)
  RSP 00007ffee8513370 RIP 00000001076ee205  [image code] TOTP.main(TOTP.java:37)
  RSP 00007ffee8513390 RIP 00000001076ee880  [image code] com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:164)
  RSP 00007ffee85133e0 RIP 00000001076f5919  [image code] com.oracle.svm.core.code.CEntryPointCallStubs.com_002eoracle_002esvm_002ecore_002eJavaMainWrapper_002erun_0028int_002corg_002egraalvm_002enativeimage_002ec_002etype_002eCCharPointerPointer_0029(generated:0)

[Native image heap boundaries:
  ReadOnly Primitives: 0x107da8008 .. 0x107f343b0
  ReadOnly References: 0x107f35090 .. 0x107fd96d8
  Writable Primitives: 0x107fda000 .. 0x10803cce0
  Writable References: 0x10803ccf8 .. 0x1080c2a70]


[Heap:
  [Young generation:
    [youngSpace:
      aligned: 0/0 unaligned: 0/0]]
  [Old generation:
    [fromSpace:
      aligned: 0/0 unaligned: 0/0]
    [toSpace:
      aligned: 0/0 unaligned: 0/0]
    [pinnedFromSpace:
      aligned: 0/0 unaligned: 0/0]
    [pinnedToSpace:
      aligned: 0/0 unaligned: 0/0]]
  [Unused:
    aligned: 0/0]]

Any Updates?

Also getting this error with rc12, any updates now?

Looking at the stacktraces above it looks like both examples use security services which need to be explicitly enabled. Can you please try running native-image with the --enable-all-security-services option? You can read more about the JCA Security Services support on native-image here.

Ah, I forgot to add this option. The solution works for me.

@wkgcass thank you for reporting back. On the latest RC the error message should also contain the suggestion to use the --enable-all-security-services option.

in rc13, using --enable-all-security-services options , it worked 馃憤

Was this page helpful?
0 / 5 - 0 ratings