Skip to content

Stabilize our CI build #3030

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

Merged
merged 4 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jekyll_version=4.0

# JS IR backend sometimes crashes with out-of-memory
# TODO: Remove once KT-37187 is fixed
org.gradle.jvmargs=-Xmx4g
org.gradle.jvmargs=-Xmx3g

kotlin.mpp.enableCompatibilityMetadataVariant=true
kotlin.mpp.stability.nowarn=true
2 changes: 1 addition & 1 deletion kotlinx-coroutines-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ task jvmLincheckTest(type: Test, dependsOn: compileTestKotlinJvm) {

static void configureJvmForLincheck(task) {
task.minHeapSize = '1g'
task.maxHeapSize = '6g' // we may need more space for building an interleaving tree in the model checking mode
task.maxHeapSize = '4g' // we may need more space for building an interleaving tree in the model checking mode
task.jvmArgs = ['--add-opens', 'java.base/jdk.internal.misc=ALL-UNNAMED', // required for transformation
'--add-exports', 'java.base/jdk.internal.util=ALL-UNNAMED'] // in the model checking mode
task.systemProperty 'kotlinx.coroutines.semaphore.segmentSize', '2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ internal class ConcurrentWeakMap<K : Any, V: Any>(
while (true) {
cleanWeakRef(weakRefQueue.remove() as HashedWeakRef<*>)
}
} catch(e: InterruptedException) {
} catch (e: InterruptedException) {
Thread.currentThread().interrupt()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ internal object DebugProbesImpl {
}

private fun stopWeakRefCleanerThread() {
weakRefCleanerThread?.interrupt()
val thread = weakRefCleanerThread ?: return
weakRefCleanerThread = null
thread.interrupt()
thread.join()
}

public fun hierarchyToString(job: Job): String = coroutineStateLock.write {
Expand Down Expand Up @@ -148,18 +150,19 @@ internal object DebugProbesImpl {
* Private method that dumps coroutines so that different public-facing method can use
* to produce different result types.
*/
private inline fun <R : Any> dumpCoroutinesInfoImpl(create: (CoroutineOwner<*>, CoroutineContext) -> R): List<R> =
private inline fun <R : Any> dumpCoroutinesInfoImpl(crossinline create: (CoroutineOwner<*>, CoroutineContext) -> R): List<R> =
coroutineStateLock.write {
check(isInstalled) { "Debug probes are not installed" }
capturedCoroutines
.asSequence()
// Stable ordering of coroutines by their sequence number
.sortedBy { it.info.sequenceNumber }
// Leave in the dump only the coroutines that were not collected while we were dumping them
.mapNotNull { owner ->
// Fuse map and filter into one operation to save an inline
if (owner.isFinished()) null
else owner.info.context?.let { context -> create(owner, context) }
}
}.toList()
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ class ChannelSendReceiveStressTest(
fun params(): Collection<Array<Any>> =
listOf(1, 2, 10).flatMap { nSenders ->
listOf(1, 10).flatMap { nReceivers ->
TestChannelKind.values().map { arrayOf(it, nSenders, nReceivers) }
TestChannelKind.values()
// Workaround for bug that won't be fixed unless new channel implementation, see #2443
.filter { it != TestChannelKind.LINKED_LIST }
.map { arrayOf(it, nSenders, nReceivers) }
}
}
}
Expand Down