ankushg
08/19/2022, 7:33 AMCrashed: GC thread
0 QuizletSharedKotlin 0x919294 std::__1::invoke_result<kotlin::gc::ConcurrentMarkAndSweep::ConcurrentMarkAndSweep(kotlin::mm::ObjectFactory<kotlin::gc::ConcurrentMarkAndSweep>&, kotlin::gc::GCScheduler&)::$_2>::type kotlin::ScopedThread::Run<kotlin::gc::ConcurrentMarkAndSweep::ConcurrentMarkAndSweep(kotlin::mm::ObjectFactory<kotlin::gc::ConcurrentMarkAndSweep>&, kotlin::gc::GCScheduler&)::$_2>(kotlin::ScopedThread::attributes, kotlin::gc::ConcurrentMarkAndSweep::ConcurrentMarkAndSweep(kotlin::mm::ObjectFactory<kotlin::gc::ConcurrentMarkAndSweep>&, kotlin::gc::GCScheduler&)::$_2&&) + 1292
1 QuizletSharedKotlin 0x91a214 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(kotlin::ScopedThread::attributes, kotlin::gc::ConcurrentMarkAndSweep::ConcurrentMarkAndSweep(kotlin::mm::ObjectFactory<kotlin::gc::ConcurrentMarkAndSweep>&, kotlin::gc::GCScheduler&)::$_2&&), kotlin::ScopedThread::attributes, kotlin::gc::ConcurrentMarkAndSweep::ConcurrentMarkAndSweep(kotlin::mm::ObjectFactory<kotlin::gc::ConcurrentMarkAndSweep>&, kotlin::gc::GCScheduler&)::$_2> >(void*) + 112
2 libsystem_pthread.dylib 0x19ac _pthread_start + 148
3 libsystem_pthread.dylib 0xe68 thread_start + 8
It’s super hard for us to create a minimal reproduction of this, but in case it’s relevant, we’ve been able to repro this with:
• Kotlin 1.7.10 and 1.7.20-Beta
• SqlDelight 1.5.3 and 2.0.0-alpha03
• kotlinx.coroutines 1.6.4 (without the -native-mt
suffix)
• KMP-NativeCoroutines 0.12.6-new-mm
Any tips on how to narrow this down?Rick Clephas
08/19/2022, 7:45 AM0.12.6
or 0.12.6-new-mm
of KMP-NativeCoroutines?
Just to be safe you should use the -new-mm
if you aren’t using the -native-mt
coroutines.Alexey Belkov [JB]
08/19/2022, 8:39 AMsvyatoslav.scherbina
08/19/2022, 9:01 AMThe stracktrace looks something like:Is it from 1.7.20-Beta or 1.7.10? This might help us at least to understand which part of the code crashes.
When a user opens/closes a particular screen multiple times, on the ~12th try, we trigger the GC, and it crashes the app.What happens if you trigger the GC sooner?
ankushg
08/19/2022, 3:12 PMJeff Lockhart
08/19/2022, 3:21 PMHow can we manually trigger the kotlin GC to run?
kotlin.native.internal.GC.collect()
svyatoslav.scherbina
08/19/2022, 3:40 PMWhat additional info would be useful to track down the issue?A full crash report would be useful. Is it ios_arm32 or ios_arm64? Is there a chance you could share a crashed binary with us?
ankushg
08/19/2022, 5:36 PMsvyatoslav.scherbina
08/22/2022, 8:03 AMThe binary is the release version of our app in the App Store (Quizlet) 😅Does that mean that you can’t share an actual binary file with us? 🙂 We need it to figure out which code actually crashes.
Yekta
12/04/2022, 11:45 AMframe #0: 0x000000010db51f24 YektaSariogluSharedDetail`std::__1::invoke_result<kotlin::gc::ConcurrentMarkAndSweep::ConcurrentMarkAndSweep(kotlin::mm::ObjectFactory<kotlin::gc::ConcurrentMarkAndSweep>&, kotlin::gc::GCScheduler&)::$_2>::type kotlin::ScopedThread::Run<kotlin::gc::ConcurrentMarkAndSweep::ConcurrentMarkAndSweep(kotlin::mm::ObjectFactory<kotlin::gc::ConcurrentMarkAndSweep>&, kotlin::gc::GCScheduler&)::$_2>(kotlin::ScopedThread::attributes, kotlin::gc::ConcurrentMarkAndSweep::ConcurrentMarkAndSweep(kotlin::mm::ObjectFactory<kotlin::gc::ConcurrentMarkAndSweep>&, kotlin::gc::GCScheduler&)::$_2&&) + 2568
svyatoslav.scherbina
12/05/2022, 6:01 PMmarty-suzuki
01/31/2023, 9:57 AMKotlin 1.7.20
.
It caused only release build framework.
Thread 2
#0 (null) in std::__1::invoke_result<kotlin::gc::ConcurrentMarkAndSweep::ConcurrentMarkAndSweep(kotlin::mm::ObjectFactory<kotlin::gc::ConcurrentMarkAndSweep>&, kotlin::gc::GCScheduler&)::$_2>::type kotlin::Scop... ()
#1 (null) in std::__1::invoke_result<kotlin::gc::ConcurrentMarkAndSweep::ConcurrentMarkAndSweep(kotlin::mm::ObjectFactory<kotlin::gc::ConcurrentMarkAndSweep>&, kotlin::gc::GCScheduler&)::$_2>::type kotlin::Scop... ()
#2 (null) in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(kotlin::ScopedThread::attributes, kotl... ()
#3 (null) in _pthread_start ()
#4 (null) in thread_start ()
We fixed one of the problems.Has this issue fixed by
1.7.21
or greater?svyatoslav.scherbina
01/31/2023, 10:27 AMHas this issue fixed byThe known issue is fixed in 1.7.20.or greater?1.7.21