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

Crash with Kotlin Coroutines / Kotlin 2.0 #9046

Closed
sgammon opened this issue Jun 5, 2024 · 5 comments
Closed

Crash with Kotlin Coroutines / Kotlin 2.0 #9046

sgammon opened this issue Jun 5, 2024 · 5 comments
Assignees

Comments

@sgammon
Copy link

sgammon commented Jun 5, 2024

Our app is experiencing a crash in native mode, which seems to be related to KotlinX Coroutines in some manner (or at least it is surfaced by coroutines internals).

The crash:

Segfault (click to expand)
Hello from TypeScript! The answer is 42

[ [ SegfaultHandler caught a segfault in thread 0x0000000152604d40 ] ]
siginfo: si_signo: 10, si_code: 1, si_addr: 0x000000036cc063c0 (heapBase + 1824547776)

General purpose register values:
R0 0x000000030c24ebd8 points into an aligned TLAB chunk of thread 0x0000000152604d40
R1 0x000000030c250ee8 points into an aligned TLAB chunk of thread 0x0000000152604d40
is an object of type kotlinx.coroutines.ChildHandleNode
R2 0x000000000d980c78 is an unknown value
R3 0x000000036cc063c0 is an unknown value
R4 0x000000030c24ebd8 points into an aligned TLAB chunk of thread 0x0000000152604d40
R5 0x0000000001289945 is an unknown value
R6 0x00000000fffff8ab is an unknown value
R7 0x0000000000000008 is an unknown value
R8 0x000000030c24ebdc points into an aligned TLAB chunk of thread 0x0000000152604d40
R9 0x000000016cf56000 points into the stack for thread 0x0000000152604d40
R10 0x000000000000000d is an unknown value
R11 0x00000003190d1e24 points into an aligned TLAB chunk of thread 0x0000000152604d40
R12 0x0000000000000000
R13 0x0000000000000000
R14 0x0000000000000010 is an unknown value
R15 0x0000000000000000
R16 0x0000000000000008 is an unknown value
R17 0x00000003190d1b28 points into an aligned TLAB chunk of thread 0x0000000152604d40
is an object of type java.util.concurrent.ConcurrentHashMap$ForwardingNode
R18 0x0000000000000000
R19 0x00000000ffffffff is an unknown value
R20 0x0000000000000014 is an unknown value
R21 0x000000030c780e30 points into an aligned TLAB chunk of thread 0x0000000152604d40
is an object of type java.util.concurrent.ConcurrentHashMap$Node
R22 0x0000000319100000 is an unknown value
R23 0x00000003190d1c78 points into an aligned TLAB chunk of thread 0x0000000152604d40
is an object of type com.oracle.truffle.polyglot.PolyglotLanguageContextFactory$ToHostValueNodeGen$CachedData
R24 0x0000000000000000
R25 0x0000000308600ef8 points into the image heap (read-only references)
is an object of type java.lang.String: asDate
R26 0x0000000308594580 points into the image heap (read-only references)
is the hub of org.graalvm.polyglot.proxy.ProxyTimeZone
R27 0x0000000300000000 is the heap base
R28 0x0000000152604d40 is a thread
R29 0x0000000001849354 is an unknown value
R30 0x0000000000000000
SP 0x000000016d745210 points into the stack for thread 0x0000000152604d40
PC 0x000000010ab19dd4 points into AOT compiled code kotlinx.coroutines.JobSupport.removeNode$kotlinx_coroutines_core(JobSupport.kt)

Printing instructions (ip=0x000000010ab19dd4):
0x000000010ab19cd4: 0xd7 0x94 0x42 0x96 0x1f 0x20 0x03 0xd5 0xec 0x67 0x00 0xb9 0xe3 0x1b 0x40 0xf9
0x000000010ab19ce4: 0xd3 0x94 0x42 0x96 0x1f 0x20 0x03 0xd5 0x60 0x12 0x9f 0x52 0x60 0x21 0xa0 0x72
0x000000010ab19cf4: 0x60 0x0f 0x00 0x8b 0xa2 0x8a 0x8d 0x52 0xa2 0x21 0xa0 0x72 0x62 0x0f 0x02 0x8b
0x000000010ab19d04: 0x27 0x4f 0x47 0x96 0x1f 0x20 0x03 0xd5 0x95 0x8b 0x77 0x97 0x1f 0x20 0x03 0xd5
0x000000010ab19d14: 0xe1 0x6b 0x40 0xb9 0xe0 0x13 0x40 0xf9 0xc5 0x94 0x42 0x96 0x1f 0x20 0x03 0xd5
0x000000010ab19d24: 0xe3 0x03 0x00 0xaa 0x69 0xfe 0xff 0x17 0xe2 0x03 0x1e 0xaa 0xbd 0xff 0xff 0x17
0x000000010ab19d34: 0xbf 0x94 0x42 0x96 0x1f 0x20 0x03 0xd5 0xe3 0x03 0x00 0xaa 0x63 0xfe 0xff 0x17
0x000000010ab19d44: 0x43 0x04 0x00 0x51 0x23 0x18 0x00 0xb9 0xc0 0xff 0xff 0x17 0xe0 0x17 0x00 0xf9
0x000000010ab19d54: 0xe0 0x1b 0x40 0xf9 0xe1 0x03 0x00 0x32 0x79 0x82 0x43 0x96 0x1f 0x20 0x03 0xd5
0x000000010ab19d64: 0xe3 0x17 0x40 0xf9 0x59 0xfe 0xff 0x17 0x75 0xe8 0x3a 0x16 0xa0 0xec 0x42 0x16
0x000000010ab19d74: 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xe8 0xc3 0x00 0xd1
0x000000010ab19d84: 0x89 0x07 0x40 0xf9 0x1f 0x01 0x09 0xeb 0x09 0x0e 0x00 0x54 0xfd 0x7b 0x3f 0xa9
0x000000010ab19d94: 0x1f 0x01 0x00 0x91 0x1f 0x20 0x03 0xd5 0x1f 0x20 0x03 0xd5 0xfe 0x03 0x1f 0x2a
0x000000010ab19da4: 0x25 0x00 0x00 0x14 0x1f 0x20 0x03 0xd5 0x1f 0x20 0x03 0xd5 0x1f 0x20 0x03 0xd5
0x000000010ab19db4: 0x1f 0x20 0x03 0xd5 0x1f 0x20 0x03 0xd5 0x1f 0x20 0x03 0xd5 0x08 0x10 0x00 0x91
0x000000010ab19dc4: 0x02 0xfd 0xdf 0x88 0xe3 0x03 0x02 0x2a 0x63 0x0f 0x03 0x8b 0xa2 0x03 0x00 0x34

0x000000010ab19dd4: 0x64 0x00 0x40 0xb9 0x84 0x7c 0x05 0x53 0xe4 0x03 0x04 0x2a 0x64 0x0f 0x04 0x8b
0x000000010ab19de4: 0x84 0x08 0x40 0xb9 0x05 0xc7 0x8d 0x12 0xa4 0x20 0x24 0x0b 0x9f 0x20 0x00 0x71
0x000000010ab19df4: 0x82 0x02 0x00 0x54 0x23 0x00 0x1b 0xcb 0x63 0xfc 0x43 0xd3 0x5f 0x00 0x03 0x6b
0x000000010ab19e04: 0xc1 0x06 0x00 0x54 0xc3 0x1a 0x85 0x52 0xc3 0x29 0xa0 0x72 0x04 0x10 0x00 0x91
0x000000010ab19e14: 0xbf 0x3b 0x03 0xd5 0x85 0xfc 0x5f 0x88 0xbf 0x00 0x02 0x6b 0x61 0x00 0x00 0x54
0x000000010ab19e24: 0x83 0xfc 0x08 0x88 0x88 0xff 0xff 0x35 0xe2 0x17 0x9f 0x1a 0x22 0x07 0x00 0x35
0x000000010ab19e34: 0xde 0x07 0x00 0x11 0xdf 0x03 0x08 0x71 0x23 0xfc 0xff 0x54 0x3c 0x00 0x00 0x14
0x000000010ab19e44: 0x42 0x01 0x00 0x34 0x60 0x00 0x40 0xb9 0x00 0x7c 0x05 0x53 0xe0 0x03 0x00 0x2a
0x000000010ab19e54: 0x60 0x0f 0x00 0x8b 0x00 0xa0 0x40 0xb8 0xbe 0xea 0x80 0x12 0xc0 0x23 0x20 0x0b
0x000000010ab19e64: 0x1f 0x0c 0x00 0x71 0x03 0x01 0x00 0x54 0xfd 0x7b 0x42 0xa9 0xff 0xc3 0x00 0x91
0x000000010ab19e74: 0x88 0x1b 0x40 0xb9 0x08 0x05 0x00 0x71 0x88 0x1b 0x00 0xb9 0x8d 0x06 0x00 0x54
0x000000010ab19e84: 0xc0 0x03 0x5f 0xd6 0xe1 0x0f 0x00 0xf9 0x60 0x00 0x40 0xb9 0x00 0x7c 0x05 0x53
0x000000010ab19e94: 0xe0 0x03 0x00 0x2a 0x60 0x0f 0x00 0x8b 0x1e 0x74 0x40 0xf9 0xe0 0x03 0x03 0xaa
0x000000010ab19ea4: 0xc0 0x03 0x3f 0xd6 0x1f 0x20 0x03 0xd5 0x1f 0x00 0x1b 0xeb 0x40 0x02 0x00 0x54
0x000000010ab19eb4: 0xe0 0x0f 0x40 0xf9 0x0e 0x8a 0x00 0x94 0x1f 0x20 0x03 0xd5 0xfd 0x7b 0x42 0xa9
0x000000010ab19ec4: 0xff 0xc3 0x00 0x91 0x88 0x1b 0x40 0xb9 0x08 0x05 0x00 0x71 0x88 0x1b 0x00 0xb9

Top of stack (sp=0x000000016d745210):
0x000000016d7451f0: 0x000000030a6ca880 0x0000000300000000 0x000000000c0c81f0 0x000000030c2716e0

0x000000016d745210: 0x000000030a692a58 0x000000030a6706e0 0x000000030bbc5eb8 0x0000000000000001
0x000000016d745230: 0x0000000001849354 0x000000010ab14730 0x000000030957e978 0x0000000103b00b08
0x000000016d745250: 0x00000003190d1e68 0x0000000300000000 0x000000030a6f4010 0x000000030a6f4010
0x000000016d745270: 0x00000003190d1e10 0x000000030c250ed0 0x0000000001849354 0x000000010ab14c5c
0x000000016d745290: 0x0184a5ed0c271d28 0x000000030c252f68 0x0000000001849354 0x000000010ab3ba34
0x000000016d7452b0: 0x0000000309620b90 0x0000000300000000 0x000000030a6f4010 0x000000030a6f4010
0x000000016d7452d0: 0x0000000300000000 0x00000003190d1e10 0x000000030c250ed0 0x000000000a6634c8
0x000000016d7452f0: 0x0000000001849354 0x000000010ab1bb64 0x000000030a700668 0x000000030bbc5eb8
0x000000016d745310: 0x0000000001849354 0x0000000107e98c60 0x0000000308685878 0x000000030c252f68
0x000000016d745330: 0x00000003190d1e10 0x000000030c252f68 0x0000000001849354 0x000000030c250ed0
0x000000016d745350: 0x000000030a6f4010 0x0000000300000000 0x000000030a6f4010 0x262a26800c250f20
0x000000016d745370: 0x0000000001849354 0x000000010aae69e0 0x00000001091fd770 0x000000030c0c7220
0x000000016d745390: 0x0000000001849354 0x000000030c252b88 0x0000000001849354 0x0000000107e88c84
0x000000016d7453b0: 0x000000030a6f4010 0x000000030c271670 0x000000030c250ed0 0x0000000000000000
0x000000016d7453d0: 0x0000000001849354 0x000000010a453830 0x0000000001849354 0x000000010a450c50
0x000000016d7453f0: 0x0000000001849354 0x000000030a6f4010 0x0000000309808868 0x000000030c251028

