Closed sgammon closed 3 months ago
I tried to debug the issue a bit (here https://github.com/Kotlin/kotlinx.coroutines/issues/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: https://github.com/Kotlin/kotlinx.coroutines/issues/4146#issuecomment-2150061831.
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).
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.
Hi there, I haven't gotten a response from you in two weeks so I'm gonna go ahead and close this ticket.
@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
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)
Building with
-O2
produces an exception instead of a crash:The code in question:
This code is part of KotlinX Coroutines
1.9.0-RC
, and calls into KotlinX AtomicFU.Affected versions
Machine:
Mainline:
Edge:
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.
ClassCastException
): coroutines-crash-reproducer-972.zipTo run: