Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault with Micronaut and native-image-agent #1194

Closed
ilopmar opened this issue Apr 25, 2019 · 2 comments
Closed

Segfault with Micronaut and native-image-agent #1194

ilopmar opened this issue Apr 25, 2019 · 2 comments
Assignees

Comments

@ilopmar
Copy link

ilopmar commented Apr 25, 2019

I'm following this https://github.com/oracle/graal/blob/master/substratevm/CONFIGURE.md to use the native-image-agent with a Micronaut application that uses Hibernate and JPA and I've hit a segfault.

To reproduce the issue:

  • git clone https://github.com/micronaut-graal-tests/micronaut-hibernate-graal
  • cd micronaut-hibernate-graal
  • git checkout mn-110
  • ./gradlew assemble
  • Use Graal from master branch (currently rc17-dev)
  • java -agentlib:native-image-agent=config-output-dir=/tmp/config -jar build/libs/hibernate-graal-0.1.jar
12:38:41.646 [main] INFO  org.hibernate.Version - HHH000412: Hibernate Core {[WORKING]}
12:38:41.674 [main] INFO  org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found
12:38:42.037 [main] INFO  o.h.validator.internal.util.Version - HV000001: Hibernate Validator null
12:38:42.104 [main] INFO  o.h.v.i.engine.ConfigurationImpl - HV000002: Ignoring XML configuration.
12:38:43.109 [main] INFO  o.h.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
Fatal error: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
    at com.oracle.svm.configure.trace.ReflectionProcessor.processEntry(ReflectionProcessor.java:146)
    at com.oracle.svm.configure.trace.TraceProcessor.processEntry(TraceProcessor.java:110)
    at com.oracle.svm.agent.TraceProcessorWriterAdapter.traceEntry(TraceProcessorWriterAdapter.java:46)
    at com.oracle.svm.agent.TraceWriter.traceCall(TraceWriter.java:92)
    at com.oracle.svm.agent.BreakpointInterceptor.traceBreakpoint(BreakpointInterceptor.java:110)
    at com.oracle.svm.agent.BreakpointInterceptor.handleGetMethod(BreakpointInterceptor.java:291)
    at com.oracle.svm.agent.BreakpointInterceptor.getMethod(BreakpointInterceptor.java:264)
    at com.oracle.svm.agent.BreakpointInterceptor.onBreakpoint(BreakpointInterceptor.java:498)

JavaFrameAnchor dump:

  No anchors
  
TopFrame info:

  Lookup TotalFrameSize in CodeInfoTable:
  SourceTotalFrameSize 32
  
VMThreads info:

  VMThread 00007fce80000ff0  STATUS_IN_NATIVE  java.lang.Thread@0x7fceb3301030
  VMThread 00007fce8c007920  STATUS_IN_NATIVE  java.lang.Thread@0x7fceba401030
  VMThread 00007fce9800bea0  STATUS_IN_NATIVE  java.lang.Thread@0x7fcebaf011e0
  VMThread 00007fcee0006910  STATUS_IN_JAVA (safepoints disabled)  java.lang.Thread@0x7fcedfe01570
  
VM Thread State for current thread 00007fcee0006910:

  0 (8 bytes): com.oracle.svm.jni.JNIThreadLocalEnvironment.jniFunctions = (bytes) 
    00007fcee0006910: 0000000000000000
  
  8 (32 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.pinnedTLAB = (bytes) 
    00007fcee0006918: 0000000000000000 0000000000000000
    00007fcee0006928: 0000000000000000 0000000000000000
    
  
  40 (32 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.regularTLAB = (bytes) 
    00007fcee0006938: 00007fceb1600000 00007fceb1700000
    00007fcee0006948: 00007fceb162cd18 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  00007fcedfe01570
  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.graal.snippets.StackOverflowCheckImpl.stackBoundaryTL = (Word) 1  0000000000000001
  168 (8 bytes): com.oracle.svm.core.stack.JavaFrameAnchors.lastAnchor = (Word) 0  0000000000000000
  176 (8 bytes): com.oracle.svm.core.thread.VMThreads.IsolateTL = (Word) 140526573264896  00007fcee47b2000
  184 (8 bytes): com.oracle.svm.core.thread.VMThreads.OSThreadIdTL = (Word) 140526619674368  00007fcee73f4700
  192 (8 bytes): com.oracle.svm.core.thread.VMThreads.nextTL = (Word) 0  0000000000000000
  200 (4 bytes): com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.yellowZoneStateTL = (int) -16843010  fefefefe
  204 (4 bytes): com.oracle.svm.core.snippets.ImplicitExceptions.implicitExceptionsAreFatal = (int) 0  00000000
  208 (4 bytes): com.oracle.svm.core.thread.Safepoint.safepointRequested = (int) -1290873  ffec4d87
  212 (4 bytes): com.oracle.svm.core.thread.Safepoint.safepointRequestedValueBeforeSafepoint = (int) 0  00000000
  216 (4 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.currentPauseDepth = (int) 0  00000000
  220 (4 bytes): com.oracle.svm.core.thread.VMOperationControl.isLockOwner = (int) 0  00000000
  224 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.safepointsDisabledTL = (int) 1  00000001
  228 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.statusTL = (int) 1  00000001
  
VMOperation dump:

  No VMOperation in progress
  
Dump Counters:

  
Raw Stacktrace:

  00007fcee73f10e0: 0000000000000000 00007fcee47b2000
  00007fcee73f10f0: 00007fceb162c240 00007fcee443a03f
  00007fcee73f1100: 00007fcedfe0a1f8 00007fcee43adc18
  00007fcee73f1110: 00007fcebb80e540 00007fcee000f800
  00007fcee73f1120: 00007fcee73f1150 00007fcee0a06068
  00007fcee73f1130: 00007fcee47b2048 00007fcee49c2958
  00007fcee73f1140: 00007fcee022f240 00007fcee000f9e0
  00007fcee73f1150: 000000000000003e 00007fcee47b2000
  00007fcee73f1160: 000000e8e00101e0 00007fcee43ded6f
  00007fcee73f1170: 00007fcee73f11e0 00007fcee5f36faa
  00007fcee73f1180: 00000007c0001df8 00000007c0001df8
  00007fcee73f1190: 0000000000000000 00007fcee022f240
  00007fcee73f11a0: 00007fcee0a06060 00007fcee000f9e0
  00007fcee73f11b0: 00007fcee0007240 00007fcee73f13a0
  00007fcee73f11c0: 00007fcee73f1300 00007fcee01efbe0
  00007fcee73f11d0: 00007fcee73f1280 00007fcebb80e4e0
  00007fcee73f11e0: 00007fcee000f800 00007fcee5f3d7f5
  00007fcee73f11f0: 00007fceb1460b38 00007fcee73f12c0
  00007fcee73f1200: 00007fcee73f1270 00007fcee022f240
  00007fcee73f1210: 00000002e73f1230 00007fcee0007240
  00007fcee73f1220: 00007fcee73f1240 00007fcee73f1250
  00007fcee73f1230: 00007fcee73f1260 00007fcee000f800
  00007fcee73f1240: 00007fcebb80e540 00007fcee000f800
  00007fcee73f1250: 00007fcebb80e540 00007fcee000f800
  00007fcee73f1260: 00007fcebb80e540 00007fcee000f800
  00007fcee73f1270: 00007fcebb80e540 00007fcee000f800
  00007fcee73f1280: 00007fcebb80e540 00007fcee000f800
  00007fcee73f1290: 00007fcee000f800 00007fcee000f9e0
  00007fcee73f12a0: 00007fcee73f0000 00007fcee0a06060
  00007fcee73f12b0: 00007fcee022f240 0000000000000000
  00007fcee73f12c0: 00007fcee000f800 00007fcee00101a0
  00007fcee73f12d0: 00007fcee0003390 00007fcee00033f0
  00007fcee73f12e0: 00007fcee0003478 00000000000000d8
  00007fcee73f12f0: 00007fcee73f1590 00007fcee73f1380
  00007fcee73f1300: 00007fcebb80e540 00007fcee000fd70
  00007fcee73f1310: 00007fcee000fdb0 00007fcee000fdc0
  00007fcee73f1320: 00007fcee0010198 00000000000003d8
  00007fcee73f1330: 00007fcee000f800 00007fcee000f800
  00007fcee73f1340: 00007fcee00101a0 00007fcee0003390
  00007fcee73f1350: 00007fcee00033f0 00007fcee0003478
  00007fcee73f1360: 00000000000000d8 00007fcee73f12c0
  00007fcee73f1370: 00007fceb1460b38 00007fcee000f800
  00007fcee73f1380: 0000000000000000 00007fcebb80e4e0
  00007fcee73f1390: 00007fcee73f1458 00007fcee000f800
  00007fcee73f13a0: 00007fcee73f13d0 00007fcee5debd4f
  00007fcee73f13b0: 00000000000000ca 000000000000002a
  00007fcee73f13c0: 0000000000000000 00007fcebb80e4e0
  00007fcee73f13d0: 00007fcee73f1430 00007fcecb3d1afb
  00007fcee73f13e0: fffffffe00000000 00007fcecb3d1ac4
  00007fcee73f13f0: 00007fcee73f13f0 00007fcebb80e4e0
  00007fcee73f1400: 00007fcee73f1458 00007fcebb8b0138
  00007fcee73f1410: 0000000000000000 00007fcebb80e540
  00007fcee73f1420: 0000000000000000 00007fcee73f1448
  00007fcee73f1430: 00007fcee73f14a0 00007fcecb3a8de0
  00007fcee73f1440: 0000000000000000 0000000000000000
  00007fcee73f1450: 00000006c78abdc0 00000006c76003e8
  00007fcee73f1460: 00007fcee73f1460 00007fceb1462cdc
  00007fcee73f1470: 00007fcee73f14b8 00007fceb1462dc8
  00007fcee73f1480: 0000000000000000 00007fceb1462d58
  00007fcee73f1490: 00007fcee73f1448 00007fcee73f14c0
  00007fcee73f14a0: 00007fcee73f1520 00007fcecb3a14e7
  00007fcee73f14b0: 0000000000000000 0000000000000000
  00007fcee73f14c0: 00007fce00001fa0 00007fcee73f1590
  00007fcee73f14d0: 00007fcee73f15d0 00007fcee000f800
  
Stacktrace Stage0:

  RSP 00007fcee73f10e0 RIP 00007fcee443a099 FrameSize 32
  RSP 00007fcee73f1100 RIP 00007fcee443a03f FrameSize 16
  RSP 00007fcee73f1110 RIP 00007fcee43adc18 FrameSize 96
  RSP 00007fcee73f1170 RIP 00007fcee43ded6f FrameSize 1
  
Stacktrace Stage1:

  RSP 00007fcee73f10e0 RIP 00007fcee443a099  com.oracle.svm.core.code.ImageCodeInfo@0x7fcee4a64a60 name = image code
  RSP 00007fcee73f1100 RIP 00007fcee443a03f  com.oracle.svm.core.code.ImageCodeInfo@0x7fcee4a64a60 name = image code
  RSP 00007fcee73f1110 RIP 00007fcee43adc18  com.oracle.svm.core.code.ImageCodeInfo@0x7fcee4a64a60 name = image code
  RSP 00007fcee73f1170 RIP 00007fcee43ded6f  com.oracle.svm.core.code.ImageCodeInfo@0x7fcee4a64a60 name = image code
  
Full Stacktrace:

  RSP 00007fcee73f10e0 RIP 00007fcee443a099  [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shutdown(VMErrorSubstitutions.java:112)
  RSP 00007fcee73f10e0 RIP 00007fcee443a099  [image code] com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:74)
  RSP 00007fcee73f1100 RIP 00007fcee443a03f  [image code] com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:65)
  RSP 00007fcee73f1110 RIP 00007fcee43adc18  [image code] com.oracle.svm.agent.BreakpointInterceptor.onBreakpoint(BreakpointInterceptor.java:502)
  RSP 00007fcee73f1170 RIP 00007fcee43ded6f  [image code] com.oracle.svm.core.code.IsolateEnterStub.BreakpointInterceptor_onBreakpoint_eb6efcdcab5a3952595ed891216f22230f12aebb(IsolateEnterStub.java:0)
  
[Native image heap boundaries: 
  ReadOnly Primitives: 0x7fcee47b2008 .. 0x7fcee49c1668
  ReadOnly References: 0x7fcee49c2110 .. 0x7fcee4aa80f8
  Writable Primitives: 0x7fcee4aa9000 .. 0x7fcee4b0d4c8
  Writable References: 0x7fcee4b0d4e0 .. 0x7fcee4b866b0]


[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]]

Fatal error: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
@peter-hofer
Copy link
Member

Thank you for the report, I am already working on a fix.

@cstancu
Copy link
Member

cstancu commented Apr 30, 2019

This should be fixed by 8c84d1e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants