Bug #6564
openDebug with breakpoint crashes
70%
Description
On Win11 WSL, with Py 3.12.7, using Pycharm 2024.2.3, I was trying to debug and set breakpoints to step over code. I like to do that to watch variables and try/fix stuff as I go.
Start with a breakpoint on the xml
variable line (#9). It breaks.
Then step over (F8 in PyCharm Win) the parse_xml()
line (#10), and Py (or pydevd) crashes with the infamous:
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available
.
The same happens if breakpoint is on any line after e.g. return xml
The code runs without issue if not in debug mode.
Interestingly, debugging works just fine in Windows (11) ! So not sure if WSL-specific or a broader Linux issue.
Below a code snippet to help reproduce:
from fastapi import FastAPI
from saxonche import PySaxonProcessor
saxon_proc = PySaxonProcessor(license=False)
app = FastAPI()
@app.get("/")
def get():
xml = '<root><child>Test</child></root>'
node = saxon_proc.parse_xml(xml_text=xml)
xml = node.to_string()
return xml
if __name__ == "__main__":
import uvicorn
uvicorn.run(app)
Updated by O'Neil Delpratt 10 days ago
- Status changed from New to In Progress
I am investigating this bug, which are sometimes tricky to solve. The crash is indicating a threading issue and from first inspection the underlying parseXMLFromString()
method in the c++ API is missing the attachCurrentThread call.
Updated by O'Neil Delpratt 9 days ago
I am unable to reproduce the crash on macos. So as you have said it maybe a specific issue on WSL-specific platforms.
Updated by O'Neil Delpratt 9 days ago
- Assignee changed from O'Neil Delpratt to Matt Patterson
Updated by Matt Patterson 9 days ago
Is there more complete example you can share? Specifically a requirements.txt
or similar so I can nail down the dependency versions – there's some interesting stuff that uvicorn does that might have some bearing on this – and I'd like to get as close to the setup you're using as possible.
Updated by Martin Honnen 8 days ago
Matt,
I am not the original poster but I have set up a sample project using PyCharm Professional PyCharm 2024.3.1 under Windows 11 with Ubuntu 24.04 WSL, the requirements.txt that the IDE created for me after installing all required packages for the sample code is
uvicorn~=0.32.1
fastapi~=0.115.6
saxonche~=12.5.0
In a debug session, it crashes as described with that error:
/home/mh/DebugTest1/.venv/bin/python -X pycache_prefix=/home/mh/.cache/JetBrains/PyCharm2024.3/cpython-cache /home/mh/.cache/JetBrains/RemoteDev/dist/e944293af38a8_pycharm-professional-2024.3.1/plugins/python-ce/helpers/pydev/pydevd.py --multiprocess --qt-support=auto --port 29781 --file /home/mh/DebugTest1/main.py
INFO: Started server process [15459]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native code to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred.
Current timestamp: 1734127294997
Printing Instructions (ip=0x00007f10c4912600):
0x00007f10c49125e0: 0x00 0x41 0xc7 0x87 0xfc 0x00 0x00 0x00 0xfe 0xfe 0xfe 0x7e 0x48 0x8b 0x7c 0x24
0x00007f10c49125f0: 0x20 0x48 0x8b 0x74 0x24 0x10 0x48 0x8b 0x54 0x24 0x18 0xe8 0x90 0xfc 0xff 0xff
0x00007f10c4912600: 0x90 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc
0x00007f10c4912610: 0x48 0x83 0xec 0x18 0x49 0x3b 0x67 0x08 0x0f 0x86 0x9f 0x00 0x00 0x00 0x48 0x8b
Top of stack (sp=0x00007f10c0dfe940):
0x00007f10c0dfe940: 0x00007f10c0dfe9d0 0x0000000000572a2e
0x00007f10c0dfe950: 0x00007f10c2c97fe8 0x00007f10c2700000
0x00007f10c0dfe960: 0x00007f10c48f7d0c 0x00007f10c495d5f4
0x00007f10c0dfe970: 0x0000000000000000 0x00007f10c48f7d0c
0x00007f10c0dfe980: 0x00007f10c0dfe9d8 0xbbc948c1f269af5b
0x00007f10c0dfe990: 0x00007f10c0dfe9c0 0x00007f10c48f8048
0x00007f10c0dfe9a0: 0x00007f10d4082740 0x0000000000000005
0x00007f10c0dfe9b0: 0x0000000000000000 0x0000000000000000
0x00007f10c0dfe9c0: 0x0000000000000000 0x0000000000000000
0x00007f10c0dfe9d0: 0x00ff00fd00fb00f9 0x0000000000000000
0x00007f10c0dfe9e0: 0xbff2495b9b4845e9 0x0000000000000000
0x00007f10c0dfe9f0: 0x3fe999999959554e 0x0000000000000000
0x00007f10c0dfea00: 0xbfe5555555555560 0x0000000000000000
0x00007f10c0dfea10: 0x0000000000000000 0x0000000000000000
0x00007f10c0dfea20: 0x0000000000000000 0x0000000000000000
0x00007f10c0dfea30: 0x0000006f00000068 0x000000330000006e
0x00007f10c0dfea40: 0x0000000000b3acf0 0x00007f10d7806290
0x00007f10c0dfea50: 0x00007f10d6843bc0 0x00007f10d7908e80
0x00007f10c0dfea60: 0x000000750000002f 0x0000007200000073
0x00007f10c0dfea70: 0x00007f10c0dfecf0 0x0000000000000000
0x00007f10c0dfea80: 0x0072007000650072 0x0000000000000000
0x00007f10c0dfea90: 0x00000000ffffffff 0x0000000000000000
0x00007f10c0dfeaa0: 0xffffffff00000000 0x0000000000000000
0x00007f10c0dfeab0: 0x00007f10d4082720 0x00007f10b4005ae0
0x00007f10c0dfeac0: 0x0000000000000001 0x0000000000000002
0x00007f10c0dfead0: 0x00007f10c44388e0 0x00007f10d4082698
0x00007f10c0dfeae0: 0x00007f10b4005300 0x00007f10c44388e0
0x00007f10c0dfeaf0: 0x00007f10c0dfec00 0x00007f10c19c9580
0x00007f10c0dfeb00: 0x0000000000000002 0x00000000000000ab
0x00007f10c0dfeb10: 0x00007f10b4005300 0x00007f10c577bd3a
0x00007f10c0dfeb20: 0x00007f10c0dfeb70 0x0000000000599617
0x00007f10c0dfeb30: 0x00007f10c0dfeb90 0x0000000000000001
Top frame info:
TotalFrameSize in CodeInfoTable 48
Threads:
0x00007f10b4005300 STATUS_IN_JAVA (PREVENT_VM_FROM_REACHING_SAFEPOINT) "System-0" - 0x00007f10c0e01028, daemon, stack(0x00007f10c1001000,0x00007f10c1800000)
0x00007f10bc000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Reference Handler" - 0x00007f10c37c5570, daemon, stack(0x00007f10c1d01000,0x00007f10c2500000)
0x00000000339c5240 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "main" - 0x00007f10c37c54b8, stack(0x00007ffc30041000,0x00007ffc30839000)
VM thread locals for the failing thread 0x00007f10b4005300:
0 (8 bytes): JNIThreadLocalEnvironment.jniFunctions = (bytes)
0x00007f10b4005300: 0x00007f10c2ef2010
8 (8 bytes): StackOverflowCheckImpl.stackBoundaryTL = (Word) 1 (0x0000000000000001)
16 (4 bytes): Safepoint.safepointRequested = (int) 2147457507 (0x7fff99e3)
20 (4 bytes): StatusSupport.statusTL = (int) 1 (0x00000001)
24 (32 bytes): ThreadLocalAllocation.regularTLAB = (bytes)
0x00007f10b4005318: 0x00007f10c0e00000 0x00007f10c0f00000
0x00007f10b4005328: 0x00007f10c0e48b28 0x0000000000000000
56 (8 bytes): PlatformThreads.currentThread = (Object) java.lang.Thread (0x00007f10c0e01028)
64 (8 bytes): JavaFrameAnchors.lastAnchor = (Word) 0 (0x0000000000000000)
72 (8 bytes): AccessControlContextStack = (Object) java.util.ArrayDeque (0x00007f10c0e021b0)
80 (8 bytes): ExceptionUnwind.currentException = (Object) null
88 (8 bytes): IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) java.util.SplittableRandom (0x00007f10c0e40440)
96 (8 bytes): IsolatedCompileClient.currentClient = (Object) null
104 (8 bytes): IsolatedCompileContext.currentContext = (Object) null
112 (8 bytes): JNIObjectHandles.handles = (Object) com.oracle.svm.core.handles.ThreadLocalHandles (0x00007f10c0e023d8)
120 (8 bytes): JNIThreadLocalPendingException.pendingException = (Object) null
128 (8 bytes): JNIThreadLocalPinnedObjects.pinnedObjectsListHead = (Object) null
136 (8 bytes): JNIThreadOwnedMonitors.ownedMonitors = (Object) null
144 (8 bytes): NoAllocationVerifier.openVerifiers = (Object) null
152 (8 bytes): ThreadingSupportImpl.activeTimer = (Object) null
160 (8 bytes): SubstrateDiagnostics.threadOnlyAttachedForCrashHandler = (bytes)
0x00007f10b40053a0: 0x0000000000000000
168 (8 bytes): ThreadLocalAllocation.allocatedBytes = (Word) 0 (0x0000000000000000)
176 (8 bytes): VMThreads.IsolateTL = (Word) 139709958324224 (0x00007f10c2700000)
184 (8 bytes): VMThreads.OSThreadHandleTL = (Word) 139709942593216 (0x00007f10c17ff6c0)
192 (8 bytes): VMThreads.OSThreadIdTL = (Word) 139709942593216 (0x00007f10c17ff6c0)
200 (8 bytes): VMThreads.StackBase = (Word) 139709942595584 (0x00007f10c1800000)
208 (8 bytes): VMThreads.StackEnd = (Word) 139709934211072 (0x00007f10c1001000)
216 (8 bytes): VMThreads.StartedByCurrentIsolate = (bytes)
0x00007f10b40053d8: 0x0000000000000000
224 (8 bytes): VMThreads.nextTL = (Word) 139709850323840 (0x00007f10bc000b80)
232 (8 bytes): VMThreads.unalignedIsolateThreadMemoryTL = (Word) 139709716124384 (0x00007f10b40052e0)
240 (4 bytes): ActionOnExitSafepointSupport.actionTL = (int) 0 (0x00000000)
244 (4 bytes): ActionOnTransitionToJavaSupport.actionTL = (int) 0 (0x00000000)
248 (4 bytes): ImplicitExceptions.implicitExceptionsAreFatal = (int) 0 (0x00000000)
252 (4 bytes): StackOverflowCheckImpl.yellowZoneStateTL = (int) 2130640638 (0x7efefefe)
256 (4 bytes): StatusSupport.safepointBehaviorTL = (int) 1 (0x00000001)
260 (4 bytes): ThreadingSupportImpl.currentPauseDepth = (int) 1 (0x00000001)
No VMOperation in progress
The 15 most recent VM operation status changes (oldest first):
Counters:
Java frame anchors for the failing thread 0x00007f10b4005300:
No anchors
Stacktrace for the failing thread 0x00007f10b4005300:
SP 0x00007f10c0dfe940 IP 0x00007f10c4912600 [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shutdown(VMErrorSubstitutions.java:116)
SP 0x00007f10c0dfe940 IP 0x00007f10c4912600 [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shouldNotReachHere(VMErrorSubstitutions.java:109)
SP 0x00007f10c0dfe970 IP 0x00007f10c495d5f4 [image code] com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:65)
SP 0x00007f10c0dfe980 IP 0x00007f10c48f7d0c [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.onYellowZoneMadeAvailable(StackOverflowCheckImpl.java:197)
SP 0x00007f10c0dfe9a0 IP 0x00007f10c48f8048 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.makeYellowZoneAvailable(StackOverflowCheckImpl.java:172)
SP 0x00007f10c0dfe9a0 IP 0x00007f10c48f8048 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.throwNewStackOverflowError(StackOverflowCheckImpl.java:308)
SP 0x00007f10c0dfeb20 IP 0x00007f10c577bd3a [image code] net.sf.saxon.option.cpp.XdmUtils.toString_XdmNode(XdmUtils.java:234)
SP 0x00007f10c0dfeb50 IP 0x00007f10c48be9c0 [image code] com.oracle.svm.core.code.IsolateEnterStub.XdmUtils_toString_XdmNode_4d894eba33734a82eee9d0d3b4a9d61231476592(IsolateEnterStub.java:0)
VM mutexes:
mutex "mainVMOperationControlWorkQueue" is unlocked.
mutex "thread" is unlocked.
mutex "referencePendingList" is unlocked.
AOT compiled code is mapped at 0x00007f10c486c000 - 0x00007f10c619588f
Heap settings and statistics:
Supports isolates: true
Heap base: 0x00007f10c2700000
Object reference size: 8
Aligned chunk size: 1048576
Incremental collections: 0
Complete collections: 0
Native image heap boundaries:
ReadOnly Primitives: 0x00007f10c2801028 - 0x00007f10c2c06978
ReadOnly References: 0x00007f10c2c06978 - 0x00007f10c2ef16a8
ReadOnly Relocatables: 0x00007f10c2ef2000 - 0x00007f10c3140cb0
Writable Primitives: 0x00007f10c3141000 - 0x00007f10c36b6498
Writable References: 0x00007f10c36b6498 - 0x00007f10c3b961a8
Writable Huge: 0x00007f10c3c00030 - 0x00007f10c3c73830
ReadOnly Huge: 0x00007f10c3c74030 - 0x00007f10c4332b68
Heap:
Young generation:
Eden:
edenSpace:
aligned: 0/0 unaligned: 0/0
Survivors:
Survivor-1 From:
aligned: 0/0 unaligned: 0/0
Survivor-1 To:
aligned: 0/0 unaligned: 0/0
Survivor-2 From:
aligned: 0/0 unaligned: 0/0
Survivor-2 To:
aligned: 0/0 unaligned: 0/0
Survivor-3 From:
aligned: 0/0 unaligned: 0/0
Survivor-3 To:
aligned: 0/0 unaligned: 0/0
Survivor-4 From:
aligned: 0/0 unaligned: 0/0
Survivor-4 To:
aligned: 0/0 unaligned: 0/0
Survivor-5 From:
aligned: 0/0 unaligned: 0/0
Survivor-5 To:
aligned: 0/0 unaligned: 0/0
Survivor-6 From:
aligned: 0/0 unaligned: 0/0
Survivor-6 To:
aligned: 0/0 unaligned: 0/0
Survivor-7 From:
aligned: 0/0 unaligned: 0/0
Survivor-7 To:
aligned: 0/0 unaligned: 0/0
Survivor-8 From:
aligned: 0/0 unaligned: 0/0
Survivor-8 To:
aligned: 0/0 unaligned: 0/0
Survivor-9 From:
aligned: 0/0 unaligned: 0/0
Survivor-9 To:
aligned: 0/0 unaligned: 0/0
Survivor-10 From:
aligned: 0/0 unaligned: 0/0
Survivor-10 To:
aligned: 0/0 unaligned: 0/0
Survivor-11 From:
aligned: 0/0 unaligned: 0/0
Survivor-11 To:
aligned: 0/0 unaligned: 0/0
Survivor-12 From:
aligned: 0/0 unaligned: 0/0
Survivor-12 To:
aligned: 0/0 unaligned: 0/0
Survivor-13 From:
aligned: 0/0 unaligned: 0/0
Survivor-13 To:
aligned: 0/0 unaligned: 0/0
Survivor-14 From:
aligned: 0/0 unaligned: 0/0
Survivor-14 To:
aligned: 0/0 unaligned: 0/0
Survivor-15 From:
aligned: 0/0 unaligned: 0/0
Survivor-15 To:
aligned: 0/0 unaligned: 0/0
Old generation:
oldFromSpace:
aligned: 0/0 unaligned: 0/0
oldToSpace:
aligned: 0/0 unaligned: 0/0
Unused:
aligned: 0/0
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native code to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred.
Process finished with exit code 99
It indeed gives no such error in a debug session itself with the same project run on Windows/with Python on Windows but there, when running in the IDE, I get a similar error when terminating a run or debug session with the red button (stop main / F2)
C:\Users\marti\PycharmProjects\DebugTest1\.venv\Scripts\python.exe C:\Users\marti\PycharmProjects\DebugTest1\main.py
INFO: Started server process [5300]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: 127.0.0.1:53343 - "GET / HTTP/1.1" 200 OK
INFO: 127.0.0.1:53343 - "GET / HTTP/1.1" 200 OK
INFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [5300]
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native code to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred.
Current timestamp: 1734127994662
Printing Instructions (ip=0x00007fffc0fb2e40):
0x00007fffc0fb2e20: 0x00 0x41 0xc7 0x87 0xfc 0x00 0x00 0x00 0xfe 0xfe 0xfe 0x7e 0x48 0x8b 0x54 0x24
0x00007fffc0fb2e30: 0x20 0x4c 0x8b 0x44 0x24 0x10 0x4c 0x8b 0x4c 0x24 0x18 0xe8 0x80 0xfc 0xff 0xff
0x00007fffc0fb2e40: 0x90 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc
0x00007fffc0fb2e50: 0x48 0x83 0xec 0x28 0x48 0x89 0x54 0x24 0x20 0x49 0x3b 0x67 0x08 0x0f 0x86 0x66
Top of stack (sp=0x00000004ba7ef3d0):
0x00000004ba7ef3d0: 0x0000000000001040 0x00007ff800000002
0x00000004ba7ef3e0: 0x000001498a998d08 0x000001498a400000
0x00000004ba7ef3f0: 0x00007fffc0fa12be 0x00007fffc1009a14
0x00000004ba7ef400: 0x0000014988c3d220 0x00007fffc0fa12be
0x00000004ba7ef410: 0x0000014988b57ec0 0x0000000000000000
0x00000004ba7ef420: 0x0000014986060d0a 0x00007fffc0fa15f2
0x00000004ba7ef430: 0x0000000000000106 0x00007ff88b5d472a
0x00000004ba7ef440: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef450: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef460: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef470: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef480: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef490: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef4a0: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef4b0: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef4c0: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef4d0: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef4e0: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef4f0: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef500: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef510: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef520: 0x0000000000000000 0x0000000000000000
0x00000004ba7ef530: 0xffffffffffffff00 0x0000014987e20f90
0x00000004ba7ef540: 0x0000014985782710 0x00007fffd64af018
0x00000004ba7ef550: 0x00000000ffffffff 0x0000000000000000
0x00000004ba7ef560: 0x00007fffd6451820 0x00007fffd6451768
0x00000004ba7ef570: 0x0000000000000001 0x000001498919a820
0x00000004ba7ef580: 0x0000000000000004 0x00000149889e9920
0x00000004ba7ef590: 0x0000014988a67080 0x0000014988a67080
0x00000004ba7ef5a0: 0x0000000000000001 0x00007fffc1e228cd
0x00000004ba7ef5b0: 0x0000000000000363 0x00007fffd162e180
0x00000004ba7ef5c0: 0x0000000000000003 0x00007ff888c992fb
Top frame info:
TotalFrameSize in CodeInfoTable 48
Threads:
0x0000014988a67080 STATUS_IN_JAVA (PREVENT_VM_FROM_REACHING_SAFEPOINT) "System-0" - 0x000001498c401028, daemon, stack(0x00000004bb1a0000,0x00000004bb390000)
0x0000014988a67480 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Reference Handler" - 0x000001498b4cc6c8, daemon, stack(0x00000004badc0000,0x00000004bafb0000)
0x0000014988a66c80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "main" - 0x000001498b4cc618, stack(0x00000004ba600000,0x00000004ba7f0000)
VM thread locals for the failing thread 0x0000014988a67080:
0 (8 bytes): JNIThreadLocalEnvironment.jniFunctions = (bytes)
0x0000014988a67080: 0x000001498abf4010
8 (8 bytes): StackOverflowCheckImpl.stackBoundaryTL = (Word) 1 (0x0000000000000001)
16 (4 bytes): Safepoint.safepointRequested = (int) 2147442149 (0x7fff5de5)
20 (4 bytes): StatusSupport.statusTL = (int) 1 (0x00000001)
24 (32 bytes): ThreadLocalAllocation.regularTLAB = (bytes)
0x0000014988a67098: 0x000001498c400000 0x000001498c500000
0x0000014988a670a8: 0x000001498c4a7730 0x0000000000000000
56 (8 bytes): PlatformThreads.currentThread = (Object) java.lang.Thread (0x000001498c401028)
64 (8 bytes): JavaFrameAnchors.lastAnchor = (Word) 0 (0x0000000000000000)
72 (8 bytes): AccessControlContextStack = (Object) java.util.ArrayDeque (0x000001498c4021a8)
80 (8 bytes): ExceptionUnwind.currentException = (Object) null
88 (8 bytes): IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) java.util.SplittableRandom (0x000001498c440470)
96 (8 bytes): IsolatedCompileClient.currentClient = (Object) null
104 (8 bytes): IsolatedCompileContext.currentContext = (Object) null
112 (8 bytes): JNIObjectHandles.handles = (Object) com.oracle.svm.core.handles.ThreadLocalHandles (0x000001498c4023d0)
120 (8 bytes): JNIThreadLocalPendingException.pendingException = (Object) null
128 (8 bytes): JNIThreadLocalPinnedObjects.pinnedObjectsListHead = (Object) null
136 (8 bytes): JNIThreadOwnedMonitors.ownedMonitors = (Object) null
144 (8 bytes): NoAllocationVerifier.openVerifiers = (Object) null
152 (8 bytes): ThreadingSupportImpl.activeTimer = (Object) null
160 (8 bytes): SubstrateDiagnostics.threadOnlyAttachedForCrashHandler = (bytes)
0x0000014988a67120: 0x0000000000000000
168 (8 bytes): ThreadLocalAllocation.allocatedBytes = (Word) 0 (0x0000000000000000)
176 (8 bytes): VMThreads.IsolateTL = (Word) 1415363690496 (0x000001498a400000)
184 (8 bytes): VMThreads.OSThreadHandleTL = (Word) 908 (0x000000000000038c)
192 (8 bytes): VMThreads.OSThreadIdTL = (Word) 8736 (0x0000000000002220)
200 (8 bytes): VMThreads.StackBase = (Word) 20320944128 (0x00000004bb390000)
208 (8 bytes): VMThreads.StackEnd = (Word) 20318912512 (0x00000004bb1a0000)
216 (8 bytes): VMThreads.StartedByCurrentIsolate = (bytes)
0x0000014988a67158: 0x0000000000000000
224 (8 bytes): VMThreads.nextTL = (Word) 1415336850560 (0x0000014988a67480)
232 (8 bytes): VMThreads.unalignedIsolateThreadMemoryTL = (Word) 1415336849520 (0x0000014988a67070)
240 (4 bytes): ActionOnExitSafepointSupport.actionTL = (int) 0 (0x00000000)
244 (4 bytes): ActionOnTransitionToJavaSupport.actionTL = (int) 0 (0x00000000)
248 (4 bytes): ImplicitExceptions.implicitExceptionsAreFatal = (int) 0 (0x00000000)
252 (4 bytes): StackOverflowCheckImpl.yellowZoneStateTL = (int) 2130640638 (0x7efefefe)
256 (4 bytes): StatusSupport.safepointBehaviorTL = (int) 1 (0x00000001)
260 (4 bytes): ThreadingSupportImpl.currentPauseDepth = (int) 1 (0x00000001)
No VMOperation in progress
The 15 most recent VM operation status changes (oldest first):
Counters:
Java frame anchors for the failing thread 0x0000014988a67080:
No anchors
Stacktrace for the failing thread 0x0000014988a67080:
SP 0x00000004ba7ef3d0 IP 0x00007fffc0fb2e40 [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shutdown(VMErrorSubstitutions.java:116)
SP 0x00000004ba7ef3d0 IP 0x00007fffc0fb2e40 [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shouldNotReachHere(VMErrorSubstitutions.java:109)
SP 0x00000004ba7ef400 IP 0x00007fffc1009a14 [image code] com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:65)
SP 0x00000004ba7ef410 IP 0x00007fffc0fa12be [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.onYellowZoneMadeAvailable(StackOverflowCheckImpl.java:197)
SP 0x00000004ba7ef430 IP 0x00007fffc0fa15f2 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.makeYellowZoneAvailable(StackOverflowCheckImpl.java:172)
SP 0x00000004ba7ef430 IP 0x00007fffc0fa15f2 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.throwNewStackOverflowError(StackOverflowCheckImpl.java:308)
SP 0x00000004ba7ef5b0 IP 0x00007fffc1e228cd [image code] net.sf.saxon.option.cpp.SaxonCAPI.destroy(SaxonCAPI.java:359)
SP 0x00000004ba7ef5f0 IP 0x00007fffc0f45509 [image code] com.oracle.svm.core.code.IsolateEnterStub.SaxonCAPI_destroy_af4003d90d189ca5b0d8f9b7f6f7fbc3c3e762de(IsolateEnterStub.java:0)
VM mutexes:
mutex "thread" is unlocked.
mutex "mainVMOperationControlWorkQueue" is unlocked.
mutex "referencePendingList" is unlocked.
AOT compiled code is mapped at 0x00007fffc0ef1000 - 0x00007fffc2894a2f
Heap settings and statistics:
Supports isolates: true
Heap base: 0x000001498a400000
Object reference size: 8
Aligned chunk size: 1048576
Incremental collections: 0
Complete collections: 0
Native image heap boundaries:
ReadOnly Primitives: 0x000001498a501028 - 0x000001498a909760
ReadOnly References: 0x000001498a909760 - 0x000001498abf3248
ReadOnly Relocatables: 0x000001498abf4000 - 0x000001498ae41d50
Writable Primitives: 0x000001498ae42000 - 0x000001498b3bb2b0
Writable References: 0x000001498b3bb2b0 - 0x000001498b8a7830
Writable Huge: 0x000001498b900030 - 0x000001498b973af0
ReadOnly Huge: 0x000001498b974030 - 0x000001498bf96e08
Heap:
Young generation:
Eden:
edenSpace:
aligned: 0/0 unaligned: 0/0
Survivors:
Survivor-1 From:
aligned: 0/0 unaligned: 0/0
Survivor-1 To:
aligned: 0/0 unaligned: 0/0
Survivor-2 From:
aligned: 0/0 unaligned: 0/0
Survivor-2 To:
aligned: 0/0 unaligned: 0/0
Survivor-3 From:
aligned: 0/0 unaligned: 0/0
Survivor-3 To:
aligned: 0/0 unaligned: 0/0
Survivor-4 From:
aligned: 0/0 unaligned: 0/0
Survivor-4 To:
aligned: 0/0 unaligned: 0/0
Survivor-5 From:
aligned: 0/0 unaligned: 0/0
Survivor-5 To:
aligned: 0/0 unaligned: 0/0
Survivor-6 From:
aligned: 0/0 unaligned: 0/0
Survivor-6 To:
aligned: 0/0 unaligned: 0/0
Survivor-7 From:
aligned: 0/0 unaligned: 0/0
Survivor-7 To:
aligned: 0/0 unaligned: 0/0
Survivor-8 From:
aligned: 0/0 unaligned: 0/0
Survivor-8 To:
aligned: 0/0 unaligned: 0/0
Survivor-9 From:
aligned: 0/0 unaligned: 0/0
Survivor-9 To:
aligned: 0/0 unaligned: 0/0
Survivor-10 From:
aligned: 0/0 unaligned: 0/0
Survivor-10 To:
aligned: 0/0 unaligned: 0/0
Survivor-11 From:
aligned: 0/0 unaligned: 0/0
Survivor-11 To:
aligned: 0/0 unaligned: 0/0
Survivor-12 From:
aligned: 0/0 unaligned: 0/0
Survivor-12 To:
aligned: 0/0 unaligned: 0/0
Survivor-13 From:
aligned: 0/0 unaligned: 0/0
Survivor-13 To:
aligned: 0/0 unaligned: 0/0
Survivor-14 From:
aligned: 0/0 unaligned: 0/0
Survivor-14 To:
aligned: 0/0 unaligned: 0/0
Survivor-15 From:
aligned: 0/0 unaligned: 0/0
Survivor-15 To:
aligned: 0/0 unaligned: 0/0
Old generation:
oldFromSpace:
aligned: 0/0 unaligned: 0/0
oldToSpace:
aligned: 0/0 unaligned: 0/0
Unused:
aligned: 0/0
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native code to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred.
Process finished with exit code 99
I am not sure these are related but for sure always irritating if you get that yellow zone error. Even not running in the IDE but from the terminal and then terminating with Ctrl+C gives
(.venv) PS C:\Users\marti\PycharmProjects\DebugTest1> python .\main.py
INFO: Started server process [34980]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: 127.0.0.1:53588 - "GET / HTTP/1.1" 200 OK
INFO: 127.0.0.1:53588 - "GET / HTTP/1.1" 200 OK
INFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [34980]
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native c
ode to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred.
Current timestamp: 1734128189093
Printing Instructions (ip=0x00007fffbe202e40):
0x00007fffbe202e20: 0x00 0x41 0xc7 0x87 0xfc 0x00 0x00 0x00 0xfe 0xfe 0xfe 0x7e 0x48 0x8b 0x54 0x24
0x00007fffbe202e30: 0x20 0x4c 0x8b 0x44 0x24 0x10 0x4c 0x8b 0x4c 0x24 0x18 0xe8 0x80 0xfc 0xff 0xff
0x00007fffbe202e40: 0x90 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc
0x00007fffbe202e50: 0x48 0x83 0xec 0x28 0x48 0x89 0x54 0x24 0x20 0x49 0x3b 0x67 0x08 0x0f 0x86 0x66
Top of stack (sp=0x0000009e197ef4c0):
0x0000009e197ef4c0: 0x0000000000000e40 0x0000026100000002
0x0000009e197ef4d0: 0x0000026127798d08 0x0000026127200000
0x0000009e197ef4e0: 0x00007fffbe1f12be 0x00007fffbe259a14
0x0000009e197ef4f0: 0x00000261259f2ba0 0x00007fffbe1f12be
0x0000009e197ef500: 0x0000026124cde220 0x0000000000000000
0x0000009e197ef510: 0x0000026122b3f56a 0x00007fffbe1f15f2
0x0000009e197ef520: 0x00000000000000ae 0x00007ff88b5d472a
0x0000009e197ef530: 0x0000000000000000 0x0000000000000000
0x0000009e197ef540: 0x0000000000000000 0x0000000000000000
0x0000009e197ef550: 0x0000000000000000 0x0000000000000000
0x0000009e197ef560: 0x0000000000000000 0x0000000000000000
0x0000009e197ef570: 0x0000000000000000 0x0000000000000000
0x0000009e197ef580: 0x0000000000000000 0x0000000000000000
0x0000009e197ef590: 0x0000000000000000 0x0000000000000000
0x0000009e197ef5a0: 0x0000000000000000 0x0000000000000000
0x0000009e197ef5b0: 0x0000000000000000 0x0000000000000000
0x0000009e197ef5c0: 0x0000000000000000 0x0000000000000000
0x0000009e197ef5d0: 0x0000000000000000 0x0000000000000000
0x0000009e197ef5e0: 0x0000000000000000 0x0000000000000000
0x0000009e197ef5f0: 0x0000000000000000 0x0000000000000000
0x0000009e197ef600: 0x0000000000000000 0x0000000000000000
0x0000009e197ef610: 0x0000000000000000 0x0000000000000000
0x0000009e197ef620: 0xffffffffffffff00 0x0000026122f46660
0x0000009e197ef630: 0x0000026122595d30 0x00007fffd626f018
0x0000009e197ef640: 0x00000000ffffffff 0x0000000000000000
0x0000009e197ef650: 0x00007fffd6211820 0x00007fffd6211768
0x0000009e197ef660: 0x0000000000000001 0x00000261254afb60
0x0000009e197ef670: 0x0000000000000004 0x00000261257f6a10
0x0000009e197ef680: 0x000002612598a980 0x000002612598a980
0x0000009e197ef690: 0x0000000000000001 0x00007fffbf0728cd
0x0000009e197ef6a0: 0x0000000000000060 0x00007fffd162e180
0x0000009e197ef6b0: 0x0000000000000009 0x00007ff888c992fb
Top frame info:
TotalFrameSize in CodeInfoTable 48
Threads:
0x000002612598a980 STATUS_IN_JAVA (PREVENT_VM_FROM_REACHING_SAFEPOINT) "System-0" - 0x0000026129101028, daemon, stack(0x0000009e1a1a0000,0x0000009e1a390000)
0x000002612598ad80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Reference Handler" - 0x00000261282cc6c8, daemon, stack(0x0000009e19dc0000,0x0000009e19fb0000)
0x000002612598a6c0 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "main" - 0x00000261282cc618, stack(0x0000009e19600000,0x0000009e197f0000)
VM thread locals for the failing thread 0x000002612598a980:
0 (8 bytes): JNIThreadLocalEnvironment.jniFunctions = (bytes)
0x000002612598a980: 0x00000261279f4010
8 (8 bytes): StackOverflowCheckImpl.stackBoundaryTL = (Word) 1 (0x0000000000000001)
16 (4 bytes): Safepoint.safepointRequested = (int) 2147442289 (0x7fff5e71)
20 (4 bytes): StatusSupport.statusTL = (int) 1 (0x00000001)
24 (32 bytes): ThreadLocalAllocation.regularTLAB = (bytes)
0x000002612598a998: 0x0000026129100000 0x0000026129200000
0x000002612598a9a8: 0x00000261291a7730 0x0000000000000000
56 (8 bytes): PlatformThreads.currentThread = (Object) java.lang.Thread (0x0000026129101028)
64 (8 bytes): JavaFrameAnchors.lastAnchor = (Word) 0 (0x0000000000000000)
72 (8 bytes): AccessControlContextStack = (Object) java.util.ArrayDeque (0x00000261291021a8)
80 (8 bytes): ExceptionUnwind.currentException = (Object) null
88 (8 bytes): IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) java.util.SplittableRandom (0x0000026129140470)
96 (8 bytes): IsolatedCompileClient.currentClient = (Object) null
104 (8 bytes): IsolatedCompileContext.currentContext = (Object) null
112 (8 bytes): JNIObjectHandles.handles = (Object) com.oracle.svm.core.handles.ThreadLocalHandles (0x00000261291023d0)
120 (8 bytes): JNIThreadLocalPendingException.pendingException = (Object) null
128 (8 bytes): JNIThreadLocalPinnedObjects.pinnedObjectsListHead = (Object) null
136 (8 bytes): JNIThreadOwnedMonitors.ownedMonitors = (Object) null
144 (8 bytes): NoAllocationVerifier.openVerifiers = (Object) null
152 (8 bytes): ThreadingSupportImpl.activeTimer = (Object) null
160 (8 bytes): SubstrateDiagnostics.threadOnlyAttachedForCrashHandler = (bytes)
0x000002612598aa20: 0x0000000000000000
168 (8 bytes): ThreadLocalAllocation.allocatedBytes = (Word) 0 (0x0000000000000000)
176 (8 bytes): VMThreads.IsolateTL = (Word) 2616291491840 (0x0000026127200000)
184 (8 bytes): VMThreads.OSThreadHandleTL = (Word) 868 (0x0000000000000364)
192 (8 bytes): VMThreads.OSThreadIdTL = (Word) 22868 (0x0000000000005954)
200 (8 bytes): VMThreads.StackBase = (Word) 679044775936 (0x0000009e1a390000)
208 (8 bytes): VMThreads.StackEnd = (Word) 679042744320 (0x0000009e1a1a0000)
216 (8 bytes): VMThreads.StartedByCurrentIsolate = (bytes)
0x000002612598aa58: 0x0000000000000000
224 (8 bytes): VMThreads.nextTL = (Word) 2616265846144 (0x000002612598ad80)
232 (8 bytes): VMThreads.unalignedIsolateThreadMemoryTL = (Word) 2616265845088 (0x000002612598a960)
240 (4 bytes): ActionOnExitSafepointSupport.actionTL = (int) 0 (0x00000000)
244 (4 bytes): ActionOnTransitionToJavaSupport.actionTL = (int) 0 (0x00000000)
248 (4 bytes): ImplicitExceptions.implicitExceptionsAreFatal = (int) 0 (0x00000000)
252 (4 bytes): StackOverflowCheckImpl.yellowZoneStateTL = (int) 2130640638 (0x7efefefe)
256 (4 bytes): StatusSupport.safepointBehaviorTL = (int) 1 (0x00000001)
260 (4 bytes): ThreadingSupportImpl.currentPauseDepth = (int) 1 (0x00000001)
No VMOperation in progress
The 15 most recent VM operation status changes (oldest first):
Counters:
Java frame anchors for the failing thread 0x000002612598a980:
No anchors
Stacktrace for the failing thread 0x000002612598a980:
SP 0x0000009e197ef4c0 IP 0x00007fffbe202e40 [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shutdown(VMErrorSubstitutions.java:116)
SP 0x0000009e197ef4c0 IP 0x00007fffbe202e40 [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shouldNotReachHere(VMErrorSubstitutions.java:109)
SP 0x0000009e197ef4f0 IP 0x00007fffbe259a14 [image code] com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:65)
SP 0x0000009e197ef500 IP 0x00007fffbe1f12be [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.onYellowZoneMadeAvailable(StackOverflowCheckImpl.java:197)
SP 0x0000009e197ef520 IP 0x00007fffbe1f15f2 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.makeYellowZoneAvailable(StackOverflowCheckImpl.java:172)
SP 0x0000009e197ef520 IP 0x00007fffbe1f15f2 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.throwNewStackOverflowError(StackOverflowCheckImpl.java:308)
SP 0x0000009e197ef6a0 IP 0x00007fffbf0728cd [image code] net.sf.saxon.option.cpp.SaxonCAPI.destroy(SaxonCAPI.java:359)
SP 0x0000009e197ef6e0 IP 0x00007fffbe195509 [image code] com.oracle.svm.core.code.IsolateEnterStub.SaxonCAPI_destroy_af4003d90d189ca5b0d8f9b7f6f7fbc3c3e762de(IsolateEnterStub.java:0)
VM mutexes:
mutex "thread" is unlocked.
mutex "mainVMOperationControlWorkQueue" is unlocked.
mutex "referencePendingList" is unlocked.
AOT compiled code is mapped at 0x00007fffbe141000 - 0x00007fffbfae4a2f
Heap settings and statistics:
Supports isolates: true
Heap base: 0x0000026127200000
Object reference size: 8
Aligned chunk size: 1048576
Incremental collections: 0
Complete collections: 0
Native image heap boundaries:
ReadOnly Primitives: 0x0000026127301028 - 0x0000026127709760
ReadOnly References: 0x0000026127709760 - 0x00000261279f3248
ReadOnly Relocatables: 0x00000261279f4000 - 0x0000026127c41d50
Writable Primitives: 0x0000026127c42000 - 0x00000261281bb2b0
Writable References: 0x00000261281bb2b0 - 0x00000261286a7830
Writable Huge: 0x0000026128700030 - 0x0000026128773af0
ReadOnly Huge: 0x0000026128774030 - 0x0000026128d96e08
Heap:
Young generation:
Eden:
edenSpace:
aligned: 0/0 unaligned: 0/0
Survivors:
Survivor-1 From:
aligned: 0/0 unaligned: 0/0
Survivor-1 To:
aligned: 0/0 unaligned: 0/0
Survivor-2 From:
aligned: 0/0 unaligned: 0/0
Survivor-2 To:
aligned: 0/0 unaligned: 0/0
Survivor-3 From:
aligned: 0/0 unaligned: 0/0
Survivor-3 To:
aligned: 0/0 unaligned: 0/0
Survivor-4 From:
aligned: 0/0 unaligned: 0/0
Survivor-4 To:
aligned: 0/0 unaligned: 0/0
Survivor-5 From:
aligned: 0/0 unaligned: 0/0
Survivor-5 To:
aligned: 0/0 unaligned: 0/0
Survivor-6 From:
aligned: 0/0 unaligned: 0/0
Survivor-6 To:
aligned: 0/0 unaligned: 0/0
Survivor-7 From:
aligned: 0/0 unaligned: 0/0
Survivor-7 To:
aligned: 0/0 unaligned: 0/0
Survivor-8 From:
aligned: 0/0 unaligned: 0/0
Survivor-8 To:
aligned: 0/0 unaligned: 0/0
Survivor-9 From:
aligned: 0/0 unaligned: 0/0
Survivor-9 To:
aligned: 0/0 unaligned: 0/0
Survivor-10 From:
aligned: 0/0 unaligned: 0/0
Survivor-10 To:
aligned: 0/0 unaligned: 0/0
Survivor-11 From:
aligned: 0/0 unaligned: 0/0
Survivor-11 To:
aligned: 0/0 unaligned: 0/0
Survivor-12 From:
aligned: 0/0 unaligned: 0/0
Survivor-12 To:
aligned: 0/0 unaligned: 0/0
Survivor-13 From:
aligned: 0/0 unaligned: 0/0
Survivor-13 To:
aligned: 0/0 unaligned: 0/0
Survivor-14 From:
aligned: 0/0 unaligned: 0/0
Survivor-14 To:
aligned: 0/0 unaligned: 0/0
Survivor-15 From:
aligned: 0/0 unaligned: 0/0
Survivor-15 To:
aligned: 0/0 unaligned: 0/0
Old generation:
oldFromSpace:
aligned: 0/0 unaligned: 0/0
oldToSpace:
aligned: 0/0 unaligned: 0/0
Unused:
aligned: 0/0
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native c
ode to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred.
Updated by Martin Honnen 8 days ago
I have put a GitHub repo online: https://github.com/martin-honnen/DebugTest1
Updated by Martin Honnen 8 days ago
Meanwhile, a run under WSL Linux can be cleanly stopped with Ctrl+C:
(.venv) mh@DESKTOP-H0UJVLG:~/DebugTest1$ python main.py
INFO: Started server process [25433]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: 127.0.0.1:34070 - "GET / HTTP/1.1" 200 OK
INFO: 127.0.0.1:34070 - "GET / HTTP/1.1" 200 OK
^CINFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [25433]
Updated by Martin Honnen 7 days ago
Currently I am trying to reproduce the debugging crash with Ubuntu 24.04 ARM64 run under Parallels Desktop on an M3 Mac.
It indeed crashes on the parse_xml, so this is not specific to WSL.
/home/parallels/PycharmProjects/DebugTest1/.venv/bin/python -X pycache_prefix=/home/parallels/.cache/JetBrains/PyCharm2024.3/cpython-cache /snap/pycharm-professional/444/plugins/python-ce/helpers/pydev/pydevd.py --multiprocess --qt-support=auto --port 29781 --file /home/parallels/PycharmProjects/DebugTest1/main.py
INFO: Started server process [16386]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native code to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred.
Current timestamp: 1734201835276
Printing Instructions (ip=0x0000e4a6f491b794):
0x0000e4a6f491b774: 0xe0 0x03 0x40 0xb2 0x80 0x07 0x00 0xf9 0xc0 0xdf 0x9f 0x52 0xc0 0xdf 0xaf 0x72
0x0000e4a6f491b784: 0x80 0xff 0x00 0xb9 0xe0 0x17 0x40 0xf9 0xe1 0x8b 0x41 0xa9 0x28 0xff 0xff 0x97
0x0000e4a6f491b794: 0x1f 0x20 0x03 0xd5 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xff 0x03 0x01 0xd1
0x0000e4a6f491b7a4: 0xfd 0x7b 0x03 0xa9 0x82 0x07 0x40 0xf9 0xff 0x63 0x22 0xeb 0x29 0x05 0x00 0x54
Top of stack (sp=0x0000e4a6e8c0e140):
0x0000e4a6e8c0e140: 0x0000e4a6dc027ff0 0x0000e4a6ff905580
0x0000e4a6e8c0e150: 0x00000000ffffffff 0x0000e4a6ea797340
0x0000e4a6e8c0e160: 0x0000e4a6ea200000 0x0000e4a6f48ff710
0x0000e4a6e8c0e170: 0x0000e4a6e8c0e640 0x0000e4a6f4968578
0x0000e4a6e8c0e180: 0x0000e4a700a493b0 0x0000000000000001
0x0000e4a6e8c0e190: 0x0000000000a36770 0x0000000000000000
0x0000e4a6e8c0e1a0: 0x0000e4a6e8c0e640 0x0000e4a6f48ff710
0x0000e4a6e8c0e1b0: 0x0000e4a700d68630 0x0000e4a6ff905580
0x0000e4a6e8c0e1c0: 0x0000e4a6dc027ff0 0x0000000000000002
0x0000e4a6e8c0e1d0: 0x0000e4a6e8c0e640 0x0000e4a6f48ff9a4
0x0000e4a6e8c0e1e0: 0x0000000000000000 0x0000e4a6e8c0e250
0x0000e4a6e8c0e1f0: 0x0000e4a6e8c0e438 0x0000000000000001
0x0000e4a6e8c0e200: 0x00000000000003e8 0x00000000000003e8
0x0000e4a6e8c0e210: 0x0000000000000000 0x0000000000000000
0x0000e4a6e8c0e220: 0x0000004000000080 0x0000000000000000
0x0000e4a6e8c0e230: 0x0000000000004000 0x0000000000040000
0x0000e4a6e8c0e240: 0x0000000000000064 0x00000000000003e8
0x0000e4a6e8c0e250: 0x0000000000002710 0x0000000000000064
0x0000e4a6e8c0e260: 0x000000640000000a 0x0000000000000000
0x0000e4a6e8c0e270: 0x0000000000000100 0x00000000000003e8
0x0000e4a6e8c0e280: 0x0000000000000100 0x0000000000002000
0x0000e4a6e8c0e290: 0x4000000000000000 0x0000000000000000
0x0000e4a6e8c0e2a0: 0x0000000000000000 0x00000000000003e8
0x0000e4a6e8c0e2b0: 0x0000000000000000 0x0000000000000001
0x0000e4a6e8c0e2c0: 0x0000000100000001 0x0000000100000001
0x0000e4a6e8c0e2d0: 0xbff2495b9b4845e9 0x0000000000000000
0x0000e4a6e8c0e2e0: 0x0000e4a6e960db10 0xffffff80ffffffd0
0x0000e4a6e8c0e2f0: 0x0000e4a6e8c0e400 0xffffff80ffffffd8
0x0000e4a6e8c0e300: 0x0000000000000000 0x0000000000000000
0x0000e4a6e8c0e310: 0x0000000000000000 0x0000000000000000
0x0000e4a6e8c0e320: 0x0000000000000000 0x0000000000000000
0x0000e4a6e8c0e330: 0x0000000000000000 0x0000000000000000
Top frame info:
TotalFrameSize in CodeInfoTable 64
Threads:
0x0000e4a6dc01b480 STATUS_IN_JAVA (PREVENT_VM_FROM_REACHING_SAFEPOINT) "System-0" - 0x0000e4a6fc201028, daemon, stack(0x0000e4a6e8e11000,0x0000e4a6e9610000)
0x0000e4a6e4000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Reference Handler" - 0x0000e4a6eb2c4330, daemon, stack(0x0000e4a6e9811000,0x0000e4a6ea010000)
0x0000000040132dc0 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "main" - 0x0000e4a6eb2c4278, stack(0x0000ffffdb3d8000,0x0000ffffdbbd3000)
VM thread locals for the failing thread 0x0000e4a6dc01b480:
0 (8 bytes): JNIThreadLocalEnvironment.jniFunctions = (bytes)
0x0000e4a6dc01b480: 0x0000e4a6ea9f1010
8 (8 bytes): StackOverflowCheckImpl.stackBoundaryTL = (Word) 1 (0x0000000000000001)
16 (4 bytes): Safepoint.safepointRequested = (int) 2147456982 (0x7fff97d6)
20 (4 bytes): StatusSupport.statusTL = (int) 1 (0x00000001)
24 (32 bytes): ThreadLocalAllocation.regularTLAB = (bytes)
0x0000e4a6dc01b498: 0x0000e4a6fc200000 0x0000e4a6fc300000
0x0000e4a6dc01b4a8: 0x0000e4a6fc248b28 0x0000000000000000
56 (8 bytes): PlatformThreads.currentThread = (Object) java.lang.Thread (0x0000e4a6fc201028)
64 (8 bytes): JavaFrameAnchors.lastAnchor = (Word) 0 (0x0000000000000000)
72 (8 bytes): AccessControlContextStack = (Object) java.util.ArrayDeque (0x0000e4a6fc202348)
80 (8 bytes): ExceptionUnwind.currentException = (Object) null
88 (8 bytes): IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) java.util.SplittableRandom (0x0000e4a6fc240440)
96 (8 bytes): IsolatedCompileClient.currentClient = (Object) null
104 (8 bytes): IsolatedCompileContext.currentContext = (Object) null
112 (8 bytes): JNIObjectHandles.handles = (Object) com.oracle.svm.core.handles.ThreadLocalHandles (0x0000e4a6fc202570)
120 (8 bytes): JNIThreadLocalPendingException.pendingException = (Object) null
128 (8 bytes): JNIThreadLocalPinnedObjects.pinnedObjectsListHead = (Object) null
136 (8 bytes): JNIThreadOwnedMonitors.ownedMonitors = (Object) null
144 (8 bytes): NoAllocationVerifier.openVerifiers = (Object) null
152 (8 bytes): ThreadingSupportImpl.activeTimer = (Object) null
160 (8 bytes): SubstrateDiagnostics.threadOnlyAttachedForCrashHandler = (bytes)
0x0000e4a6dc01b520: 0x0000000000000000
168 (8 bytes): ThreadLocalAllocation.allocatedBytes = (Word) 0 (0x0000000000000000)
176 (8 bytes): VMThreads.IsolateTL = (Word) 251405543669760 (0x0000e4a6ea200000)
184 (8 bytes): VMThreads.OSThreadHandleTL = (Word) 251405531148672 (0x0000e4a6e960f180)
192 (8 bytes): VMThreads.OSThreadIdTL = (Word) 251405531148672 (0x0000e4a6e960f180)
200 (8 bytes): VMThreads.StackBase = (Word) 251405531152384 (0x0000e4a6e9610000)
208 (8 bytes): VMThreads.StackEnd = (Word) 251405522767872 (0x0000e4a6e8e11000)
216 (8 bytes): VMThreads.StartedByCurrentIsolate = (bytes)
0x0000e4a6dc01b558: 0x0000000000000000
224 (8 bytes): VMThreads.nextTL = (Word) 251405440912256 (0x0000e4a6e4000b80)
232 (8 bytes): VMThreads.unalignedIsolateThreadMemoryTL = (Word) 251405306803280 (0x0000e4a6dc01b450)
240 (4 bytes): ActionOnExitSafepointSupport.actionTL = (int) 0 (0x00000000)
244 (4 bytes): ActionOnTransitionToJavaSupport.actionTL = (int) 0 (0x00000000)
248 (4 bytes): ImplicitExceptions.implicitExceptionsAreFatal = (int) 0 (0x00000000)
252 (4 bytes): StackOverflowCheckImpl.yellowZoneStateTL = (int) 2130640638 (0x7efefefe)
256 (4 bytes): StatusSupport.safepointBehaviorTL = (int) 1 (0x00000001)
260 (4 bytes): ThreadingSupportImpl.currentPauseDepth = (int) 1 (0x00000001)
No VMOperation in progress
The 15 most recent VM operation status changes (oldest first):
Counters:
Java frame anchors for the failing thread 0x0000e4a6dc01b480:
No anchors
Stacktrace for the failing thread 0x0000e4a6dc01b480:
SP 0x0000e4a6e8c0e140 IP 0x0000e4a6f491b794 [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shutdown(VMErrorSubstitutions.java:116)
SP 0x0000e4a6e8c0e140 IP 0x0000e4a6f491b794 [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shouldNotReachHere(VMErrorSubstitutions.java:109)
SP 0x0000e4a6e8c0e180 IP 0x0000e4a6f4968578 [image code] com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:65)
SP 0x0000e4a6e8c0e1b0 IP 0x0000e4a6f48ff710 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.onYellowZoneMadeAvailable(StackOverflowCheckImpl.java:197)
SP 0x0000e4a6e8c0e1e0 IP 0x0000e4a6f48ff9a4 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.makeYellowZoneAvailable(StackOverflowCheckImpl.java:172)
SP 0x0000e4a6e8c0e1e0 IP 0x0000e4a6f48ff9a4 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.throwNewStackOverflowError(StackOverflowCheckImpl.java:308)
SP 0x0000e4a6e8c0e4e0 IP 0x0000e4a6f5801d28 [image code] net.sf.saxon.option.cpp.XdmUtils.toString_XdmNode(XdmUtils.java:234)
SP 0x0000e4a6e8c0e520 IP 0x0000e4a6f48c41f4 [image code] com.oracle.svm.core.code.IsolateEnterStub.XdmUtils_toString_XdmNode_4d894eba33734a82eee9d0d3b4a9d61231476592(IsolateEnterStub.java:0)
VM mutexes:
mutex "thread" is unlocked.
mutex "mainVMOperationControlWorkQueue" is unlocked.
mutex "referencePendingList" is unlocked.
AOT compiled code is mapped at 0x0000e4a6f4870000 - 0x0000e4a6f627cbaf
Heap settings and statistics:
Supports isolates: true
Heap base: 0x0000e4a6ea200000
Object reference size: 8
Aligned chunk size: 1048576
Incremental collections: 0
Complete collections: 0
Native image heap boundaries:
ReadOnly Primitives: 0x0000e4a6ea301028 - 0x0000e4a6ea705b78
ReadOnly References: 0x0000e4a6ea705b78 - 0x0000e4a6ea9f00c8
ReadOnly Relocatables: 0x0000e4a6ea9f1000 - 0x0000e4a6eac3f258
Writable Primitives: 0x0000e4a6eac40000 - 0x0000e4a6eb1b54a0
Writable References: 0x0000e4a6eb1b54a0 - 0x0000e4a6eb694c20
Writable Huge: 0x0000e4a6eb700030 - 0x0000e4a6eb773668
ReadOnly Huge: 0x0000e4a6eb774030 - 0x0000e4a6ebe31650
Heap:
Young generation:
Eden:
edenSpace:
aligned: 0/0 unaligned: 0/0
Survivors:
Survivor-1 From:
aligned: 0/0 unaligned: 0/0
Survivor-1 To:
aligned: 0/0 unaligned: 0/0
Survivor-2 From:
aligned: 0/0 unaligned: 0/0
Survivor-2 To:
aligned: 0/0 unaligned: 0/0
Survivor-3 From:
aligned: 0/0 unaligned: 0/0
Survivor-3 To:
aligned: 0/0 unaligned: 0/0
Survivor-4 From:
aligned: 0/0 unaligned: 0/0
Survivor-4 To:
aligned: 0/0 unaligned: 0/0
Survivor-5 From:
aligned: 0/0 unaligned: 0/0
Survivor-5 To:
aligned: 0/0 unaligned: 0/0
Survivor-6 From:
aligned: 0/0 unaligned: 0/0
Survivor-6 To:
aligned: 0/0 unaligned: 0/0
Survivor-7 From:
aligned: 0/0 unaligned: 0/0
Survivor-7 To:
aligned: 0/0 unaligned: 0/0
Survivor-8 From:
aligned: 0/0 unaligned: 0/0
Survivor-8 To:
aligned: 0/0 unaligned: 0/0
Survivor-9 From:
aligned: 0/0 unaligned: 0/0
Survivor-9 To:
aligned: 0/0 unaligned: 0/0
Survivor-10 From:
aligned: 0/0 unaligned: 0/0
Survivor-10 To:
aligned: 0/0 unaligned: 0/0
Survivor-11 From:
aligned: 0/0 unaligned: 0/0
Survivor-11 To:
aligned: 0/0 unaligned: 0/0
Survivor-12 From:
aligned: 0/0 unaligned: 0/0
Survivor-12 To:
aligned: 0/0 unaligned: 0/0
Survivor-13 From:
aligned: 0/0 unaligned: 0/0
Survivor-13 To:
aligned: 0/0 unaligned: 0/0
Survivor-14 From:
aligned: 0/0 unaligned: 0/0
Survivor-14 To:
aligned: 0/0 unaligned: 0/0
Survivor-15 From:
aligned: 0/0 unaligned: 0/0
Survivor-15 To:
aligned: 0/0 unaligned: 0/0
Old generation:
oldFromSpace:
aligned: 0/0 unaligned: 0/0
oldToSpace:
aligned: 0/0 unaligned: 0/0
Unused:
aligned: 0/0
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native code to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred.
Process finished with exit code 99
Updated by Martin Honnen 7 days ago
What I can even achieve when using PyCharm directly on the Mac M3 is reproducing a yellow zone error when I stop a debug session, i.e. debugging works fine but when I stop it I get a crash like shown below; I can't really tell whether it is an IDE a problem or a SaxonC/GraalVM problem but com.oracle.svm.core.code.IsolateEnterStub.SaxonCAPI_destroy
appears in there.
/Users/martin/PycharmProjects/DebugTest1/.venv/bin/python -X pycache_prefix=/Users/martin/Library/Caches/JetBrains/PyCharm2024.3/cpython-cache /Users/martin/Applications/PyCharm Professional Edition.app/Contents/plugins/python-ce/helpers/pydev/pydevd.py --multiprocess --qt-support=auto --port 29781 --file /Users/martin/PycharmProjects/DebugTest1/main.py
INFO: Started server process [9056]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: 127.0.0.1:56943 - "GET / HTTP/1.1" 200 OK
INFO: 127.0.0.1:56962 - "GET / HTTP/1.1" 200 OK
INFO: 127.0.0.1:56976 - "GET / HTTP/1.1" 200 OK
INFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [9056]
Task exception was never retrieved
future: <Task finished name='Task-1' coro=<Server.serve() done, defined at /Users/martin/PycharmProjects/DebugTest1/.venv/lib/python3.9/site-packages/uvicorn/server.py:67> exception=KeyboardInterrupt()>
Traceback (most recent call last):
File "/Users/martin/PycharmProjects/DebugTest1/.venv/lib/python3.9/site-packages/uvicorn/main.py", line 579, in run
server.run()
File "/Users/martin/PycharmProjects/DebugTest1/.venv/lib/python3.9/site-packages/uvicorn/server.py", line 65, in run
return asyncio.run(self.serve(sockets=sockets))
File "/Users/martin/Applications/PyCharm Professional Edition.app/Contents/plugins/python/helpers-pro/pydevd_asyncio/pydevd_nest_asyncio.py", line 138, in run
return loop.run_until_complete(task)
File "/Users/martin/Applications/PyCharm Professional Edition.app/Contents/plugins/python/helpers-pro/pydevd_asyncio/pydevd_nest_asyncio.py", line 234, in run_until_complete
self._run_once()
File "/Users/martin/Applications/PyCharm Professional Edition.app/Contents/plugins/python/helpers-pro/pydevd_asyncio/pydevd_nest_asyncio.py", line 286, in _run_once
handle._run()
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/tasks.py", line 339, in __wakeup
self.__step()
File "/Users/martin/Applications/PyCharm Professional Edition.app/Contents/plugins/python/helpers-pro/pydevd_asyncio/pydevd_nest_asyncio.py", line 394, in step
step_orig(task, exc)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/tasks.py", line 256, in __step
result = coro.send(None)
File "/Users/martin/PycharmProjects/DebugTest1/.venv/lib/python3.9/site-packages/uvicorn/server.py", line 69, in serve
await self._serve(sockets)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/contextlib.py", line 124, in __exit__
next(self.gen)
File "/Users/martin/PycharmProjects/DebugTest1/.venv/lib/python3.9/site-packages/uvicorn/server.py", line 332, in capture_signals
signal.raise_signal(captured_signal)
KeyboardInterrupt
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native code to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred.
Current timestamp: 1734203793885
Printing Instructions (ip=0x00000001228a7fb4):
0x00000001228a7f94: 0xe0 0x03 0x40 0xb2 0x80 0x07 0x00 0xf9 0xc0 0xdf 0x9f 0x52 0xc0 0xdf 0xaf 0x72
0x00000001228a7fa4: 0x80 0xff 0x00 0xb9 0xe0 0x17 0x40 0xf9 0xe1 0x8b 0x41 0xa9 0x28 0xff 0xff 0x97
0x00000001228a7fb4: 0x1f 0x20 0x03 0xd5 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xff 0x03 0x01 0xd1
0x00000001228a7fc4: 0xfd 0x7b 0x03 0xa9 0x82 0x07 0x40 0xf9 0xff 0x63 0x22 0xeb 0x69 0x05 0x00 0x54
Top of stack (sp=0x000000016bbe9180):
0x000000016bbe9180: 0x00000001127dee80 0x0000000000000001
0x000000016bbe9190: 0x0000000112768540 0x0000000113596e98
0x000000016bbe91a0: 0x0000000113000000 0x000000012288bc80
0x000000016bbe91b0: 0x000000016bbe96b0 0x00000001228f4788
0x000000016bbe91c0: 0x00000001066f2030 0x0000000000000000
0x000000016bbe91d0: 0x0000000000000000 0x0000000104efda68
0x000000016bbe91e0: 0x000000016bbe96b0 0x000000012288bc80
0x000000016bbe91f0: 0x000000016bbe9250 0x0000000104adaed4
0x000000016bbe9200: 0x0000000000000000 0x0000000000000000
0x000000016bbe9210: 0x000000016bbe96b0 0x000000012288bf14
0x000000016bbe9220: 0x00000001065190e0 0x00000001048b7360
0x000000016bbe9230: 0x00000001048b7378 0x0000000000000000
0x000000016bbe9240: 0x0000000114c46c00 0x0000000000000000
0x000000016bbe9250: 0x0000000000000000 0x47903f96d0ba0d94
0x000000016bbe9260: 0xb195630f3e44b85c 0x2e2e2e2e2e2e2e2e
0x000000016bbe9270: 0x2e2e2e2e2e2e2e2e 0x0000000100000001
0x000000016bbe9280: 0x0000000100000001 0x8080808080808080
0x000000016bbe9290: 0x8080808080808080 0x3f3f3f3f3f3f3f3f
0x000000016bbe92a0: 0x3f3f3f3f3f3f3f3f 0xe0e0e0e0e0e0e0e0
0x000000016bbe92b0: 0xe0e0e0e0e0e0e0e0 0x0000000000000010
0x000000016bbe92c0: 0x0000000000000018 0xffffff01ffffff00
0x000000016bbe92d0: 0xffffff03ffffff02 0xffffff05ffffff04
0x000000016bbe92e0: 0xffffff07ffffff06 0xffffff09ffffff08
0x000000016bbe92f0: 0xffffff0bffffff0a 0xffffff0dffffff0c
0x000000016bbe9300: 0xffffff0fffffff0e 0xfffffffffffffff0
0x000000016bbe9310: 0xffffffffffffffe8 0xffffffffffffffe0
0x000000016bbe9320: 0xffffffffffffffd8 0x00000001751997d0
0x000000016bbe9330: 0x00000000ccaa009e 0x0000000154442bd4
0x000000016bbe9340: 0x00000001c6e41596 0x0000000000000000
0x000000016bbe9350: 0x0000000000000000 0x0000000000000000
0x000000016bbe9360: 0x0000000000000000 0x0000000000000000
0x000000016bbe9370: 0x0000000000000000 0x0000000000000000
Top frame info:
TotalFrameSize in CodeInfoTable 64
Threads:
0x0000000120745ec0 STATUS_IN_JAVA (PREVENT_VM_FROM_REACHING_SAFEPOINT) "System-0" - 0x0000000115901028, daemon, stack(0x000000016eca4000,0x000000016fca7000)
0x0000000112472880 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Reference Handler" - 0x00000001140c6fb8, daemon, stack(0x000000016ec18000,0x000000016ec9b000)
0x00000001206cabc0 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "main" - 0x00000001140c6f08, stack(0x000000016abf0000,0x000000016bbf0000)
VM thread locals for the failing thread 0x0000000120745ec0:
0 (8 bytes): JNIThreadLocalEnvironment.jniFunctions = (bytes)
0x0000000120745ec0: 0x00000001137f0010
8 (8 bytes): StackOverflowCheckImpl.stackBoundaryTL = (Word) 1 (0x0000000000000001)
16 (4 bytes): Safepoint.safepointRequested = (int) 2147433903 (0x7fff3daf)
20 (4 bytes): StatusSupport.statusTL = (int) 1 (0x00000001)
24 (32 bytes): ThreadLocalAllocation.regularTLAB = (bytes)
0x0000000120745ed8: 0x0000000115900000 0x0000000115a00000
0x0000000120745ee8: 0x00000001159f34e0 0x0000000000000000
56 (8 bytes): PlatformThreads.currentThread = (Object) java.lang.Thread (0x0000000115901028)
64 (8 bytes): JavaFrameAnchors.lastAnchor = (Word) 0 (0x0000000000000000)
72 (8 bytes): AccessControlContextStack = (Object) java.util.ArrayDeque (0x00000001159021a8)
80 (8 bytes): ExceptionUnwind.currentException = (Object) null
88 (8 bytes): IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) java.util.SplittableRandom (0x00000001159402a0)
96 (8 bytes): IsolatedCompileClient.currentClient = (Object) null
104 (8 bytes): IsolatedCompileContext.currentContext = (Object) null
112 (8 bytes): JNIObjectHandles.handles = (Object) com.oracle.svm.core.handles.ThreadLocalHandles (0x00000001159023d0)
120 (8 bytes): JNIThreadLocalPendingException.pendingException = (Object) null
128 (8 bytes): JNIThreadLocalPinnedObjects.pinnedObjectsListHead = (Object) null
136 (8 bytes): JNIThreadOwnedMonitors.ownedMonitors = (Object) null
144 (8 bytes): NoAllocationVerifier.openVerifiers = (Object) null
152 (8 bytes): ThreadingSupportImpl.activeTimer = (Object) null
160 (8 bytes): SubstrateDiagnostics.threadOnlyAttachedForCrashHandler = (bytes)
0x0000000120745f60: 0x0000000000000000
168 (8 bytes): ThreadLocalAllocation.allocatedBytes = (Word) 0 (0x0000000000000000)
176 (8 bytes): VMThreads.IsolateTL = (Word) 4613734400 (0x0000000113000000)
184 (8 bytes): VMThreads.OSThreadHandleTL = (Word) 6170505216 (0x000000016fca7000)
192 (8 bytes): VMThreads.OSThreadIdTL = (Word) 6170505216 (0x000000016fca7000)
200 (8 bytes): VMThreads.StackBase = (Word) 6170505216 (0x000000016fca7000)
208 (8 bytes): VMThreads.StackEnd = (Word) 6153715712 (0x000000016eca4000)
216 (8 bytes): VMThreads.StartedByCurrentIsolate = (bytes)
0x0000000120745f98: 0x0000000000000000
224 (8 bytes): VMThreads.nextTL = (Word) 4601620608 (0x0000000112472880)
232 (8 bytes): VMThreads.unalignedIsolateThreadMemoryTL = (Word) 4839464592 (0x0000000120745e90)
240 (4 bytes): ActionOnExitSafepointSupport.actionTL = (int) 0 (0x00000000)
244 (4 bytes): ActionOnTransitionToJavaSupport.actionTL = (int) 0 (0x00000000)
248 (4 bytes): ImplicitExceptions.implicitExceptionsAreFatal = (int) 0 (0x00000000)
252 (4 bytes): StackOverflowCheckImpl.yellowZoneStateTL = (int) 2130640638 (0x7efefefe)
256 (4 bytes): StatusSupport.safepointBehaviorTL = (int) 1 (0x00000001)
260 (4 bytes): ThreadingSupportImpl.currentPauseDepth = (int) 1 (0x00000001)
No VMOperation in progress
The 15 most recent VM operation status changes (oldest first):
Counters:
Java frame anchors for the failing thread 0x0000000120745ec0:
No anchors
Stacktrace for the failing thread 0x0000000120745ec0:
SP 0x000000016bbe9180 IP 0x00000001228a7fb4 [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shutdown(VMErrorSubstitutions.java:116)
SP 0x000000016bbe9180 IP 0x00000001228a7fb4 [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shouldNotReachHere(VMErrorSubstitutions.java:109)
SP 0x000000016bbe91c0 IP 0x00000001228f4788 [image code] com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:65)
SP 0x000000016bbe91f0 IP 0x000000012288bc80 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.onYellowZoneMadeAvailable(StackOverflowCheckImpl.java:197)
SP 0x000000016bbe9220 IP 0x000000012288bf14 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.makeYellowZoneAvailable(StackOverflowCheckImpl.java:172)
SP 0x000000016bbe9220 IP 0x000000012288bf14 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.throwNewStackOverflowError(StackOverflowCheckImpl.java:308)
SP 0x000000016bbe9520 IP 0x00000001237653fc [image code] net.sf.saxon.option.cpp.SaxonCAPI.destroy(SaxonCAPI.java:359)
SP 0x000000016bbe9570 IP 0x000000012284a63c [image code] com.oracle.svm.core.code.IsolateEnterStub.SaxonCAPI_destroy_af4003d90d189ca5b0d8f9b7f6f7fbc3c3e762de(IsolateEnterStub.java:0)
VM mutexes:
mutex "mainVMOperationControlWorkQueue" is unlocked.
mutex "thread" is unlocked.
mutex "referencePendingList" is unlocked.
AOT compiled code is mapped at 0x0000000122804000 - 0x0000000124206d3f
Heap settings and statistics:
Supports isolates: true
Heap base: 0x0000000113000000
Object reference size: 8
Aligned chunk size: 1048576
Incremental collections: 0
Complete collections: 0
Native image heap boundaries:
ReadOnly Primitives: 0x0000000113101028 - 0x0000000113505ca0
ReadOnly References: 0x0000000113505ca0 - 0x00000001137eff68
ReadOnly Relocatables: 0x00000001137f0000 - 0x0000000113a3e6e8
Writable Primitives: 0x0000000113a40000 - 0x0000000113fb6928
Writable References: 0x0000000113fb6928 - 0x000000011449f518
Writable Huge: 0x0000000114500030 - 0x0000000114573610
ReadOnly Huge: 0x0000000114574030 - 0x0000000114c2fcf8
Heap:
Young generation:
Eden:
edenSpace:
aligned: 0/0 unaligned: 0/0
Survivors:
Survivor-1 From:
aligned: 0/0 unaligned: 0/0
Survivor-1 To:
aligned: 0/0 unaligned: 0/0
Survivor-2 From:
aligned: 0/0 unaligned: 0/0
Survivor-2 To:
aligned: 0/0 unaligned: 0/0
Survivor-3 From:
aligned: 0/0 unaligned: 0/0
Survivor-3 To:
aligned: 0/0 unaligned: 0/0
Survivor-4 From:
aligned: 0/0 unaligned: 0/0
Survivor-4 To:
aligned: 0/0 unaligned: 0/0
Survivor-5 From:
aligned: 0/0 unaligned: 0/0
Survivor-5 To:
aligned: 0/0 unaligned: 0/0
Survivor-6 From:
aligned: 0/0 unaligned: 0/0
Survivor-6 To:
aligned: 0/0 unaligned: 0/0
Survivor-7 From:
aligned: 0/0 unaligned: 0/0
Survivor-7 To:
aligned: 0/0 unaligned: 0/0
Survivor-8 From:
aligned: 0/0 unaligned: 0/0
Survivor-8 To:
aligned: 0/0 unaligned: 0/0
Survivor-9 From:
aligned: 0/0 unaligned: 0/0
Survivor-9 To:
aligned: 0/0 unaligned: 0/0
Survivor-10 From:
aligned: 0/0 unaligned: 0/0
Survivor-10 To:
aligned: 0/0 unaligned: 0/0
Survivor-11 From:
aligned: 0/0 unaligned: 0/0
Survivor-11 To:
aligned: 0/0 unaligned: 0/0
Survivor-12 From:
aligned: 0/0 unaligned: 0/0
Survivor-12 To:
aligned: 0/0 unaligned: 0/0
Survivor-13 From:
aligned: 0/0 unaligned: 0/0
Survivor-13 To:
aligned: 0/0 unaligned: 0/0
Survivor-14 From:
aligned: 0/0 unaligned: 0/0
Survivor-14 To:
aligned: 0/0 unaligned: 0/0
Survivor-15 From:
aligned: 0/0 unaligned: 0/0
Survivor-15 To:
aligned: 0/0 unaligned: 0/0
Old generation:
oldFromSpace:
aligned: 0/0 unaligned: 0/0
oldToSpace:
aligned: 0/0 unaligned: 0/0
Unused:
aligned: 0/0
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native code to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred.
Process finished with exit code 99
Updated by Martin Honnen 6 days ago
For what it is worth, I have now run a debug session on a "real" Ubuntu installation (e.g. no VM ot WSL) version is Ubuntu 24.04.1 LTS, Python 3.12.3 and it also crashes out on the parse_xml:
/home/mh/PycharmProjects/DebugTest2/.venv/bin/python -X pycache_prefix=/home/mh/.cache/JetBrains/PyCharm2024.3/cpython-cache /snap/pycharm-professional/443/plugins/python-ce/helpers/pydev/pydevd.py --multiprocess --qt-support=auto --port 29781 --file /home/mh/PycharmProjects/DebugTest2/main.py
INFO: Started server process [7004]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native code to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred.
Current timestamp: 1734299607139
Printing Instructions (ip=0x000079d6d4717600):
0x000079d6d47175e0: 0x00 0x41 0xc7 0x87 0xfc 0x00 0x00 0x00 0xfe 0xfe 0xfe 0x7e 0x48 0x8b 0x7c 0x24
0x000079d6d47175f0: 0x20 0x48 0x8b 0x74 0x24 0x10 0x48 0x8b 0x54 0x24 0x18 0xe8 0x90 0xfc 0xff 0xff
0x000079d6d4717600: 0x90 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc 0xcc
0x000079d6d4717610: 0x48 0x83 0xec 0x18 0x49 0x3b 0x67 0x08 0x0f 0x86 0x9f 0x00 0x00 0x00 0x48 0x8b
Top of stack (sp=0x000079d6c3dff940):
0x000079d6c3dff940: 0x000079d6c3dff9d0 0x0000000000572a2e
0x000079d6c3dff950: 0x000079d6ca397fe8 0x000079d6c9e00000
0x000079d6c3dff960: 0x000079d6d46fcd0c 0x000079d6d47625f4
0x000079d6c3dff970: 0x0000000000000000 0x000079d6d46fcd0c
0x000079d6c3dff980: 0x000079d6c3dff9d8 0x7d5871c92a306a1b
0x000079d6c3dff990: 0x000079d6c3dff9c0 0x000079d6d46fd048
0x000079d6c3dff9a0: 0x000079d6de42b740 0x0000000000000005
0x000079d6c3dff9b0: 0x0000000000000000 0x0000000000000000
0x000079d6c3dff9c0: 0x0000000000000000 0x0000000000000000
0x000079d6c3dff9d0: 0x00ff00fd00fb00f9 0x0000000000000000
0x000079d6c3dff9e0: 0xbff2495b9b4845e9 0x0000000000000000
0x000079d6c3dff9f0: 0x3fe999999959554e 0x0000000000000000
0x000079d6c3dffa00: 0x0000000000000000 0x0000000000000000
0x000079d6c3dffa10: 0xffffffffffffffff 0xffffffffffffffff
0x000079d6c3dffa20: 0x0000000000000000 0x0000000000000000
0x000079d6c3dffa30: 0x2e2e2e2e2e2e2e2e 0x2e2e2e2e2e2e2e2e
0x000079d6c3dffa40: 0x0000000000000000 0x0000000000000000
0x000079d6c3dffa50: 0x000079d6de928440 0x000079d6e00f8e80
0x000079d6c3dffa60: 0x000000750000002f 0x0000007200000073
0x000079d6c3dffa70: 0x000079d6c3dffcf0 0x0000000000000000
0x000079d6c3dffa80: 0x73616c633c000000 0x6e6f786173272073
0x000079d6c3dffa90: 0x00000000ffffffff 0x0000000000000000
0x000079d6c3dffaa0: 0xffffffff00000000 0x0000000000000000
0x000079d6c3dffab0: 0x000079d6de42b720 0x000079d6bc005b60
0x000079d6c3dffac0: 0x0000000000000001 0x0000000000000002
0x000079d6c3dffad0: 0x000079d6cbcbb8e0 0x000079d6de42b698
0x000079d6c3dffae0: 0x000079d6bc005580 0x000079d6cbcbb8e0
0x000079d6c3dffaf0: 0x000079d6c3dffc00 0x000079d6d43f9210
0x000079d6c3dffb00: 0x0000000000000002 0x00000000000000ab
0x000079d6c3dffb10: 0x000079d6bc005580 0x000079d6d5580d3a
0x000079d6c3dffb20: 0x000079d6c3dffb70 0x0000000000599617
0x000079d6c3dffb30: 0x000079d6c3dffb90 0x0000000000000001
Top frame info:
TotalFrameSize in CodeInfoTable 48
Threads:
0x000079d6bc005580 STATUS_IN_JAVA (PREVENT_VM_FROM_REACHING_SAFEPOINT) "System-0" - 0x000079d6c8601028, daemon, stack(0x000079d6c8802000,0x000079d6c9001000)
0x000079d6c4000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Reference Handler" - 0x000079d6caec5570, daemon, stack(0x000079d6c9402000,0x000079d6c9c01000)
0x0000000017842c80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "main" - 0x000079d6caec54b8, stack(0x00007ffc924c6000,0x00007ffc92cc1000)
VM thread locals for the failing thread 0x000079d6bc005580:
0 (8 bytes): JNIThreadLocalEnvironment.jniFunctions = (bytes)
0x000079d6bc005580: 0x000079d6ca5f2010
8 (8 bytes): StackOverflowCheckImpl.stackBoundaryTL = (Word) 1 (0x0000000000000001)
16 (4 bytes): Safepoint.safepointRequested = (int) 2147457647 (0x7fff9a6f)
20 (4 bytes): StatusSupport.statusTL = (int) 1 (0x00000001)
24 (32 bytes): ThreadLocalAllocation.regularTLAB = (bytes)
0x000079d6bc005598: 0x000079d6c8600000 0x000079d6c8700000
0x000079d6bc0055a8: 0x000079d6c8648b28 0x0000000000000000
56 (8 bytes): PlatformThreads.currentThread = (Object) java.lang.Thread (0x000079d6c8601028)
64 (8 bytes): JavaFrameAnchors.lastAnchor = (Word) 0 (0x0000000000000000)
72 (8 bytes): AccessControlContextStack = (Object) java.util.ArrayDeque (0x000079d6c86021b0)
80 (8 bytes): ExceptionUnwind.currentException = (Object) null
88 (8 bytes): IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) java.util.SplittableRandom (0x000079d6c8640440)
96 (8 bytes): IsolatedCompileClient.currentClient = (Object) null
104 (8 bytes): IsolatedCompileContext.currentContext = (Object) null
112 (8 bytes): JNIObjectHandles.handles = (Object) com.oracle.svm.core.handles.ThreadLocalHandles (0x000079d6c86023d8)
120 (8 bytes): JNIThreadLocalPendingException.pendingException = (Object) null
128 (8 bytes): JNIThreadLocalPinnedObjects.pinnedObjectsListHead = (Object) null
136 (8 bytes): JNIThreadOwnedMonitors.ownedMonitors = (Object) null
144 (8 bytes): NoAllocationVerifier.openVerifiers = (Object) null
152 (8 bytes): ThreadingSupportImpl.activeTimer = (Object) null
160 (8 bytes): SubstrateDiagnostics.threadOnlyAttachedForCrashHandler = (bytes)
0x000079d6bc005620: 0x0000000000000000
168 (8 bytes): ThreadLocalAllocation.allocatedBytes = (Word) 0 (0x0000000000000000)
176 (8 bytes): VMThreads.IsolateTL = (Word) 133963416862720 (0x000079d6c9e00000)
184 (8 bytes): VMThreads.OSThreadHandleTL = (Word) 133963402184384 (0x000079d6c90006c0)
192 (8 bytes): VMThreads.OSThreadIdTL = (Word) 133963402184384 (0x000079d6c90006c0)
200 (8 bytes): VMThreads.StackBase = (Word) 133963402186752 (0x000079d6c9001000)
208 (8 bytes): VMThreads.StackEnd = (Word) 133963393802240 (0x000079d6c8802000)
216 (8 bytes): VMThreads.StartedByCurrentIsolate = (bytes)
0x000079d6bc005658: 0x0000000000000000
224 (8 bytes): VMThreads.nextTL = (Word) 133963318299520 (0x000079d6c4000b80)
232 (8 bytes): VMThreads.unalignedIsolateThreadMemoryTL = (Word) 133963184100736 (0x000079d6bc005580)
240 (4 bytes): ActionOnExitSafepointSupport.actionTL = (int) 0 (0x00000000)
244 (4 bytes): ActionOnTransitionToJavaSupport.actionTL = (int) 0 (0x00000000)
248 (4 bytes): ImplicitExceptions.implicitExceptionsAreFatal = (int) 0 (0x00000000)
252 (4 bytes): StackOverflowCheckImpl.yellowZoneStateTL = (int) 2130640638 (0x7efefefe)
256 (4 bytes): StatusSupport.safepointBehaviorTL = (int) 1 (0x00000001)
260 (4 bytes): ThreadingSupportImpl.currentPauseDepth = (int) 1 (0x00000001)
No VMOperation in progress
The 15 most recent VM operation status changes (oldest first):
Counters:
Java frame anchors for the failing thread 0x000079d6bc005580:
No anchors
Stacktrace for the failing thread 0x000079d6bc005580:
SP 0x000079d6c3dff940 IP 0x000079d6d4717600 [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shutdown(VMErrorSubstitutions.java:116)
SP 0x000079d6c3dff940 IP 0x000079d6d4717600 [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shouldNotReachHere(VMErrorSubstitutions.java:109)
SP 0x000079d6c3dff970 IP 0x000079d6d47625f4 [image code] com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:65)
SP 0x000079d6c3dff980 IP 0x000079d6d46fcd0c [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.onYellowZoneMadeAvailable(StackOverflowCheckImpl.java:197)
SP 0x000079d6c3dff9a0 IP 0x000079d6d46fd048 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.makeYellowZoneAvailable(StackOverflowCheckImpl.java:172)
SP 0x000079d6c3dff9a0 IP 0x000079d6d46fd048 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.throwNewStackOverflowError(StackOverflowCheckImpl.java:308)
SP 0x000079d6c3dffb20 IP 0x000079d6d5580d3a [image code] net.sf.saxon.option.cpp.XdmUtils.toString_XdmNode(XdmUtils.java:234)
SP 0x000079d6c3dffb50 IP 0x000079d6d46c39c0 [image code] com.oracle.svm.core.code.IsolateEnterStub.XdmUtils_toString_XdmNode_4d894eba33734a82eee9d0d3b4a9d61231476592(IsolateEnterStub.java:0)
VM mutexes:
mutex "mainVMOperationControlWorkQueue" is unlocked.
mutex "thread" is unlocked.
mutex "referencePendingList" is unlocked.
AOT compiled code is mapped at 0x000079d6d4671000 - 0x000079d6d5f9a88f
Heap settings and statistics:
Supports isolates: true
Heap base: 0x000079d6c9e00000
Object reference size: 8
Aligned chunk size: 1048576
Incremental collections: 0
Complete collections: 0
Native image heap boundaries:
ReadOnly Primitives: 0x000079d6c9f01028 - 0x000079d6ca306978
ReadOnly References: 0x000079d6ca306978 - 0x000079d6ca5f16a8
ReadOnly Relocatables: 0x000079d6ca5f2000 - 0x000079d6ca840cb0
Writable Primitives: 0x000079d6ca841000 - 0x000079d6cadb6498
Writable References: 0x000079d6cadb6498 - 0x000079d6cb2961a8
Writable Huge: 0x000079d6cb300030 - 0x000079d6cb373830
ReadOnly Huge: 0x000079d6cb374030 - 0x000079d6cba32b68
Heap:
Young generation:
Eden:
edenSpace:
aligned: 0/0 unaligned: 0/0
Survivors:
Survivor-1 From:
aligned: 0/0 unaligned: 0/0
Survivor-1 To:
aligned: 0/0 unaligned: 0/0
Survivor-2 From:
aligned: 0/0 unaligned: 0/0
Survivor-2 To:
aligned: 0/0 unaligned: 0/0
Survivor-3 From:
aligned: 0/0 unaligned: 0/0
Survivor-3 To:
aligned: 0/0 unaligned: 0/0
Survivor-4 From:
aligned: 0/0 unaligned: 0/0
Survivor-4 To:
aligned: 0/0 unaligned: 0/0
Survivor-5 From:
aligned: 0/0 unaligned: 0/0
Survivor-5 To:
aligned: 0/0 unaligned: 0/0
Survivor-6 From:
aligned: 0/0 unaligned: 0/0
Survivor-6 To:
aligned: 0/0 unaligned: 0/0
Survivor-7 From:
aligned: 0/0 unaligned: 0/0
Survivor-7 To:
aligned: 0/0 unaligned: 0/0
Survivor-8 From:
aligned: 0/0 unaligned: 0/0
Survivor-8 To:
aligned: 0/0 unaligned: 0/0
Survivor-9 From:
aligned: 0/0 unaligned: 0/0
Survivor-9 To:
aligned: 0/0 unaligned: 0/0
Survivor-10 From:
aligned: 0/0 unaligned: 0/0
Survivor-10 To:
aligned: 0/0 unaligned: 0/0
Survivor-11 From:
aligned: 0/0 unaligned: 0/0
Survivor-11 To:
aligned: 0/0 unaligned: 0/0
Survivor-12 From:
aligned: 0/0 unaligned: 0/0
Survivor-12 To:
aligned: 0/0 unaligned: 0/0
Survivor-13 From:
aligned: 0/0 unaligned: 0/0
Survivor-13 To:
aligned: 0/0 unaligned: 0/0
Survivor-14 From:
aligned: 0/0 unaligned: 0/0
Survivor-14 To:
aligned: 0/0 unaligned: 0/0
Survivor-15 From:
aligned: 0/0 unaligned: 0/0
Survivor-15 To:
aligned: 0/0 unaligned: 0/0
Old generation:
oldFromSpace:
aligned: 0/0 unaligned: 0/0
oldToSpace:
aligned: 0/0 unaligned: 0/0
Unused:
aligned: 0/0
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native code to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred.
Process finished with exit code 99
Updated by O'Neil Delpratt 6 days ago
- Assignee changed from Matt Patterson to O'Neil Delpratt
- % Done changed from 0 to 70
- Applies to branch trunk added
Thanks Martin for your input. I have now managed to reproduce the crash using PyCharm on my M3, Mac OS.
This is a threading issue and as mentioned in comment #1 the fix is we are missing the attachCurrentThread()
in SaxonProcessor and XdmItem destructors.
I am currently doing some more testing in this setup as there maybe problems in this area. For example there is a crash in DocumentBuilder
.
Please register to edit this issue