VM thread locals for the failing thread 0x0000000152604d40:
0: JNIThreadLocalEnvironment.jniFunctions = (bytes) 0x00000003098175e0
8: StackOverflowCheckImpl.stackBoundaryTL = (Word) 0x0000000000000001 (1)
16: SubstrateFastThreadLocal.CONTEXT = (Object) 0x000000030c764940
is an object of type [Ljava.lang.Object; with length 14: 0x018ec91a 0x018ec948 0x018ec6c7 0x018ec933 ...
20: SubstrateThreadLocalHandshake.STATE = (Object) 0x000000030c764ab8
is an object of type com.oracle.truffle.api.impl.ThreadLocalHandshake$TruffleSafepointImpl
24: Safepoint.safepointRequested = (int) 0x7fface6c (2147143276)
28: StatusSupport.statusTL = (int) 0x00000001 (1)
32: SubstrateThreadLocalHandshake.PENDING = (int) 0x00000000 (0)
40: ThreadLocalAllocation.regularTLAB = (bytes)
0x0000000152604d68: 0x0000000319080000 0x0000000319100000
0x0000000152604d78: 0x00000003190d1e98 0x0000000311f84000
72: JavaFrameAnchors.lastAnchor = (Word) 0x0000000000000000 (0)
80: JavaThreads.currentVThreadId = (long) 0x0000000000000001 (1)
88: PlatformThreads.currentThread = (Object) 0x000000030a71fca0
is an object of type java.lang.Thread
96: SubstrateDiagnostics.threadOnlyAttachedForCrashHandler = (bytes) 0x0000000000000000
104: ThreadLocalAllocation.allocatedBytes = (Word) 0x000000000d23ce28 (220450344)
112: VMThreads.IsolateTL = (Word) 0x0000000300000000 (12884901888)
120: VMThreads.OSThreadHandleTL = (Word) 0x00000001fb85bac0 (8514812608)
128: VMThreads.OSThreadIdTL = (Word) 0x0000000000000103 (259)
136: VMThreads.StackBase = (Word) 0x000000016d748000 (6131318784)
144: VMThreads.StackEnd = (Word) 0x000000016cf4c000 (6122946560)
152: VMThreads.StartedByCurrentIsolate = (bytes) 0x0000000000000000
160: VMThreads.nextTL = (Word) 0x0000000000000000 (0)
168: VMThreads.unalignedIsolateThreadMemoryTL = (Word) 0x0000000152604d20 (5677010208)
176: ExceptionUnwind.currentException = (Object) 0x0000000000000000
180: IsolatedCompileClient.currentClient = (Object) 0x0000000000000000
184: IsolatedCompileContext.currentContext = (Object) 0x0000000000000000
188: JNIObjectHandles.handles = (Object) 0x000000030b800140
is an object of type com.oracle.svm.core.handles.ThreadLocalHandles
192: JNIThreadLocalPendingException.pendingException = (Object) 0x0000000000000000
196: JNIThreadLocalReferencedObjects.referencedObjectsListHead = (Object) 0x0000000000000000
200: JNIThreadOwnedMonitors.ownedMonitors = (Object) 0x0000000000000000
204: NoAllocationVerifier.openVerifiers = (Object) 0x0000000000000000
208: RecurringCallbackTimer.exception = (Object) 0x0000000000000000
212: ThreadingSupportImpl.activeTimer = (Object) 0x0000000000000000
216: ActionOnTransitionToJavaSupport.actionTL = (int) 0x00000000 (0)
220: ImplicitExceptions.implicitExceptionsAreFatal = (int) 0x00000000 (0)
224: StackOverflowCheckImpl.yellowZoneStateTL = (int) 0x7efefefe (2130640638)
228: StatusSupport.safepointBehaviorTL = (int) 0x00000001 (1)
232: ThreadingSupportImpl.currentPauseDepth = (int) 0x00000000 (0)

Java frame anchors for the failing thread 0x0000000152604d40:
No anchors

Stacktrace for the failing thread 0x0000000152604d40 (A=AOT compiled, J=JIT compiled, D=deoptimized, i=inlined):
A SP 0x000000016d745210 IP 0x000000010ab19dd4 size=48 [image code] kotlinx.coroutines.JobSupport.removeNode$kotlinx_coroutines_core(JobSupport.kt)
i SP 0x000000016d745240 IP 0x000000010ab14730 size=80 [image code] kotlinx.coroutines.JobNode.dispose(JobSupport.kt:1467)
A SP 0x000000016d745240 IP 0x000000010ab14730 size=80 [image code] kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:301)
A SP 0x000000016d745290 IP 0x000000010ab14c5c size=112 [image code] kotlinx.coroutines.JobSupport.finalizeFinishingState(JobSupport.kt:233)
A SP 0x000000016d745300 IP 0x000000010ab1bb64 size=128 [image code] kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath(JobSupport.kt:946)
i SP 0x000000016d745380 IP 0x000000010aae69e0 size=96 [image code] kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:894)
i SP 0x000000016d745380 IP 0x000000010aae69e0 size=96 [image code] kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:859)
A SP 0x000000016d745380 IP 0x000000010aae69e0 size=96 [image code] kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:98)
A SP 0x000000016d7453e0 IP 0x000000010a453830 size=80 [image code] kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
A SP 0x000000016d745430 IP 0x000000010aafb130 size=208 [image code] kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:102)
i SP 0x000000016d745500 IP 0x000000010aae8370 size=80 [image code] kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:263)
A SP 0x000000016d745500 IP 0x000000010aae8370 size=80 [image code] kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
i SP 0x000000016d745550 IP 0x0000000107e9e8b0 size=240 [image code] kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
i SP 0x000000016d745550 IP 0x0000000107e9e8b0 size=240 [image code] kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
i SP 0x000000016d745550 IP 0x0000000107e9e8b0 size=240 [image code] kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:47)
i SP 0x000000016d745550 IP 0x0000000107e9e8b0 size=240 [image code] kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
i SP 0x000000016d745550 IP 0x0000000107e9e8b0 size=240 [image code] com.jakewharton.mosaic.BlockingKt.runMosaicBlocking(blocking.kt:6)
A SP 0x000000016d745550 IP 0x0000000107e9e8b0 size=240 [image code] elide.tool.cli.AbstractToolCommand.call(AbstractToolCommand.kt:260)
A SP 0x000000016d745640 IP 0x0000000107ea070c size=48 [image code] elide.tool.cli.AbstractToolCommand.call(AbstractToolCommand.kt:30)
A SP 0x000000016d745670 IP 0x000000010c26ca70 size=192 [image code] picocli.CommandLine.executeUserObject(CommandLine.java:2045)
i SP 0x000000016d745730 IP 0x000000010c25c514 size=96 [image code] picocli.CommandLine.access$1500(CommandLine.java:148)
A SP 0x000000016d745730 IP 0x000000010c25c514 size=96 [image code] picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
A SP 0x000000016d745790 IP 0x000000010c25ccc4 size=48 [image code] picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
i SP 0x000000016d7457c0 IP 0x000000010c0ff37c size=128 [image code] picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
A SP 0x000000016d7457c0 IP 0x000000010c0ff37c size=128 [image code] picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
i SP 0x000000016d745840 IP 0x000000010c267844 size=464 [image code] picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
A SP 0x000000016d745840 IP 0x000000010c267844 size=464 [image code] picocli.CommandLine.execute(CommandLine.java:2174)
A SP 0x000000016d745a10 IP 0x0000000107ed92b0 size=208 [image code] elide.tool.cli.Elide$Companion.exec$runtime(Elide.kt:232)
A SP 0x000000016d745ae0 IP 0x0000000107ed8990 size=64 [image code] elide.tool.cli.Elide$Companion.entry(Elide.kt:195)
A SP 0x000000016d745b20 IP 0x0000000107ede598 size=48 [image code] elide.tool.cli.ElideKt.main(Elide.kt:305)
i SP 0x000000016d745b50 IP 0x0000000103902bdc size=64 [image code] com.oracle.svm.core.JavaMainWrapper.invokeMain(JavaMainWrapper.java:182)
A SP 0x000000016d745b50 IP 0x0000000103902bdc size=64 [image code] com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:233)
i SP 0x000000016d745b90 IP 0x0000000103958a04 size=304 [image code] com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:202)
i SP 0x000000016d745b90 IP 0x0000000103958a04 size=304 [image code] com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:301)
i SP 0x000000016d745b90 IP 0x0000000103958a04 size=304 [image code] com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:286)
A SP 0x000000016d745b90 IP 0x0000000103958a04 size=304 [image code] com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(IsolateEnterStub.java:0)

Threads:
0x0000000152704f00 STATUS_IN_SAFEPOINT (ALLOW_SAFEPOINT) "TruffleCompilerThread-59" - 0x00000003174738a0, daemon, stack(0x000000016de68000,0x000000016deeb000)
0x0000000152704c80 STATUS_IN_SAFEPOINT (ALLOW_SAFEPOINT) "TruffleCompilerThread-58" - 0x0000000316d6b5d8, daemon, stack(0x000000016dddc000,0x000000016de5f000)
0x0000000152604f80 STATUS_IN_JAVA (ALLOW_SAFEPOINT) "TruffleCompilerThread-57" - 0x000000031699ae90, daemon, stack(0x000000016dd50000,0x000000016ddd3000)
0x0000000152704940 STATUS_IN_SAFEPOINT (ALLOW_SAFEPOINT) "TruffleCompilerThread-55" - 0x000000031698d358, daemon, stack(0x000000016dcc4000,0x000000016dd47000)
0x0000000153b04080 STATUS_IN_SAFEPOINT (ALLOW_SAFEPOINT) "ForkJoinPool.commonPool-worker-6" - 0x000000030bd802a0, daemon, stack(0x000000016db20000,0x000000016dba3000)
0x0000000153a04080 STATUS_IN_SAFEPOINT (ALLOW_SAFEPOINT) "ForkJoinPool.commonPool-worker-5" - 0x000000030bd07368, daemon, stack(0x000000016da94000,0x000000016db17000)
0x00000001539041c0 STATUS_IN_SAFEPOINT (ALLOW_SAFEPOINT) "ForkJoinPool.commonPool-worker-4" - 0x000000030bc872f8, daemon, stack(0x000000016da08000,0x000000016da8b000)
0x0000000152704800 STATUS_IN_SAFEPOINT (ALLOW_SAFEPOINT) "ForkJoinPool.commonPool-worker-3" - 0x000000030bd00220, daemon, stack(0x000000016d97c000,0x000000016d9ff000)
0x0000000152604e80 STATUS_IN_SAFEPOINT (ALLOW_SAFEPOINT) "ForkJoinPool.commonPool-worker-2" - 0x000000030bc80250, daemon, stack(0x000000016d8f0000,0x000000016d973000)
0x0000000153804440 STATUS_IN_SAFEPOINT (ALLOW_SAFEPOINT) "ForkJoinPool.commonPool-worker-1" - 0x000000030bc41c50, daemon, stack(0x000000016d864000,0x000000016d8e7000)
0x0000000153804300 STATUS_IN_SAFEPOINT (ALLOW_SAFEPOINT) "Signal Dispatcher" - 0x000000030b800d38, daemon, stack(0x000000016d7d8000,0x000000016d85b000)
0x0000000152704080 STATUS_IN_SAFEPOINT (ALLOW_SAFEPOINT) "Reference Handler" - 0x000000030a6718e0, daemon, stack(0x000000016d74c000,0x000000016d7cf000)
0x0000000152604d40 STATUS_IN_JAVA (PREVENT_VM_FROM_REACHING_SAFEPOINT) "main" - 0x000000030a71fca0, stack(0x000000016cf4c000,0x000000016d748000)

No VMOperation in progress

The 30 most recent VM operation status changes:
0.318s - Started Invalidate code (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 19)
0.318s - Finished Invalidate code (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 19)
0.320s - Started Invalidate code (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 20)
0.320s - Started Deoptimize source frame (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 20)
0.320s - Finished Deoptimize source frame (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 20)
0.320s - Finished Invalidate code (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 20)
0.326s - Started Install code (safepoint: true, queueingThread: 0x0000000152604f80, executingThread: 0x0000000152604f80, safepointId: 21)
0.326s - Finished Install code (safepoint: true, queueingThread: 0x0000000152604f80, executingThread: 0x0000000152604f80, safepointId: 21)
0.327s - Started Install code (safepoint: true, queueingThread: 0x0000000152604f80, executingThread: 0x0000000152604f80, safepointId: 22)
0.327s - Finished Install code (safepoint: true, queueingThread: 0x0000000152604f80, executingThread: 0x0000000152604f80, safepointId: 22)
0.328s - Started Install code (safepoint: true, queueingThread: 0x0000000152704c80, executingThread: 0x0000000152704c80, safepointId: 23)
0.328s - Finished Install code (safepoint: true, queueingThread: 0x0000000152704c80, executingThread: 0x0000000152704c80, safepointId: 23)
0.328s - Started Install code (safepoint: true, queueingThread: 0x0000000152704f00, executingThread: 0x0000000152704f00, safepointId: 24)
0.328s - Finished Install code (safepoint: true, queueingThread: 0x0000000152704f00, executingThread: 0x0000000152704f00, safepointId: 24)
0.329s - Started Install code (safepoint: true, queueingThread: 0x0000000152704c80, executingThread: 0x0000000152704c80, safepointId: 25)
0.329s - Finished Install code (safepoint: true, queueingThread: 0x0000000152704c80, executingThread: 0x0000000152704c80, safepointId: 25)
0.330s - Started Install code (safepoint: true, queueingThread: 0x0000000152704c80, executingThread: 0x0000000152704c80, safepointId: 26)
0.330s - Finished Install code (safepoint: true, queueingThread: 0x0000000152704c80, executingThread: 0x0000000152704c80, safepointId: 26)
0.333s - Started Invalidate code (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 27)
0.333s - Started Deoptimize source frame (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 27)
0.333s - Finished Deoptimize source frame (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 27)
0.333s - Finished Invalidate code (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 27)
0.335s - Started Install code (safepoint: true, queueingThread: 0x0000000152704f00, executingThread: 0x0000000152704f00, safepointId: 28)
0.335s - Finished Install code (safepoint: true, queueingThread: 0x0000000152704f00, executingThread: 0x0000000152704f00, safepointId: 28)
0.338s - Started Invalidate code (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 29)
0.338s - Started Deoptimize source frame (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 29)
0.338s - Finished Deoptimize source frame (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 29)
0.338s - Finished Invalidate code (safepoint: true, queueingThread: 0x0000000152604d40, executingThread: 0x0000000152604d40, safepointId: 29)
0.340s - Started Install code (safepoint: true, queueingThread: 0x0000000152704940, executingThread: 0x0000000152704940, safepointId: 30)
0.340s - Finished Install code (safepoint: true, queueingThread: 0x0000000152704940, executingThread: 0x0000000152704940, safepointId: 30)

VM mutexes:
mutex "RealLog.backTracePrinterMutex" is unlocked.
mutex "freeList" is unlocked.
mutex "mainVMOperationControlWorkQueue" is locked by thread 0x0000000152604f80
mutex "referencePendingList" is unlocked.
mutex "thread" is locked by thread 0x0000000152604f80

Build time information:
Version: 22.0.1+8, epsilon gc, compressed references
Platform: darwin/aarch64
Page size: 16384
Container support: true
CPU features used for AOT compiled code: FP, ASIMD

Runtime information:
CPU cores (container): 12
CPU cores (OS): 12
Memory: 98304M
Page size: 16384
VM uptime: 0.347s
Current timestamp: 1717551295512
AOT compiled code: 0x00000001026bc000 - 0x000000010d5e0bdf

Command line: 'run' './tools/scripts/hello.ts'

The 30 most recent RuntimeCodeInfo operations:
0.291s - Added CodeInfo (0x0000600001ad8000 - 0x0000600001ad80b0), code constants live - Object.defineProperty (SubstrateCompilation-23247), ip: (0x00000001191d0000 - 0x00000001191d082c), installedCode: (address: 0x00000001191d0000, entryPoint: 0x00000001191d0000), safepointId: 1
0.295s - Added CodeInfo (0x0000600001ad4000 - 0x0000600001ad40b0), code constants live - %ForInIteratorPrototype%.next (SubstrateCompilation-23246), ip: (0x00000001191d8000 - 0x00000001191d9a34), installedCode: (address: 0x00000001191d8000, entryPoint: 0x00000001191d8000), safepointId: 2
0.300s - Added CodeInfo (0x0000600001ad0000 - 0x0000600001ad00b0), code constants live - __export (SubstrateCompilation-23248), ip: (0x00000001191e0000 - 0x00000001191e1eac), installedCode: (address: 0x00000001191e0000, entryPoint: 0x00000001191e0000), safepointId: 3
0.301s - Invalidated CodeInfo (0x0000600001ad0000 - 0x0000600001ad00b0), invalidated - __export (SubstrateCompilation-23248), ip: (0x00000001191e0000 - 0x00000001191e1eac), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000), safepointId: 4
0.302s - Added CodeInfo (0x0000600001ac4000 - 0x0000600001ac40b0), code constants live - Object.getOwnPropertyNames (SubstrateCompilation-23253), ip: (0x00000001191e8000 - 0x00000001191e86b0), installedCode: (address: 0x00000001191e8000, entryPoint: 0x00000001191e8000), safepointId: 5
0.303s - Added CodeInfo (0x0000600001ac40c0 - 0x0000600001ac4170), code constants live - Map.prototype.set (SubstrateCompilation-23255), ip: (0x00000001191f0000 - 0x00000001191f02dc), installedCode: (address: 0x00000001191f0000, entryPoint: 0x00000001191f0000), safepointId: 6
0.304s - Added CodeInfo (0x0000600001ac0000 - 0x0000600001ac00b0), code constants live - Array Iterator.prototype.next (SubstrateCompilation-23250), ip: (0x00000001191f8000 - 0x00000001191f9240), installedCode: (address: 0x00000001191f8000, entryPoint: 0x00000001191f8000), safepointId: 7
0.304s - Invalidated CodeInfo (0x0000600001ac0000 - 0x0000600001ac00b0), invalidated - Array Iterator.prototype.next (SubstrateCompilation-23250), ip: (0x00000001191f8000 - 0x00000001191f9240), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000), safepointId: 8
0.305s - Added CodeInfo (0x0000600001adc000 - 0x0000600001adc0b0), code constants live - :=> (SubstrateCompilation-23256), ip: (0x0000000119200000 - 0x0000000119200450), installedCode: (address: 0x0000000119200000, entryPoint: 0x0000000119200000), safepointId: 9
0.306s - Invalidated CodeInfo (0x0000600001ac40c0 - 0x0000600001ac4170), invalidated - Map.prototype.set (SubstrateCompilation-23255), ip: (0x00000001191f0000 - 0x00000001191f02dc), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000), safepointId: 10
0.309s - Added CodeInfo (0x0000600001ac4180 - 0x0000600001ac4230), code constants live - :=> (SubstrateCompilation-23252), ip: (0x0000000119208000 - 0x0000000119209c90), installedCode: (address: 0x0000000119208000, entryPoint: 0x0000000119208000), safepointId: 11
0.310s - Added CodeInfo (0x0000600001ac4300 - 0x0000600001ac43b0), code constants live - Map.prototype.set (SubstrateCompilation-23259), ip: (0x0000000119210000 - 0x0000000119210444), installedCode: (address: 0x0000000119210000, entryPoint: 0x0000000119210000), safepointId: 12
0.312s - Invalidated CodeInfo (0x0000600001ad8000 - 0x0000600001ad80b0), invalidated - Object.defineProperty (SubstrateCompilation-23247), ip: (0x00000001191d0000 - 0x00000001191d082c), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000), safepointId: 13
0.312s - Added CodeInfo (0x0000600001acc000 - 0x0000600001acc0b0), code constants live - Array Iterator.prototype.next (SubstrateCompilation-23258), ip: (0x0000000119218000 - 0x000000011921988c), installedCode: (address: 0x0000000119218000, entryPoint: 0x0000000119218000), safepointId: 14
0.314s - Added CodeInfo (0x0000600001adc0c0 - 0x0000600001adc170), code constants live - :=> (SubstrateCompilation-23260), ip: (0x0000000119220000 - 0x0000000119220ac8), installedCode: (address: 0x0000000119220000, entryPoint: 0x0000000119220000), safepointId: 15
0.315s - Invalidated CodeInfo (0x0000600001acc000 - 0x0000600001acc0b0), invalidated - Array Iterator.prototype.next (SubstrateCompilation-23258), ip: (0x0000000119218000 - 0x000000011921988c), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000), safepointId: 16
0.316s - Added CodeInfo (0x0000600001ad40c0 - 0x0000600001ad4170), code constants live - arrayToMap (SubstrateCompilation-23257), ip: (0x0000000119228000 - 0x0000000119229fa8), installedCode: (address: 0x0000000119228000, entryPoint: 0x0000000119228000), safepointId: 17
0.318s - Added CodeInfo (0x0000600001ac00c0 - 0x0000600001ac0170), code constants live - Object.defineProperty (SubstrateCompilation-23261), ip: (0x0000000119230000 - 0x00000001192311e4), installedCode: (address: 0x0000000119230000, entryPoint: 0x0000000119230000), safepointId: 18
0.318s - Invalidated CodeInfo (0x0000600001ad40c0 - 0x0000600001ad4170), invalidated - arrayToMap (SubstrateCompilation-23257), ip: (0x0000000119228000 - 0x0000000119229fa8), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000), safepointId: 19
0.320s - Invalidated CodeInfo (0x0000600001ac4300 - 0x0000600001ac43b0), invalidated - Map.prototype.set (SubstrateCompilation-23259), ip: (0x0000000119210000 - 0x0000000119210444), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000), safepointId: 20
0.326s - Added CodeInfo (0x0000600001ad0180 - 0x0000600001ad0230), code constants live - String.prototype.lastIndexOf (SubstrateCompilation-23264), ip: (0x0000000119238000 - 0x0000000119239d38), installedCode: (address: 0x0000000119238000, entryPoint: 0x0000000119238000), safepointId: 21
0.327s - Added CodeInfo (0x0000600001ad0240 - 0x0000600001ad02f0), code constants live - Map.prototype.set (SubstrateCompilation-23266), ip: (0x0000000119240000 - 0x0000000119240480), installedCode: (address: 0x0000000119240000, entryPoint: 0x0000000119240000), safepointId: 22
0.328s - Added CodeInfo (0x0000600001acc0c0 - 0x0000600001acc170), code constants live - Array Iterator.prototype.next (SubstrateCompilation-23263), ip: (0x0000000119248000 - 0x000000011924a62c), installedCode: (address: 0x0000000119248000, entryPoint: 0x0000000119248000), safepointId: 23
0.328s - Added CodeInfo (0x0000600001adc180 - 0x0000600001adc230), code constants live - Array.prototype.push (SubstrateCompilation-23265), ip: (0x0000000119250000 - 0x00000001192520bc), installedCode: (address: 0x0000000119250000, entryPoint: 0x0000000119250000), safepointId: 24
0.329s - Added CodeInfo (0x0000600001acc180 - 0x0000600001acc230), code constants live - Map.prototype.get (SubstrateCompilation-23268), ip: (0x0000000119258000 - 0x000000011925844c), installedCode: (address: 0x0000000119258000, entryPoint: 0x0000000119258000), safepointId: 25
0.330s - Added CodeInfo (0x0000600001acc240 - 0x0000600001acc2f0), code constants live - String (SubstrateCompilation-23270), ip: (0x0000000119260000 - 0x00000001192602a0), installedCode: (address: 0x0000000119260000, entryPoint: 0x0000000119260000), safepointId: 26
0.333s - Invalidated CodeInfo (0x0000600001adc180 - 0x0000600001adc230), invalidated - Array.prototype.push (SubstrateCompilation-23265), ip: (0x0000000119250000 - 0x00000001192520bc), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000), safepointId: 27
0.335s - Added CodeInfo (0x0000600001ad80c0 - 0x0000600001ad8170), code constants live - multiMapAdd (SubstrateCompilation-23269), ip: (0x0000000119268000 - 0x0000000119269644), installedCode: (address: 0x0000000119268000, entryPoint: 0x0000000119268000), safepointId: 28
0.338s - Invalidated CodeInfo (0x0000600001acc180 - 0x0000600001acc230), invalidated - Map.prototype.get (SubstrateCompilation-23268), ip: (0x0000000119258000 - 0x000000011925844c), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000), safepointId: 29
0.340s - Added CodeInfo (0x0000600001ac0180 - 0x0000600001ac0230), code constants live - registerCodeFix (SubstrateCompilation-23262), ip: (0x0000000119270000 - 0x0000000119274248), installedCode: (address: 0x0000000119270000, entryPoint: 0x0000000119270000), safepointId: 30

RuntimeCodeInfoMemory contains 22 methods:
CodeInfo (0x0000600001ad8000 - 0x0000600001ad80b0), invalidated - Object.defineProperty (SubstrateCompilation-23247), ip: (0x00000001191d0000 - 0x00000001191d082c), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000)
CodeInfo (0x0000600001ad4000 - 0x0000600001ad40b0), code constants live - %ForInIteratorPrototype%.next (SubstrateCompilation-23246), ip: (0x00000001191d8000 - 0x00000001191d9a34), installedCode: (address: 0x00000001191d8000, entryPoint: 0x00000001191d8000)
CodeInfo (0x0000600001ad0000 - 0x0000600001ad00b0), invalidated - __export (SubstrateCompilation-23248), ip: (0x00000001191e0000 - 0x00000001191e1eac), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000)
CodeInfo (0x0000600001ac4000 - 0x0000600001ac40b0), code constants live - Object.getOwnPropertyNames (SubstrateCompilation-23253), ip: (0x00000001191e8000 - 0x00000001191e86b0), installedCode: (address: 0x00000001191e8000, entryPoint: 0x00000001191e8000)
CodeInfo (0x0000600001ac40c0 - 0x0000600001ac4170), invalidated - Map.prototype.set (SubstrateCompilation-23255), ip: (0x00000001191f0000 - 0x00000001191f02dc), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000)
CodeInfo (0x0000600001ac0000 - 0x0000600001ac00b0), invalidated - Array Iterator.prototype.next (SubstrateCompilation-23250), ip: (0x00000001191f8000 - 0x00000001191f9240), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000)
CodeInfo (0x0000600001adc000 - 0x0000600001adc0b0), code constants live - :=> (SubstrateCompilation-23256), ip: (0x0000000119200000 - 0x0000000119200450), installedCode: (address: 0x0000000119200000, entryPoint: 0x0000000119200000)
CodeInfo (0x0000600001ac4180 - 0x0000600001ac4230), code constants live - :=> (SubstrateCompilation-23252), ip: (0x0000000119208000 - 0x0000000119209c90), installedCode: (address: 0x0000000119208000, entryPoint: 0x0000000119208000)
CodeInfo (0x0000600001ac4300 - 0x0000600001ac43b0), invalidated - Map.prototype.set (SubstrateCompilation-23259), ip: (0x0000000119210000 - 0x0000000119210444), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000)
CodeInfo (0x0000600001acc000 - 0x0000600001acc0b0), invalidated - Array Iterator.prototype.next (SubstrateCompilation-23258), ip: (0x0000000119218000 - 0x000000011921988c), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000)
CodeInfo (0x0000600001adc0c0 - 0x0000600001adc170), code constants live - :=> (SubstrateCompilation-23260), ip: (0x0000000119220000 - 0x0000000119220ac8), installedCode: (address: 0x0000000119220000, entryPoint: 0x0000000119220000)
CodeInfo (0x0000600001ad40c0 - 0x0000600001ad4170), invalidated - arrayToMap (SubstrateCompilation-23257), ip: (0x0000000119228000 - 0x0000000119229fa8), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000)
CodeInfo (0x0000600001ac00c0 - 0x0000600001ac0170), code constants live - Object.defineProperty (SubstrateCompilation-23261), ip: (0x0000000119230000 - 0x00000001192311e4), installedCode: (address: 0x0000000119230000, entryPoint: 0x0000000119230000)
CodeInfo (0x0000600001ad0180 - 0x0000600001ad0230), code constants live - String.prototype.lastIndexOf (SubstrateCompilation-23264), ip: (0x0000000119238000 - 0x0000000119239d38), installedCode: (address: 0x0000000119238000, entryPoint: 0x0000000119238000)
CodeInfo (0x0000600001ad0240 - 0x0000600001ad02f0), code constants live - Map.prototype.set (SubstrateCompilation-23266), ip: (0x0000000119240000 - 0x0000000119240480), installedCode: (address: 0x0000000119240000, entryPoint: 0x0000000119240000)
CodeInfo (0x0000600001acc0c0 - 0x0000600001acc170), code constants live - Array Iterator.prototype.next (SubstrateCompilation-23263), ip: (0x0000000119248000 - 0x000000011924a62c), installedCode: (address: 0x0000000119248000, entryPoint: 0x0000000119248000)
CodeInfo (0x0000600001adc180 - 0x0000600001adc230), invalidated - Array.prototype.push (SubstrateCompilation-23265), ip: (0x0000000119250000 - 0x00000001192520bc), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000)
CodeInfo (0x0000600001acc180 - 0x0000600001acc230), invalidated - Map.prototype.get (SubstrateCompilation-23268), ip: (0x0000000119258000 - 0x000000011925844c), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000)
CodeInfo (0x0000600001acc240 - 0x0000600001acc2f0), code constants live - String (SubstrateCompilation-23270), ip: (0x0000000119260000 - 0x00000001192602a0), installedCode: (address: 0x0000000119260000, entryPoint: 0x0000000119260000)
CodeInfo (0x0000600001ad80c0 - 0x0000600001ad8170), code constants live - multiMapAdd (SubstrateCompilation-23269), ip: (0x0000000119268000 - 0x0000000119269644), installedCode: (address: 0x0000000119268000, entryPoint: 0x0000000119268000)
CodeInfo (0x0000600001ac0180 - 0x0000600001ac0230), code constants live - registerCodeFix (SubstrateCompilation-23262), ip: (0x0000000119270000 - 0x0000000119274248), installedCode: (address: 0x0000000119270000, entryPoint: 0x0000000119270000)
CodeInfo (0x0000600001ac43c0 - 0x0000600001ac4470), code constants live - Map (SubstrateCompilation-23267), ip: (0x000000011927c000 - 0x000000011927f858), installedCode: (address: 0x0000000000000000, entryPoint: 0x0000000000000000)

DeoptStubPointer address: 0x0000000103969c20

Recent deoptimization events (oldest first):
deoptSourceFrameOperation: DeoptimizedFrame at 0x0000000317b74760: [Deoptimization of frame (0.304s)
name: Array Iterator.prototype.next (SubstrateCompilation-23250)
sp: 0x000000016d741a50 ip: 0x00000001191f8ba0
stack trace where execution continues:
at com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:664) bci 18 return address 0x000000010d572da0
org.graalvm.truffle.runtime/com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:664)
bci: 18 deoptMethodOffset: 183200896 deoptMethod: 0x000000010d572c80 return address: 0x000000010d572da0 offset: 8
slot 0 kind: Object value: com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget@0x00000003176176a8 offset: 80
slot 1 kind: Object value: [Ljava.lang.Object;@0x0000000317b74200 offset: 72
slot 2 kind: Object value: [Ljava.lang.Object;@0x0000000317b74200 offset: 72
slot ...
deoptStub: completed for DeoptimizedFrame at 0x317b74760
deoptSourceFrameOperation: DeoptimizedFrame at 0x00000003182c9e10: [Deoptimization of frame (0.315s)
name: Array Iterator.prototype.next (SubstrateCompilation-23258)
sp: 0x000000016d7431a0 ip: 0x000000011921960c
stack trace where execution continues:
at com.oracle.truffle.js.runtime.builtins.JSArrayIteratorObject.setNextIndex(JSArrayIteratorObject.java:79) bci 5 return address 0x000000010d477e8c
com.oracle.truffle.js.runtime.builtins.JSArrayIteratorObject.setNextIndex(JSArrayIteratorObject.java:79)
bci: 5 deoptMethodOffset: 182173296 deoptMethod: 0x000000010d477e70 return address: 0x000000010d477e8c offset: 8
at com.oracle.truffle.js.builtins.ArrayIteratorPrototypeBuiltins$ArrayIteratorNextNode.doArrayIterator(ArrayIteratorPrototypeBuiltins.java:143) bci 137 duringCall return address 0x000000010d00bf18
com.oracle.truffle.js.builtins.ArrayIteratorPrototypeBuiltins$ArrayIteratorNextNode.doArrayIterator(ArrayIteratorPr...
deoptStub: completed for DeoptimizedFrame at 0x3182c9e10
deoptSourceFrameOperation: DeoptimizedFrame at 0x00000003185116d8: [Deoptimization of frame (0.320s)
name: Map.prototype.set (SubstrateCompilation-23259)
sp: 0x000000016d742120 ip: 0x000000011921040c
stack trace where execution continues:
at com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:664) bci 18 return address 0x000000010d572da0
org.graalvm.truffle.runtime/com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:664)
bci: 18 deoptMethodOffset: 183200896 deoptMethod: 0x000000010d572c80 return address: 0x000000010d572da0 offset: 8
slot 0 kind: Object value: com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget@0x0000000317618048 offset: 80
slot 1 kind: Object value: [Ljava.lang.Object;@0x0000000318511138 offset: 72
slot 2 kind: Object value: [Ljava.lang.Object;@0x0000000318511138 offset: 72
slot 4 kind: int...
deoptStub: completed for DeoptimizedFrame at 0x3185116d8
deoptSourceFrameOperation: DeoptimizedFrame at 0x0000000318c3d350: [Deoptimization of frame (0.333s)
name: Array.prototype.push (SubstrateCompilation-23265)
sp: 0x000000016d741f60 ip: 0x0000000119251780
stack trace where execution continues:
at com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:664) bci 18 return address 0x000000010d572da0
org.graalvm.truffle.runtime/com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:664)
bci: 18 deoptMethodOffset: 183200896 deoptMethod: 0x000000010d572c80 return address: 0x000000010d572da0 offset: 8
slot 0 kind: Object value: com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget@0x0000000317706e18 offset: 80
slot 1 kind: Object value: [Ljava.lang.Object;@0x0000000318c3cdb0 offset: 72
slot 2 kind: Object value: [Ljava.lang.Object;@0x0000000318c3cdb0 offset: 72
slot 4 kind: ...
deoptStub: completed for DeoptimizedFrame at 0x318c3d350
deoptSourceFrameOperation: DeoptimizedFrame at 0x0000000318ed0400: [Deoptimization of frame (0.338s)
name: Map.prototype.get (SubstrateCompilation-23268)
sp: 0x000000016d73e180 ip: 0x0000000119258414
stack trace where execution continues:
at com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:664) bci 18 return address 0x000000010d572da0
org.graalvm.truffle.runtime/com.oracle.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:664)
bci: 18 deoptMethodOffset: 183200896 deoptMethod: 0x000000010d572c80 return address: 0x000000010d572da0 offset: 8
slot 0 kind: Object value: com.oracle.svm.truffle.api.SubstrateOptimizedCallTarget@0x0000000317d15388 offset: 80
slot 1 kind: Object value: [Ljava.lang.Object;@0x0000000318ecfe60 offset: 72
slot 2 kind: Object value: [Ljava.lang.Object;@0x0000000318ecfe60 offset: 72
slot 4 kind: int...
deoptStub: completed for DeoptimizedFrame at 0x318ed0400

Heap settings and statistics:
Supports isolates: true
Heap base: 0x0000000300000000
Object reference size: 4
Reserved object header bits: 0b11111
Aligned chunk size: 524288
Large array threshold: 131072
Incremental collections: 0
Complete collections: 0

Heap usage:
Eden: 216.87M (0.00M in 0 aligned chunks, 0.00M in 0 unaligned chunks)
Old: 0.00M (0.00M in 0 aligned chunks, 0.00M in 0 unaligned chunks)

Native image heap boundaries:
ReadOnly Primitives: 0x0000000300080008 - 0x00000003085731c0
ReadOnly References: 0x00000003085731c0 - 0x0000000309327910
ReadOnly Relocatables: 0x0000000309328000 - 0x0000000309bde488
Writable Primitives: 0x0000000309be0000 - 0x000000030a64eb20
Writable References: 0x000000030a64eb20 - 0x000000030b785d90
Writable Huge: 0x0000000000000000 - 0x0000000000000000
ReadOnly Huge: 0x0000000000000000 - 0x0000000000000000

Heap chunks: E=eden, S=survivor, O=old, F=free; A=aligned chunk, U=unaligned chunk; T=to space

Segfault detected, aborting process. Use '-XX:-InstallSegfaultHandler' to disable the segfault handler at run time and create a core dump instead. Rebuild with '-R:-InstallSegfaultHandler' to disable the handler permanently at build time.

Building with -O2 produces an exception instead of a crash:

java.lang.ClassCastException
	at java.base@23/java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl.throwAccessCheckException(AtomicReferenceFieldUpdater.java:418)
	at java.base@23/java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl.accessCheck(AtomicReferenceFieldUpdater.java:409)
	at java.base@23/java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl.get(AtomicReferenceFieldUpdater.java:466)
	at kotlinx.coroutines.CancellableContinuationImpl.getParentHandle(CancellableContinuationImpl.kt:103)
	at kotlinx.coroutines.CancellableContinuationImpl.detachChild$kotlinx_coroutines_core(CancellableContinuationImpl.kt:569)
	at kotlinx.coroutines.CancellableContinuationImpl.detachChildIfNonResuable(CancellableContinuationImpl.kt:562)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$kotlinx_coroutines_core(CancellableContinuationImpl.kt:503)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$kotlinx_coroutines_core$default(CancellableContinuationImpl.kt:493)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeUndispatched(CancellableContinuationImpl.kt:596)
	at kotlinx.coroutines.EventLoopImplBase$DelayedResumeTask.run(EventLoop.common.kt:497)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:263)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:47)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at com.jakewharton.mosaic.BlockingKt.runMosaicBlocking(blocking.kt:6)
...

The code in question:
335789405-de6de4a1-a8cd-4d39-9f76-34af3197c6df

This code is part of KotlinX Coroutines 1.9.0-RC, and calls into KotlinX AtomicFU.

Affected versions

Machine:

Apple MacBook Pro M2
macOS Sonoma 14.4.1

Mainline:

java version "22.0.1" 2024-04-16
Java(TM) SE Runtime Environment Oracle GraalVM 22.0.1+8.1 (build 22.0.1+8-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 22.0.1+8.1 (build 22.0.1+8-jvmci-b01, mixed mode, sharing)

Edge:

java version "23" 2024-09-17
Java(TM) SE Runtime Environment Oracle GraalVM 23-dev+18.1 (build 23+18-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 23-dev+18.1 (build 23+18-jvmci-b01, mixed mode, sharing)

I haven't tested against Linux yet.

Reproducers / Related Issues

I have cross-filed issues with the coroutines team and Jake Wharton, who writes Mosaic (and could be related);

There is also a main tracking issue on our own codebase. There is extensive tracing of the error on these issues, a minimal reproducer as well, which I will enclose below.

To run:

Download and unzip the archive, enter the directory, then:

./gradlew nativeCompile
./build/native/nativeCompile/demo
@sgammon sgammon changed the title Crash with Kotlin Coroutines 1.9.0-RC Crash with Kotlin Coroutines / Kotlin 2.0 Jun 5, 2024
@fzhinkin
Copy link

fzhinkin commented Jun 5, 2024

I tried to debug the issue a bit (here Kotlin/kotlinx.coroutines#4146). For me, it reproduced with earlier versions of both Kotlin (1.9.24) and GraalVM (EE 17, 21, 22, 23 all seem to be affected).

I'm not very proficient in analyzing code emitted by the Graal, but looking at what's going on at sigbus site, it's always a heap-base address being dereferenced: Kotlin/kotlinx.coroutines#4146 (comment).

@selhagani selhagani self-assigned this Jun 5, 2024
@sgammon
Copy link
Author

sgammon commented Jun 6, 2024

It's possible there is some workaround for this with --initialize-at-run-time, maybe? My gut tells me that if only because this started appearing with our adoption of --initialize-at-build-time= (i.e. an empty argument to set it as the default).

@selhagani
Copy link
Member

Hi there sam,

Could you kindly share the reproducer via a GitHub repository? As per our policy, we are unable to download attached zip files for security reasons.

Thank you for your understanding and patience, especially as my response was delayed due to a recent vacation.

I appreciate your cooperation and look forward to resolving this issue with you.

@selhagani
Copy link
Member

Hi there, I haven't gotten a response from you in two weeks so I'm gonna go ahead and close this ticket.

@sgammon
Copy link
Author

sgammon commented Jul 10, 2024

@selhagani Yes, sorry, I just got this tag. I will upload the reproducer in a repository and share here; would you mind re-opening this ticket? Jetbrains is helping from their end too.

cc / @fzhinkin @qwwdfsad

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