CLOVIS
04/21/2023, 8:35 PMkotlinx.coroutines.sync.Mutex
, instantiated with Mutex()
, which is always used using lock.withLock("name of the calling function") { … }
. I'm running the same test on JVM & JS. It runs fine on JVM, but on JS it fails with:
IllegalStateException: Mutex is locked by <UNLOCKED> but expected get(Id(id=376066526))
What does this mean? How can I debug the source of this?
How can the mutex be locked at any point if I'm only using withLock
, shouldn't that that care of things? What does locked by <UNLOCKED>
mean?Youssef Shoaib [MOD]
04/21/2023, 10:23 PMunlock
on it.
If it's possible, can you try the 1.7.0-RC
version and see if it produces an exception as well? The mutex implementation was completely rewritten for that one, so you might have some luck there.Youssef Shoaib [MOD]
04/21/2023, 10:24 PMCLOVIS
04/22/2023, 9:35 AMunlock
is called, if I never use the mutex any other way than withLock
?CLOVIS
04/22/2023, 9:38 AMIllegalStateException: This mutex is not locked
CLOVIS
04/22/2023, 9:39 AMCLOVIS
04/22/2023, 9:43 AMDmitry Khalanskiy [JB]
04/24/2023, 10:13 AMwithLock
, nothing of this sort should happen. Could you file this to https://github.com/Kotlin/kotlinx.coroutines/issues? It would also help a lot if you attached some code where the issue reproduces.CLOVIS
05/14/2023, 4:58 PM