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

[native-image] SegFault Using Helidon, Google Cloud Libraries #3351

Closed
dansiviter opened this issue Apr 14, 2021 · 7 comments
Closed

[native-image] SegFault Using Helidon, Google Cloud Libraries #3351

dansiviter opened this issue Apr 14, 2021 · 7 comments
Assignees

Comments

@dansiviter
Copy link

Describe the issue
SegFault issue with application. Lack of understanding of how Graal static works has forced raising this ticket so hoping for either guidance or confirmation of it being a bug. The example app is Helidon integrated with Google Cloud Logging, Metrics & Tracing.

Steps to reproduce the issue
For Windows, run the following:

  1. git clone --depth 1 --branch GraalSegFault https://github.com/dansiviter/helidon-gcp
  2. docker build -f .\Dockerfile.native --no-cache -t helidon:native .
  3. gcloud auth application-default login
  4. docker run --rm -it -p 8080:8080 -e CLOUDSDK_CONFIG=/gcloud -v $Env:APPDATA/gcloud/:/gcloud:ro helidon:native
  5. Call http://localhost:8080/v1/greet
  6. Observe SegFault.

Describe GraalVM and your environment:

  • GraalVM version : CE 21.0.0
  • JDK major version: 11
  • OS: Docker (via Windows Docker for Desktop)
  • Architecture: x86-64

More details

[ [ SubstrateSegfaultHandler caught a segfault. ] ]

General Purpose Register Set values:

  RAX f9236a084f8442b0
  RBX f9236a084f8442b0
  RCX fffffffffffffff8
  RDX 0000000000000000
  RBP 00000000027c4410
  RSI 0000000000000000
  RDI 000000000101c3e0
  RSP 00007f6756373e00
  R8  0033b6032b000000
  R9  00007ffc00468080
  R10 0000000000000002
  R11 0000000000000003
  R12 00000000009c25ae
  R13 00007f6756373cc0
  R14 00007f6756600000
  R15 00007f675acd9280
  EFL 0000000000010282
  RIP 0000000002217108

JavaFrameAnchor dump:

  No anchors

TopFrame info:

  TotalFrameSize in CodeInfoTable 48

VMThreads info:

  VMThread 00007f675acd6b80  STATUS_IN_NATIVE  java.lang.Thread@0x7f6752c01258
  VMThread 00007f675acd6a80  STATUS_IN_NATIVE  io.netty.util.concurrent.FastThreadLocalThread@0x7f674c4cc1b8
  VMThread 00007f675acd6940  STATUS_IN_NATIVE  io.netty.util.concurrent.FastThreadLocalThread@0x7f674c4cb398
  VMThread 00007f675acd6840  STATUS_IN_NATIVE  jdk.internal.misc.InnocuousThread@0x7f674aab9b58
  VMThread 00007f675acd7f00  STATUS_IN_NATIVE  java.lang.Thread@0x7f674b65c250
  VMThread 00007f675acd7cc0  STATUS_IN_NATIVE  java.lang.Thread@0x7f6750e01ba0
  VMThread 00007f675acd7a80  STATUS_IN_NATIVE  java.lang.Thread@0x7f674b65c660
  VMThread 00007f675acd7dc0  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f6755629a60  VMThread 00007f675acd7b80  STATUS_IN_NATIVE  io.netty.util.concurrent.FastThreadLocalThread@0x7f674c652da0
  VMThread 00007f675acd7940  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc48de8
  VMThread 00007f675acd7840  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc48bb8
  VMThread 00007f675acd7700  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc48988
  VMThread 00007f675acd75c0  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc48648
  VMThread 00007f675acd74c0  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc481e8
  VMThread 00007f675acd7380  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc48418
  VMThread 00007f675acd7280  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc47fb8
  VMThread 00007f675acd7140  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc47ac8
  VMThread 00007f675acd7040  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc47cf8
  VMThread 00007f675acd8f00  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc47898
  VMThread 00007f675acd8dc0  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc47668
  VMThread 00007f675acd8cc0  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc473e8
  VMThread 00007f675acd8b80  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc471b8
  VMThread 00007f675acd8a80  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc46f88
  VMThread 00007f675acd8940  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc46d58
  VMThread 00007f675acd8840  STATUS_IN_NATIVE  java.lang.Thread@0x7f674fc46a08
  VMThread 00007f675acd9f00  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f67556277e8  VMThread 00007f675acd9dc0  STATUS_IN_NATIVE  java.lang.Thread@0x7f6750082b98
  VMThread 00007f675acd9cc0  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f675085c328  VMThread 00007f675acd9b80  STATUS_IN_NATIVE  java.lang.Thread@0x7f6751401c08
  VMThread 00007f675acd9940  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f67514018e8  VMThread 00007f675acd9840  STATUS_IN_NATIVE  java.lang.Thread@0x7f6754c01dd8
  VMThread 00007f675acd9700  STATUS_IN_NATIVE  java.lang.Thread@0x7f6754406540
  VMThread 00007f675acd95c0  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f6754c01ab8  VMThread 00007f675acd94c0  STATUS_IN_NATIVE  java.lang.Thread@0x7f6754406068
  VMThread 00007f675acd9380  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f67556251d0  VMThread 00007f675acd9280  STATUS_IN_JAVA (safepoints disabled)  java.lang.Thread@0x7f6752eb8ac0
  VMThread 00007f675acd9140  STATUS_IN_NATIVE  java.lang.Thread@0x7f6752e76a10
  VMThread 00007f675acd9040  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f6754eee4c0  VMThread 00007f675acf2ec0  STATUS_IN_NATIVE  java.lang.Thread@0x7f6754eed738
  VMThread 00007f675acf2d80  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f6754eed3a8  VMThread 00007f675acf2c40  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f67552111d8
  VMThread 00007f675acf26c0  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f6755611450
  VMThread 00007f675acf2580  STATUS_IN_NATIVE  java.lang.Thread@0x7f6754e2e618
  VMThread 00007f675acf2440  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f6755611140
  VMThread 00007f675acf2300  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f6755811140
  VMThread 00007f675acf21c0  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f6755af6ed0
  VMThread 00007f675acf2080  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f6755af6c38
  VMThread 00007f675ad4d6c0  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f675644dfd8
  VMThread 00007f675ad4d580  STATUS_IN_NATIVE  java.lang.Thread@0x7f67564033a8
  VMThread 00007f675ad4d440  STATUS_IN_NATIVE  java.lang.Thread@0x7f6757f13b90

VM Thread State for current thread 00007f675acd9280:

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

  8 (8 bytes): com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.stackBoundaryTL = (Word) 140081804734464  00007f675635f000
  16 (4 bytes): com.oracle.svm.core.thread.Safepoint.safepointRequested = (int) 2147466590  7fffbd5e
  20 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.statusTL = (int) 1  00000001
  24 (32 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.regularTLAB = (bytes)
    00007f675acd9298: 00007f6752a00000 00007f6752b00000
    00007f675acd92a8: 00007f6752a01210 0000000000000000


  56 (8 bytes): com.oracle.svm.core.thread.JavaThreads.currentThread = (Object) java.lang.Thread  00007f6752eb8ac0
  64 (8 bytes): com.oracle.svm.core.stack.JavaFrameAnchors.lastAnchor = (Word) 0  0000000000000000
  72 (8 bytes): com.oracle.svm.core.heap.NoAllocationVerifier.openVerifiers = (Object) null
  80 (8 bytes): com.oracle.svm.core.identityhashcode.IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) null
  88 (8 bytes): com.oracle.svm.core.snippets.ExceptionUnwind.currentException = (Object) null
  96 (8 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.activeTimer = (Object) null
  104 (8 bytes): com.oracle.svm.graal.isolated.IsolatedCompileClient.currentClient = (Object) null
  112 (8 bytes): com.oracle.svm.graal.isolated.IsolatedCompileContext.currentContext = (Object) null
  120 (8 bytes): com.oracle.svm.jni.JNIObjectHandles.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.thread.VMThreads.IsolateTL = (Word) 140081807491072  00007f6756600000
  160 (8 bytes): com.oracle.svm.core.thread.VMThreads.OSThreadHandleTL = (Word) 140081804820280  00007f6756373f38
  168 (8 bytes): com.oracle.svm.core.thread.VMThreads.OSThreadIdTL = (Word) 140081804820280  00007f6756373f38
  176 (8 bytes): com.oracle.svm.core.thread.VMThreads.nextTL = (Word) 140081881780544  00007f675acd9140
  184 (8 bytes): com.oracle.svm.core.thread.VMThreads.unalignedIsolateThreadMemoryTL = (Word) 140081881780832  00007f675acd9260
  192 (4 bytes): com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.yellowZoneStateTL = (int) 1  00000001
  196 (4 bytes): com.oracle.svm.core.snippets.ImplicitExceptions.implicitExceptionsAreFatal = (int) 0  00000000
  200 (4 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.currentPauseDepth = (int) 0  00000000
  204 (4 bytes): com.oracle.svm.core.thread.VMThreads$ActionOnTransitionToJavaSupport.actionTL = (int) 0  00000000
  208 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.safepointsDisabledTL = (int) 1  00000001

VMOperation dump:

  No VMOperation in progress

Dump Counters:


Raw Stacktrace:

  00007f6756373e00: 00000000009abaa0 fffffffffc8b78f0
  00007f6756373e10: 00007f6752eb78f0 00007f6752eb6560
  00007f6756373e20: 000000ae205a265f 00000000023d05ea
  00007f6756373e30: 00007f6752eb8ac0 00000000009cd00c
  00007f6756373e40: 00007f6756373ef0 0000000000000000
  00007f6756373e50: 00007f6752eb8ac0 00007f67588788a8
  00007f6756373e60: 000000000000000e 0000000000979c80
  00007f6756373e70: 0000000000000000 0000000000000000

Stacktrace Stage 0:

  SP 00007f6756373e00 IP 0000000002217108  FrameSize 48
  SP 00007f6756373e30 IP 00000000023d05ea  FrameSize 16
  SP 00007f6756373e40 IP 00000000009cd00c  FrameSize 48
  SP 00007f6756373e70 IP 0000000000979c80  FrameSize 96

Stacktrace Stage 1:

  SP 00007f6756373e00 IP 0000000002217108  com.oracle.svm.core.code.CodeInfo@0x7f6757d66af0 name = image code
  SP 00007f6756373e30 IP 00000000023d05ea  com.oracle.svm.core.code.CodeInfo@0x7f6757d66af0 name = image code
  SP 00007f6756373e40 IP 00000000009cd00c  com.oracle.svm.core.code.CodeInfo@0x7f6757d66af0 name = image code
  SP 00007f6756373e70 IP 0000000000979c80  com.oracle.svm.core.code.CodeInfo@0x7f6757d66af0 name = image code

Stacktrace Stage 2:

  SP 00007f6756373e00 IP 0000000002217108  com.oracle.svm.core.code.CodeInfo@0x7f6757d66af0 name = image code
  SP 00007f6756373e30 IP 00000000023d05ea  [image code] java.lang.Thread.run(Thread.java:834)
  SP 00007f6756373e40 IP 00000000009cd00c  [image code] com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
  SP 00007f6756373e70 IP 0000000000979c80  [image code] com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
  SP 00007f6756373e70 IP 0000000000979c80  [image code] com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(IsolateEnterStub.java:0)

[Native image heap boundaries:
  ReadOnly Primitives: 0x7f6756601028 .. 0x7f6756eb2778
  ReadOnly References: 0x7f6756eb2788 .. 0x7f67574d0e48
  ReadOnly Relocatables: 0x7f67574d1000 .. 0x7f6757c4f420
  Writable Primitives: 0x7f6757c50000 .. 0x7f6757dd45b0
  Writable References: 0x7f6757dd45c0 .. 0x7f67597a7ee8
  Writable Huge: 0x0 .. 0x0
  ReadOnly Huge: 0x7f6759800030 .. 0x7f675ac49b88]


[Heap:
  [Young generation:
    [Eden:
      [edenSpace:
        aligned: 3133320/3 unaligned: 0/0
        aligned chunks:
          0x7f674c800000 (0x7f674c801028-0x7f674c8010c8)
          0x7f674c200000 (0x7f674c201028-0x7f674c214608)
          0x7f674a800000 (0x7f674a801028-0x7f674a801190)]]
    [Survivors:
      ]]
  [Old generation:
    [oldFromSpace:
      aligned: 0/0 unaligned: 0/0]
    [oldToSpace:
      aligned: 0/0 unaligned: 0/0]
    ]
  [Unused:
    aligned: 0/0]]

Segfault detected, aborting process. Use runtime option -R:-InstallSegfaultHandler if you don't want to use SubstrateSegfaultHandler.
@dansiviter dansiviter added the bug label Apr 14, 2021
@dansiviter dansiviter changed the title SegFault Using Helidon, Google Cloud Libraries & Graal Static [native-image] SegFault Using Helidon, Google Cloud Libraries Apr 14, 2021
@oubidar-Abderrahim oubidar-Abderrahim self-assigned this Apr 19, 2021
@dansiviter
Copy link
Author

FYI I've just tried this with 21.1.0 (linux_amd64) Java 11 based and it's still an issue.

[ [ SubstrateSegfaultHandler caught a segfault. ] ]

General Purpose Register Set values:

  RAX f96367fdb563a888
  RBX f96367fdb563a888
  RCX fffffffffffffff8
  RDX 0000000000000000
  RBP 00000000026efe20
  RSI fffffffffc4011d8
  RDI 0000000000fa0188
  RSP 00007f3cbbdb9e00
  R8  000a8bb276000000
  R9  00007ffcb6baa080
  R10 0000000000000002
  R11 0000000000000003
  R12 000000000098bc6c
  R13 00007f3cbbdb9cc0
  R14 00007f3cbc000000
  R15 00007f3cc044c280
  EFL 0000000000010286
  RIP 000000000212efe3

JavaFrameAnchor dump:

  No anchors

TopFrame info:

  TotalFrameSize in CodeInfoTable 48

VMThreads info:

  VMThread 00007f3cc0449a80  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb8601258
  VMThread 00007f3cc0449940  STATUS_IN_NATIVE  io.netty.util.concurrent.FastThreadLocalThread@0x7f3cb1ecc1d0
  VMThread 00007f3cc0449840  STATUS_IN_NATIVE  io.netty.util.concurrent.FastThreadLocalThread@0x7f3cb1ecb3a0
  VMThread 00007f3cc0449700  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb10535a0
  VMThread 00007f3cc04494c0  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb6001ba0
  VMThread 00007f3cc0449280  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb10530e8
  VMThread 00007f3cc04495c0  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f3cbae1e070  
  VMThread 00007f3cc0449380  STATUS_IN_NATIVE  io.netty.util.concurrent.FastThreadLocalThread@0x7f3cb205eb08
  VMThread 00007f3cc0449140  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f3cb3e5c328  
  VMThread 00007f3cc0449040  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a52ae8
  VMThread 00007f3cc044a700  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a528a8
  VMThread 00007f3cc044a5c0  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a52668
  VMThread 00007f3cc044a4c0  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a52318
  VMThread 00007f3cc044a380  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a520d8
  VMThread 00007f3cc044a280  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a51e98
  VMThread 00007f3cc044a140  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a51c58
  VMThread 00007f3cc044a040  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a51988
  VMThread 00007f3cc044bf00  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a51748
  VMThread 00007f3cc044bdc0  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a51508
  VMThread 00007f3cc044bcc0  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a512c8
  VMThread 00007f3cc044bb80  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a51038
  VMThread 00007f3cc044ba80  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a50df8
  VMThread 00007f3cc044b940  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a50bb8
  VMThread 00007f3cc044b840  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a50978
  VMThread 00007f3cc044cf00  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb5a50618
  VMThread 00007f3cc044cdc0  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f3cbae1bde8  
  VMThread 00007f3cc044ccc0  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb6401c60
  VMThread 00007f3cc044ca80  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f3cb6401930  
  VMThread 00007f3cc044c940  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cba601de8
  VMThread 00007f3cc044c840  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb9e06580
  VMThread 00007f3cc044c700  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f3cba601ab8  
  VMThread 00007f3cc044c5c0  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb9e061a8
  VMThread 00007f3cc044c4c0  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb6a8c698
  VMThread 00007f3cc044c380  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f3cbae19790  
  VMThread 00007f3cc044c280  STATUS_IN_JAVA (safepoints disabled)  java.lang.Thread@0x7f3cb88b8b88
  VMThread 00007f3cc044c140  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cb8876a28
  VMThread 00007f3cc044c040  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f3cba8f7598  
  VMThread 00007f3cc0465ac0  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cba8f66b0
  VMThread 00007f3cc0465980  STATUS_IN_NATIVE  io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalThread@0x7f3cba8f6310  
  VMThread 00007f3cc0465840  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f3cbb211458
  VMThread 00007f3cc04656c0  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f3cbaaaefb0
  VMThread 00007f3cc0465580  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cba836ef0
  VMThread 00007f3cc0465440  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f3cbb011140
  VMThread 00007f3cc0465300  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f3cbb211140
  VMThread 00007f3cc04651c0  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f3cbb6f67b0
  VMThread 00007f3cc0465080  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f3cbb6f6508
  VMThread 00007f3cc05066c0  STATUS_IN_NATIVE  java.util.concurrent.ForkJoinWorkerThread@0x7f3cbbe4e000
  VMThread 00007f3cc0506580  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cbbe033a8
  VMThread 00007f3cc0506440  STATUS_IN_NATIVE  java.lang.Thread@0x7f3cbd81e790

VM Thread State for current thread 00007f3cc044c280:

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

  8 (8 bytes): com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.stackBoundaryTL = (Word) 139898826412032  00007f3cbbda5000  16 (4 bytes): com.oracle.svm.core.thread.Safepoint.safepointRequested = (int) 2147468917  7fffc675
  20 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.statusTL = (int) 1  00000001
  24 (32 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.regularTLAB = (bytes)
    00007f3cc044c298: 00007f3cb8400000 00007f3cb8500000
    00007f3cc044c2a8: 00007f3cb8401210 0000000000000000


  56 (8 bytes): com.oracle.svm.core.thread.JavaThreads.currentThread = (Object) java.lang.Thread  00007f3cb88b8b88
  64 (8 bytes): com.oracle.svm.core.stack.JavaFrameAnchors.lastAnchor = (Word) 0  0000000000000000
  72 (8 bytes): com.oracle.svm.core.heap.NoAllocationVerifier.openVerifiers = (Object) null
  80 (8 bytes): com.oracle.svm.core.identityhashcode.IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) null
  88 (8 bytes): com.oracle.svm.core.snippets.ExceptionUnwind.currentException = (Object) null
  96 (8 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.activeTimer = (Object) null
  104 (8 bytes): com.oracle.svm.graal.isolated.IsolatedCompileClient.currentClient = (Object) null
  112 (8 bytes): com.oracle.svm.graal.isolated.IsolatedCompileContext.currentContext = (Object) null
  120 (8 bytes): com.oracle.svm.jni.JNIObjectHandles.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.thread.VMThreads.IsolateTL = (Word) 139898828881920  00007f3cbc000000
  160 (8 bytes): com.oracle.svm.core.thread.VMThreads.OSThreadHandleTL = (Word) 139898826497848  00007f3cbbdb9f38
  168 (8 bytes): com.oracle.svm.core.thread.VMThreads.OSThreadIdTL = (Word) 139898826497848  00007f3cbbdb9f38
  176 (8 bytes): com.oracle.svm.core.thread.VMThreads.nextTL = (Word) 139898900496704  00007f3cc044c140
  184 (8 bytes): com.oracle.svm.core.thread.VMThreads.unalignedIsolateThreadMemoryTL = (Word) 139898900496992  00007f3cc044c260    
  192 (4 bytes): com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.yellowZoneStateTL = (int) 1  00000001
  196 (4 bytes): com.oracle.svm.core.snippets.ImplicitExceptions.implicitExceptionsAreFatal = (int) 0  00000000
  200 (4 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.currentPauseDepth = (int) 0  00000000
  204 (4 bytes): com.oracle.svm.core.thread.VMThreads$ActionOnExitSafepointSupport.actionTL = (int) 0  00000000
  208 (4 bytes): com.oracle.svm.core.thread.VMThreads$ActionOnTransitionToJavaSupport.actionTL = (int) 0  00000000
  212 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.safepointsDisabledTL = (int) 1  00000001

VMOperation dump:

  No VMOperation in progress

  The 10 most recent VM operation status changes (oldest first):


Dump Counters:


Raw Stacktrace:

  00007f3cbbdb9e00: 0000000000974190 fffffffffc8b79b8
  00007f3cbbdb9e10: 00007f3cb88b79b8 00007f3cb88b6628
  00007f3cbbdb9e20: 0000205e04a268ae 00000000022ea93a
  00007f3cbbdb9e30: 00007f3cb88b8b88 000000000099772c
  00007f3cbbdb9e40: 00007f3cbbdb9ef0 0000000000000000
  00007f3cbbdb9e50: 00007f3cb88b8b88 00007f3cbe0e9158
  00007f3cbbdb9e60: 000000000000000e 000000000093b180
  00007f3cbbdb9e70: 0000000000000000 0000000000000000

Stacktrace Stage 0:

  SP 00007f3cbbdb9e00 IP 000000000212efe3  FrameSize 48
  SP 00007f3cbbdb9e30 IP 00000000022ea93a  FrameSize 16
  SP 00007f3cbbdb9e40 IP 000000000099772c  FrameSize 48
  SP 00007f3cbbdb9e70 IP 000000000093b180  FrameSize 96

Stacktrace Stage 1:

  SP 00007f3cbbdb9e00 IP 000000000212efe3  com.oracle.svm.core.code.CodeInfo@0x7f3cbd67f6b8 name = image code
  SP 00007f3cbbdb9e30 IP 00000000022ea93a  com.oracle.svm.core.code.CodeInfo@0x7f3cbd67f6b8 name = image code
  SP 00007f3cbbdb9e40 IP 000000000099772c  com.oracle.svm.core.code.CodeInfo@0x7f3cbd67f6b8 name = image code
  SP 00007f3cbbdb9e70 IP 000000000093b180  com.oracle.svm.core.code.CodeInfo@0x7f3cbd67f6b8 name = image code

Stacktrace Stage 2:

  SP 00007f3cbbdb9e00 IP 000000000212efe3  com.oracle.svm.core.code.CodeInfo@0x7f3cbd67f6b8 name = image code
  SP 00007f3cbbdb9e30 IP 00000000022ea93a  [image code] java.lang.Thread.run(Thread.java:829)
  SP 00007f3cbbdb9e40 IP 000000000099772c  [image code] com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:553)
  SP 00007f3cbbdb9e70 IP 000000000093b180  [image code] com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
  SP 00007f3cbbdb9e70 IP 000000000093b180  [image code] com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(IsolateEnterStub.java:0)

[Heap settings and statistics:
  Supports isolates: true
  Object reference size: 8
  Incremental collections: 0
  Complete collections: 0]

[Native image heap boundaries:
  ReadOnly Primitives: 0x7f3cbc001028 .. 0x7f3cbc866be8
  ReadOnly References: 0x7f3cbc866bf8 .. 0x7f3cbce5d028
  ReadOnly Relocatables: 0x7f3cbce5e000 .. 0x7f3cbd565b10
  Writable Primitives: 0x7f3cbd566000 .. 0x7f3cbd6ee818
  Writable References: 0x7f3cbd6ee828 .. 0x7f3cbef50728
  Writable Huge: 0x0 .. 0x0
  ReadOnly Huge: 0x7f3cbf000030 .. 0x7f3cc03c17c8]


[Heap:
  [Young generation:
    [Eden:
      [edenSpace:
        aligned: 4177760/4 unaligned: 0/0
        aligned chunks:
          0x7f3cb2200000 (0x7f3cb2201028-0x7f3cb22010c8)
          0x7f3cb1c00000 (0x7f3cb1c01028-0x7f3cb1c14610)
          0x7f3cb0200000 (0x7f3cb0201028-0x7f3cb0201190)
          0x7f3cb0000000 (0x7f3cb0001028-0x7f3cb00054f0)]]
    [Survivors:
      ]]
  [Old generation:
    [oldFromSpace:
      aligned: 0/0 unaligned: 0/0]
    [oldToSpace:
      aligned: 0/0 unaligned: 0/0]
    ]
  [Unused:
    aligned: 0/0]]

Segfault detected, aborting process. Use runtime option -R:-InstallSegfaultHandler if you don't want to use SubstrateSegfaultHandler.

@dansiviter
Copy link
Author

I've narrowed it down to something in BatchSpanProcessor as without it (i.e. using SimpleBatchProcessor) it runs fine. No idea why Graal does not like this class.

@oubidar-Abderrahim
Copy link
Member

I could not reproduce the issue due to some issues with Docker on my machine, is it possible to get a simpler reproducer? Does it cause an issue if used outside docker?

@oubidar-Abderrahim
Copy link
Member

I cannot find the GraalSegFault branch, are the error still shown in the main branch?

@oubidar-Abderrahim
Copy link
Member

Hi, Any updates on the reproducer?

@dansiviter
Copy link
Author

Unfortunately, I don't have a simple example. However, if you use my project dansiviter/helidon-gcp and build the native image:

docker build -t helidon:native -f .\Dockerfile.native .

Then run it:

docker run --rm -it `
  -p 8080:8080 `
  -e CLOUDSDK_CONFIG=/gcloud `
  -v $Env:APPDATA/gcloud/:/gcloud:ro `
  helidon:native

ℹ️ This requires you to be logged into gCloud

Then fire off a few http://localhost:8080/v1/greet and it will crash.

@oubidar-Abderrahim
Copy link
Member

If this issue is still relevant in the latest GraalVM versions, please open a new issue and follow the template. Thank you

@oubidar-Abderrahim oubidar-Abderrahim closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
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

2 participants