diff --git a/src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedOptions.kt b/src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedOptions.kt index c1e7b524c5..bffe27d8c1 100644 --- a/src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedOptions.kt +++ b/src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedOptions.kt @@ -24,7 +24,7 @@ abstract class ManagedOptions, CTEST : CTestConfigurat protected var checkObstructionFreedom = DEFAULT_CHECK_OBSTRUCTION_FREEDOM protected var hangingDetectionThreshold = DEFAULT_HANGING_DETECTION_THRESHOLD protected val guarantees: MutableList = ArrayList(DEFAULT_GUARANTEES) - internal var stdLibAnalysisEnabled: Boolean = true + internal var stdLibAnalysisEnabled: Boolean = false /** * Use the specified number of scenario invocations to study interleavings in each iteration. diff --git a/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceCompressor.kt b/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceCompressor.kt index 85d0d90fa5..a01b84feb0 100644 --- a/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceCompressor.kt +++ b/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceCompressor.kt @@ -39,7 +39,6 @@ private fun SingleThreadedTable.compressSuspendImpl() = compressNodes if (it.tracePoint is CodeLocationTracePoint) { (it.tracePoint as CodeLocationTracePoint).codeLocation = singleChild.tracePoint.codeLocation } - it.decrementCallDepthOfTree() newNode.addChild(it) } newNode @@ -110,7 +109,6 @@ private fun combineNodes(parent: CallNode, child: CallNode): TraceNode { check(parent.tracePoint.thrownException == child.tracePoint.thrownException) val newNode = parent.copy() - child.decrementCallDepthOfTree() child.children.forEach { newNode.addChild(it) } return newNode } @@ -128,7 +126,6 @@ private fun SingleThreadedTable.compressSyntheticFieldAccess() = comp if (point is ReadTracePoint) point.codeLocation = node.tracePoint.codeLocation if (point is WriteTracePoint) point.codeLocation = node.tracePoint.codeLocation - singleChild.decrementCallDepthOfTree() singleChild } @@ -162,10 +159,7 @@ private fun SingleThreadedTable.compressUserThreadRun() = compressNod if (!isUserThreadStart(node.tracePoint, child.tracePoint)) return@compressNodes node val newNode = node.copy() - node.children.getOrNull(0)?.children?.forEach { - it.decrementCallDepthOfTree() - newNode.addChild(it) - } + node.children.getOrNull(0)?.children?.forEach { newNode.addChild(it) } newNode } @@ -189,27 +183,35 @@ private fun SingleThreadedTable.compressThreadStart() = compressNodes newNode } -internal fun SingleThreadedTable.collapseLibraries(analysisProfile: AnalysisProfile) = compressNodes { node -> +/** + * Collapses library code that should be hidden according to [analysisProfile]. + * A [verbose] collapsed graph keeps the paths of hidden calls up to non hidden code visible. + */ +internal fun SingleThreadedTable.collapseLibraries(analysisProfile: AnalysisProfile, verbose: Boolean) = compressNodes { node -> // if should not be hidden if (node !is CallNode || !analysisProfile.shouldBeHidden(node)) return@compressNodes node // if cannot be hidden (due to switch point) - if (node.containsDescendant { it is EventNode && it.tracePoint is SwitchEventTracePoint }) + if (verbose && node.containsDescendant(::isNonHideableNode)) return@compressNodes node val newNode = node.copy() - findSubTreesToBeShown(node, analysisProfile).forEach { newNode.addChild(it) } + findSubTreesAndEventsToBeShown(node, analysisProfile).forEach { newNode.addChild(it) } return@compressNodes newNode } +private fun isNonHideableNode(traceNode: TraceNode) = + traceNode is EventNode && (traceNode.tracePoint is SwitchEventTracePoint || traceNode.tracePoint is ParkTracePoint) + /** * Finds descendants that should not be hidden. * But not descendants of descendants, aka the roots of all subtrees that should be shown in the trace. */ -private fun findSubTreesToBeShown(node: TraceNode, analysisProfile: AnalysisProfile): List { +private fun findSubTreesAndEventsToBeShown(node: TraceNode, analysisProfile: AnalysisProfile): List { + if (node is EventNode && node.tracePoint is SwitchEventTracePoint || node.tracePoint is ParkTracePoint) return listOf(node) if (node !is CallNode) return emptyList() if (!analysisProfile.shouldBeHidden(node)) return listOf(node) - return node.children.map { findSubTreesToBeShown(it, analysisProfile) }.flatten() + return node.children.map { findSubTreesAndEventsToBeShown(it, analysisProfile) }.flatten() } private fun SingleThreadedTable.compressNodes(compressionRule: (TraceNode) -> TraceNode) = map { diff --git a/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceFlattenPolicies.kt b/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceFlattenPolicies.kt index d91bf8bce8..e13bd23841 100644 --- a/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceFlattenPolicies.kt +++ b/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceFlattenPolicies.kt @@ -65,7 +65,7 @@ internal class VerboseTraceFlattenPolicy : TraceFlattenPolicy { // Check if result node should be added if (descendants.size > 1 && returnedValue is ReturnedValueResult.ActorResult && returnedValue.showAtEndOfActor) { - return descendants + ResultNode(currentNode.callDepth + 1, returnedValue, descendants.last().eventNumber, currentNode.tracePoint) + return descendants + ResultNode(currentNode.callDepth + 1, returnedValue, currentNode.lastEventNumberOfDescendants, currentNode.tracePoint) } return descendants @@ -114,7 +114,7 @@ internal class ShortTraceFlattenPolicy : TraceFlattenPolicy { // Check if result node should be added val nodesToReturn = if (descendants.size > 1 && returnedValue is ReturnedValueResult.ActorResult && returnedValue.showAtEndOfActor) { - descendants + ResultNode(currentNode.callDepth + 1, returnedValue, descendants.last().eventNumber, currentNode.tracePoint) + descendants + ResultNode(currentNode.callDepth + 1, returnedValue, currentNode.lastEventNumberOfDescendants, currentNode.tracePoint) // Or thread start root nodes } else if (descendants.size == 1 && descendants.contains(currentNode) && currentNode.tracePoint.isThreadStart) { descendants + currentNode.children @@ -158,7 +158,10 @@ internal fun TraceNode.flattenNodes(policy: TraceFlattenPolicy): List } internal fun SingleThreadedTable.flattenNodes(flattenPolicy: TraceFlattenPolicy): SingleThreadedTable = - map { section -> section.flatMap { traceNode -> traceNode.flattenNodes(flattenPolicy) } } + map { section -> + section.forEach { it.setCallDepthOfTree(0) } + section.flatMap { traceNode -> traceNode.flattenNodes(flattenPolicy) } + } //for idea plugin internal fun SingleThreadedTable.extractPreExpandedNodes(flattenPolicy: TraceFlattenPolicy): List = diff --git a/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceNodes.kt b/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceNodes.kt index f74eabfd41..8dd7dbaf51 100644 --- a/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceNodes.kt +++ b/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceNodes.kt @@ -11,6 +11,7 @@ package org.jetbrains.kotlinx.lincheck.trace import kotlin.collections.plus +import kotlin.math.max /** * Represents a single node in the hierarchical trace structure. @@ -34,6 +35,9 @@ internal abstract class TraceNode(var callDepth: Int, val eventNumber: Int, open var parent: TraceNode? = null private set + var lastEventNumberOfDescendants = eventNumber + private set + // Am i last event. Check at parents and all ancestors val isLast: Boolean get() { if (parent == null) return true @@ -43,14 +47,15 @@ internal abstract class TraceNode(var callDepth: Int, val eventNumber: Int, open fun addChild(node: TraceNode) { _children.add(node) node.parent = this + setLastEventNumber(node.lastEventNumberOfDescendants) } abstract override fun toString(): String - // Shifts stackTrace to the left - fun decrementCallDepthOfTree() { - callDepth-- - children.forEach { it.decrementCallDepthOfTree() } + // Sets call depth of this (sub)tree + fun setCallDepthOfTree(depth: Int) { + callDepth = depth + children.forEach { it.setCallDepthOfTree(depth + 1) } } fun lastOrNull(predicate: (TraceNode) -> Boolean): TraceNode? { @@ -83,6 +88,12 @@ internal abstract class TraceNode(var callDepth: Int, val eventNumber: Int, open * Shallow copy without children */ abstract fun copy(): TraceNode + + // sets the last event number of descendants, is called whenever a child is added + protected fun setLastEventNumber(lastEventNumber: Int) { + lastEventNumberOfDescendants = max(lastEventNumber, lastEventNumberOfDescendants) + parent?.setLastEventNumber(lastEventNumberOfDescendants) + } } internal class EventNode( @@ -92,6 +103,7 @@ internal class EventNode( ): TraceNode(callDepth, eventNumber, tracePoint) { override fun toString(): String = tracePoint.toString() override fun copy(): TraceNode = EventNode(callDepth, tracePoint, eventNumber) + .also { it.setLastEventNumber(lastEventNumberOfDescendants) } } internal class CallNode( @@ -104,6 +116,7 @@ internal class CallNode( override fun toString(): String = tracePoint.toString() override fun copy(): TraceNode = CallNode(callDepth, tracePoint, eventNumber) + .also { it.setLastEventNumber(lastEventNumberOfDescendants) } internal fun createResultNodeForEmptyActor() = ResultNode(callDepth + 1, tracePoint.returnedValue as ReturnedValueResult.ActorResult, eventNumber, tracePoint) @@ -114,6 +127,7 @@ internal class ResultNode(callDepth: Int, val actorResult: ReturnedValueResult.A : TraceNode(callDepth, eventNumber, tracePoint) { override fun toString(): String = "result: ${actorResult.resultRepresentation}" override fun copy(): TraceNode = ResultNode(callDepth, actorResult, eventNumber, tracePoint) + .also { it.setLastEventNumber(lastEventNumberOfDescendants) } } // (stable) Sort on eventNumber diff --git a/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceReporter.kt b/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceReporter.kt index a7b7a99d48..106f6b864c 100644 --- a/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceReporter.kt +++ b/src/jvm/main/org/jetbrains/kotlinx/lincheck/trace/TraceReporter.kt @@ -14,7 +14,6 @@ import org.jetbrains.kotlinx.lincheck.execution.* import org.jetbrains.kotlinx.lincheck.runner.ExecutionPart import org.jetbrains.kotlinx.lincheck.strategy.* import org.jetbrains.kotlinx.lincheck.strategy.ValidationFailure -import org.jetbrains.kotlinx.lincheck.strategy.managed.modelchecking.ModelCheckingCTestConfiguration import kotlin.math.max internal typealias SingleThreadedTable = List> @@ -62,15 +61,22 @@ internal class TraceReporter( // Optimizes trace by combining trace points for synthetic field accesses etc.. val compressedTraceGraph = traceGraph .compressTrace() - .collapseLibraries(failure.analysisProfile) graph = if (isGeneralPurposeModelCheckingScenario(failure.scenario)) removeGPMCLambda(compressedTraceGraph) else compressedTraceGraph } fun appendTrace(stringBuilder: StringBuilder) = with(stringBuilder) { // Turn graph into chronological sequence of calls and events, for verbose and simple trace. - val flattenedShort: SingleThreadedTable = graph.flattenNodes(ShortTraceFlattenPolicy()).reorder() - val flattenedVerbose: SingleThreadedTable = graph.flattenNodes(VerboseTraceFlattenPolicy()).reorder() + val flattenedShort: SingleThreadedTable = graph + .collapseLibraries(failure.analysisProfile, verbose = false) + .flattenNodes(ShortTraceFlattenPolicy()) + .reorder() + + val flattenedVerbose: SingleThreadedTable = graph + .collapseLibraries(failure.analysisProfile, verbose = true) + .flattenNodes(VerboseTraceFlattenPolicy()) + .reorder() + appendTraceTable(TRACE_TITLE, flattenedShort) appendLine() @@ -133,7 +139,6 @@ private fun removeGPMCLambda(graph: SingleThreadedTable): SingleThrea val first = section.first() if (first !is CallNode) return@map section if (first.children.isEmpty()) return@map listOf(first.createResultNodeForEmptyActor()) - first.decrementCallDepthOfTree() if (first.children.firstOrNull() is CallNode) (first.children.first() as CallNode).tracePoint.returnedValue = first.tracePoint.returnedValue first.children + section.drop(1) } diff --git a/src/jvm/main/org/jetbrains/kotlinx/lincheck/util/AnalysisSections.kt b/src/jvm/main/org/jetbrains/kotlinx/lincheck/util/AnalysisSections.kt index b78f4be6b9..193017e01b 100644 --- a/src/jvm/main/org/jetbrains/kotlinx/lincheck/util/AnalysisSections.kt +++ b/src/jvm/main/org/jetbrains/kotlinx/lincheck/util/AnalysisSections.kt @@ -295,8 +295,13 @@ internal class AnalysisProfile(val analyzeStdLib: Boolean) { isJavaExecutorService(className) && methodName == "submit" -> AnalysisSectionType.SILENT_PROPAGATING isJavaExecutorService(className) -> AnalysisSectionType.SILENT className.startsWith("java.util.concurrent.locks.AbstractQueuedSynchronizer") -> AnalysisSectionType.SILENT + + // This DS is non linearizable + className.startsWith("java.util.concurrent.ConcurrentLinkedDeque") -> AnalysisSectionType.NORMAL + className.startsWith("java.util.concurrent.atomic") -> AnalysisSectionType.NORMAL + className.startsWith("java.util.concurrent.locks") -> AnalysisSectionType.NORMAL + !analyzeStdLib && className.startsWith("java.util.concurrent.") -> AnalysisSectionType.SILENT className == "java.util.concurrent.FutureTask" -> AnalysisSectionType.SILENT - isConcurrentCollectionsLibrary(className) && !analyzeStdLib -> AnalysisSectionType.SILENT else -> AnalysisSectionType.NORMAL } @@ -311,7 +316,7 @@ internal class AnalysisProfile(val analyzeStdLib: Boolean) { */ @Suppress("UNUSED_PARAMETER") // methodName is here for uniformity and might become useful in the future fun shouldBeHidden(className: String, methodName: String): Boolean = - !analyzeStdLib && (isConcurrentCollectionsLibrary(className) || isCollectionsLibrary(className)) + !analyzeStdLib && (isCollectionsLibrary(className) || className.startsWith("java.util.concurrent.")) } internal fun isCollectionsLibrary(className: String) = className in setOf( @@ -355,39 +360,6 @@ internal fun isCollectionsLibrary(className: String) = className in setOf( "java.util.TreeMap", ) -internal fun isConcurrentCollectionsLibrary(className: String) = className in setOf( - // Interfaces - "java.util.concurrent.BlockingDeque", - "java.util.concurrent.BlockingQueue", - "java.util.concurrent.TransferQueue", - "java.util.concurrent.ConcurrentMap", - "java.util.concurrent.ConcurrentNavigableMap", - - // Concrete implementations - // Concurrent collections - "java.util.concurrent.ConcurrentHashMap", - "java.util.concurrent.ConcurrentLinkedDeque", - "java.util.concurrent.ConcurrentLinkedQueue", - "java.util.concurrent.ConcurrentSkipListMap", - "java.util.concurrent.ConcurrentSkipListSet", - - // Blocking queues - "java.util.concurrent.ArrayBlockingQueue", - "java.util.concurrent.LinkedBlockingDeque", - "java.util.concurrent.LinkedBlockingQueue", - "java.util.concurrent.DelayQueue", - "java.util.concurrent.PriorityBlockingQueue", - "java.util.concurrent.SynchronousQueue", - "java.util.concurrent.LinkedTransferQueue", - - // Copy-on-write collections - "java.util.concurrent.CopyOnWriteArrayList", - "java.util.concurrent.CopyOnWriteArraySet", - - // Inner class view - "java.util.concurrent.ConcurrentHashMap\$KeySetView" -) - private fun isJavaExecutorService(className: String) = className.startsWith("java.util.concurrent.AbstractExecutorService") || className.startsWith("java.util.concurrent.ThreadPoolExecutor") || diff --git a/src/jvm/test-trace-debugger-integration/resources/integrationTestData/TraceDebuggerExamples/org.examples.integration.bugs.LinkedHashSetTest_putAnObjectWithoutDefinedHashCode.txt b/src/jvm/test-trace-debugger-integration/resources/integrationTestData/TraceDebuggerExamples/org.examples.integration.bugs.LinkedHashSetTest_putAnObjectWithoutDefinedHashCode.txt index bc181bf96f..f7ce8314d7 100644 --- a/src/jvm/test-trace-debugger-integration/resources/integrationTestData/TraceDebuggerExamples/org.examples.integration.bugs.LinkedHashSetTest_putAnObjectWithoutDefinedHashCode.txt +++ b/src/jvm/test-trace-debugger-integration/resources/integrationTestData/TraceDebuggerExamples/org.examples.integration.bugs.LinkedHashSetTest_putAnObjectWithoutDefinedHashCode.txt @@ -22,67 +22,7 @@ Detailed trace: | ArraysKt.toCollection(Array#1, LinkedHashSet#1): LinkedHashSet#1 at SetsKt__SetsKt.linkedSetOf(Sets.kt:101) | | Array#1[0] ➜ A#1 at ArraysKt___ArraysKt.toCollection(_Arrays.kt:9615) | | destination.add(A#1): true at ArraysKt___ArraysKt.toCollection(_Arrays.kt:9616) | -| map ➜ LinkedHashMap#1 at HashSet.add(HashSet.java:221) | -| map.put(A#1, Object#1): null at HashSet.add(HashSet.java:221) | -| putVal(1, A#1, Object#1, false, true): null at HashMap.put(HashMap.java:610) | -| table ➜ null at HashMap.putVal(HashMap.java:626) | -| resize(): Array#1 at HashMap.putVal(HashMap.java:627) | -| table ➜ null at HashMap.resize(HashMap.java:676) | -| threshold ➜ 2 at HashMap.resize(HashMap.java:678) | -| threshold = 1 at HashMap.resize(HashMap.java:700) | -| table = Array#1 at HashMap.resize(HashMap.java:703) | -| Array#1[1] ➜ null at HashMap.putVal(HashMap.java:628) | -| newNode(1, A#1, Object#1, null): Entry#1 at HashMap.putVal(HashMap.java:629) | -| linkNodeLast(Entry#1) at LinkedHashMap.newNode(LinkedHashMap.java:259) | -| tail ➜ null at LinkedHashMap.linkNodeLast(LinkedHashMap.java:224) | -| tail = Entry#1 at LinkedHashMap.linkNodeLast(LinkedHashMap.java:225) | -| head = Entry#1 at LinkedHashMap.linkNodeLast(LinkedHashMap.java:227) | -| Array#1[1] = Entry#1 at HashMap.putVal(HashMap.java:629) | -| modCount ➜ 0 at HashMap.putVal(HashMap.java:659) | -| modCount = 1 at HashMap.putVal(HashMap.java:659) | -| size ➜ 0 at HashMap.putVal(HashMap.java:660) | -| size = 1 at HashMap.putVal(HashMap.java:660) | -| threshold ➜ 1 at HashMap.putVal(HashMap.java:660) | -| afterNodeInsertion(true) at HashMap.putVal(HashMap.java:662) | -| head ➜ Entry#1 at LinkedHashMap.afterNodeInsertion(LinkedHashMap.java:300) | | linkedHashSet.add(A#2): true at LinkedHashSetTest.putAnObjectWithoutDefinedHashCode(LinkedHashSetTest.kt:11) | -| map ➜ LinkedHashMap#1 at HashSet.add(HashSet.java:221) | -| map.put(A#2, Object#1): null at HashSet.add(HashSet.java:221) | -| putVal(1, A#2, Object#1, false, true): null at HashMap.put(HashMap.java:610) | -| table ➜ Array#1 at HashMap.putVal(HashMap.java:626) | -| Array#1[1] ➜ Entry#1 at HashMap.putVal(HashMap.java:628) | -| p.next ➜ null at HashMap.putVal(HashMap.java:639) | -| newNode(1, A#2, Object#1, null): Entry#2 at HashMap.putVal(HashMap.java:640) | -| linkNodeLast(Entry#2) at LinkedHashMap.newNode(LinkedHashMap.java:259) | -| tail ➜ Entry#1 at LinkedHashMap.linkNodeLast(LinkedHashMap.java:224) | -| tail = Entry#2 at LinkedHashMap.linkNodeLast(LinkedHashMap.java:225) | -| p.before = Entry#1 at LinkedHashMap.linkNodeLast(LinkedHashMap.java:229) | -| last.after = Entry#2 at LinkedHashMap.linkNodeLast(LinkedHashMap.java:230) | -| p.next = Entry#2 at HashMap.putVal(HashMap.java:640) | -| modCount ➜ 1 at HashMap.putVal(HashMap.java:659) | -| modCount = 2 at HashMap.putVal(HashMap.java:659) | -| size ➜ 1 at HashMap.putVal(HashMap.java:660) | -| size = 2 at HashMap.putVal(HashMap.java:660) | -| threshold ➜ 1 at HashMap.putVal(HashMap.java:660) | -| resize(): Array#2 at HashMap.putVal(HashMap.java:661) | -| table ➜ Array#1 at HashMap.resize(HashMap.java:676) | -| threshold ➜ 1 at HashMap.resize(HashMap.java:678) | -| threshold = 3 at HashMap.resize(HashMap.java:700) | -| table = Array#2 at HashMap.resize(HashMap.java:703) | -| Array#1[0] ➜ null at HashMap.resize(HashMap.java:707) | -| Array#1[1] ➜ Entry#1 at HashMap.resize(HashMap.java:707) | -| Array#1[1] = null at HashMap.resize(HashMap.java:708) | -| e.next ➜ Entry#2 at HashMap.resize(HashMap.java:709) | -| e.next ➜ Entry#2 at HashMap.resize(HashMap.java:718) | -| e.next ➜ null at HashMap.resize(HashMap.java:718) | -| loTail.next = Entry#2 at HashMap.resize(HashMap.java:723) | -| loTail.next = null at HashMap.resize(HashMap.java:735) | -| Array#2[1] = Entry#1 at HashMap.resize(HashMap.java:736) | -| afterNodeInsertion(true) at HashMap.putVal(HashMap.java:662) | -| head ➜ Entry#1 at LinkedHashMap.afterNodeInsertion(LinkedHashMap.java:300) | | linkedHashSet.size(): 2 at LinkedHashSetTest.putAnObjectWithoutDefinedHashCode(LinkedHashSetTest.kt:12) | -| map ➜ LinkedHashMap#1 at HashSet.size(HashSet.java:183) | -| map.size(): 2 at HashSet.size(HashSet.java:183) | -| size ➜ 2 at HashMap.size(HashMap.java:525) | | result: void | | --------------------------------------------------------------------------------------------------------------------------------- | diff --git a/src/jvm/test/org/jetbrains/kotlinx/lincheck_test/representation/ReentrantLockRepresentationTests.kt b/src/jvm/test/org/jetbrains/kotlinx/lincheck_test/representation/ReentrantLockRepresentationTests.kt new file mode 100644 index 0000000000..05a39f23d8 --- /dev/null +++ b/src/jvm/test/org/jetbrains/kotlinx/lincheck_test/representation/ReentrantLockRepresentationTests.kt @@ -0,0 +1,53 @@ +/* + * Lincheck + * + * Copyright (C) 2019 - 2025 JetBrains s.r.o. + * + * This Source Code Form is subject to the terms of the + * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed + * with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +package org.jetbrains.kotlinx.lincheck_test.representation + +import java.util.concurrent.Semaphore +import java.util.concurrent.locks.ReentrantLock +import kotlin.concurrent.thread + +class ReentrantLockSingleLockRepresentationTest: BaseRunConcurrentRepresentationTest("reentrant_lock_single_lock") { + private var a = 0 + private val lock = ReentrantLock() + + override fun block() { + lock.lock() + a++ + lock.unlock() + check(false) + } + + override val analyzeStdLib: Boolean = false +} + +class SemaphoreSwitchRepresentationTest: BaseRunConcurrentRepresentationTest("semaphore_switch") { + + override fun block() { + val semA = Semaphore(0) + val semB = Semaphore(0) + + val t1 = thread { + semB.release() + semA.acquire() + } + + val t2 = thread { + semB.acquire() + semA.release() + } + + t1.join() + t2.join() + check(false) + } + + override val analyzeStdLib: Boolean = false +} diff --git a/src/jvm/test/org/jetbrains/kotlinx/lincheck_test/representation/RunConcurrentRepresentationTests.kt b/src/jvm/test/org/jetbrains/kotlinx/lincheck_test/representation/RunConcurrentRepresentationTests.kt index 618fc9ba14..e016abd695 100644 --- a/src/jvm/test/org/jetbrains/kotlinx/lincheck_test/representation/RunConcurrentRepresentationTests.kt +++ b/src/jvm/test/org/jetbrains/kotlinx/lincheck_test/representation/RunConcurrentRepresentationTests.kt @@ -65,7 +65,7 @@ abstract class BaseRunConcurrentRepresentationTest(private val outputFileName } } - open val analyzeStdLib = true + open val analyzeStdLib = false } class NoEventsRunConcurrentRepresentationTest : BaseRunConcurrentRepresentationTest( diff --git a/src/jvm/test/resources/expected_logs/reentrant_lock_single_lock.txt b/src/jvm/test/resources/expected_logs/reentrant_lock_single_lock.txt new file mode 100644 index 0000000000..05aaa49a4c --- /dev/null +++ b/src/jvm/test/resources/expected_logs/reentrant_lock_single_lock.txt @@ -0,0 +1,27 @@ += Concurrent test failed = + +java.lang.IllegalStateException: Check failed. + at org.jetbrains.kotlinx.lincheck_test.representation.ReentrantLockSingleLockRepresentationTest.block(ReentrantLockRepresentationTests.kt:25) + at org.jetbrains.kotlinx.lincheck_test.representation.ReentrantLockSingleLockRepresentationTest.block(ReentrantLockRepresentationTests.kt:17) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) + at java.base/java.lang.Thread.run(Unknown Source) + +The following interleaving leads to the error: +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + +Detailed trace: +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| block(): threw IllegalStateException at ReentrantLockSingleLockRepresentationTest.block(ReentrantLockRepresentationTests.kt:17) | +| lock.lock() at ReentrantLockSingleLockRepresentationTest.block(ReentrantLockRepresentationTests.kt:22) | +| a ➜ 1 at ReentrantLockSingleLockRepresentationTest.block(ReentrantLockRepresentationTests.kt:23) | +| a = 2 at ReentrantLockSingleLockRepresentationTest.block(ReentrantLockRepresentationTests.kt:23) | +| lock.unlock() at ReentrantLockSingleLockRepresentationTest.block(ReentrantLockRepresentationTests.kt:24) | +| result: IllegalStateException #1 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/custom_threads_trace_debugger.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/custom_threads_trace_debugger.txt index 598b6c9f3f..99b3f9511a 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/custom_threads_trace_debugger.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/custom_threads_trace_debugger.txt @@ -1,74 +1,73 @@ = Concurrent test failed = java.lang.IllegalStateException: Check failed. - at org.jetbrains.kotlinx.lincheck_test.representation.CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) - at org.jetbrains.kotlinx.lincheck_test.representation.CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:264) - at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) + at org.jetbrains.kotlinx.lincheck_test.representation.CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:282) + at org.jetbrains.kotlinx.lincheck_test.representation.CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:265) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) at java.base/java.lang.Thread.run(Unknown Source) The following interleaving leads to the error: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | Thread 3 | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | | -| block(): threw IllegalStateException at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:264) | | | | -| $i$f$forEach.add(Thread#1): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| $i$f$forEach.add(Thread#2): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| $i$f$forEach.add(Thread#3): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | | +| block(): threw IllegalStateException at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:265) | | | | +| $i$f$forEach.add(Thread#1): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $i$f$forEach.add(Thread#2): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $i$f$forEach.add(Thread#3): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | | threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| iterator(): Itr#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Itr#2.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Itr#2.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | | | -| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | -| | wrapper.value ➜ 0 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | -| | wrapper.value = 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | -| | value.getAndIncrement(): 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | +| | wrapper.value ➜ 0 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | +| | wrapper.value = 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | -| | wrapper.value.getAndAddInt(1): 2 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | -| | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | -| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | wrapper.value ➜ 3 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | wrapper.value = 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | value.getAndIncrement(): 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | +| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | wrapper.value.getAndAddInt(1): 2 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | +| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | wrapper.value ➜ 3 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | wrapper.value = 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | | | | | run() | -| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | -| | | | wrapper.value ➜ 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | -| | | | wrapper.value = 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | -| | | | value.getAndIncrement(): 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | +| | | | wrapper.value ➜ 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | +| | | | wrapper.value = 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | -| | | | wrapper.value.getAndAddInt(1): 6 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | -| | | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | -| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | wrapper.value ➜ 7 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | wrapper.value = 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | -| Thread#1.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Itr#2.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| | | | value.getAndIncrement(): 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | +| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | +| | | | wrapper.value.getAndAddInt(1): 6 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | +| | | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | +| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | wrapper.value ➜ 7 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | wrapper.value = 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | +| Thread#1.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Itr#2.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | switch (reason: waiting for Thread 2 to finish) | | | | | | | run() | | -| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | -| | | wrapper.value ➜ 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | -| | | wrapper.value = 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | -| | | value.getAndIncrement(): 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | +| | | wrapper.value ➜ 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | +| | | wrapper.value = 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | -| | | wrapper.value.getAndAddInt(1): 10 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | -| | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | -| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | wrapper.value ➜ 11 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | wrapper.value = 12 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | -| Thread#2.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Itr#2.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Thread#3.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| | | value.getAndIncrement(): 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | +| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | +| | | wrapper.value.getAndAddInt(1): 10 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | +| | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | +| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | wrapper.value ➜ 11 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | wrapper.value = 12 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | +| Thread#2.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Itr#2.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Thread#3.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | result: IllegalStateException #1 | | | | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -76,39 +75,16 @@ Detailed trace: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | Thread 3 | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | | -| block(): threw IllegalStateException at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:264) | | | | -| $i$f$forEach.add(Thread#1): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| modCount ➜ 0 at ArrayList.add(ArrayList.java:466) | | | | -| modCount = 1 at ArrayList.add(ArrayList.java:466) | | | | -| elementData ➜ Array#1 at ArrayList.add(ArrayList.java:467) | | | | -| size ➜ 0 at ArrayList.add(ArrayList.java:467) | | | | -| add(Thread#1, Array#1, 0) at ArrayList.add(ArrayList.java:467) | | | | -| Array#1[0] = Thread#1 at ArrayList.add(ArrayList.java:455) | | | | -| size = 1 at ArrayList.add(ArrayList.java:456) | | | | -| $i$f$forEach.add(Thread#2): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| modCount ➜ 1 at ArrayList.add(ArrayList.java:466) | | | | -| modCount = 2 at ArrayList.add(ArrayList.java:466) | | | | -| elementData ➜ Array#1 at ArrayList.add(ArrayList.java:467) | | | | -| size ➜ 1 at ArrayList.add(ArrayList.java:467) | | | | -| add(Thread#2, Array#1, 1) at ArrayList.add(ArrayList.java:467) | | | | -| Array#1[1] = Thread#2 at ArrayList.add(ArrayList.java:455) | | | | -| size = 2 at ArrayList.add(ArrayList.java:456) | | | | -| $i$f$forEach.add(Thread#3): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| modCount ➜ 2 at ArrayList.add(ArrayList.java:466) | | | | -| modCount = 3 at ArrayList.add(ArrayList.java:466) | | | | -| elementData ➜ Array#1 at ArrayList.add(ArrayList.java:467) | | | | -| size ➜ 2 at ArrayList.add(ArrayList.java:467) | | | | -| add(Thread#3, Array#1, 2) at ArrayList.add(ArrayList.java:467) | | | | -| Array#1[2] = Thread#3 at ArrayList.add(ArrayList.java:455) | | | | -| size = 3 at ArrayList.add(ArrayList.java:456) | | | | -| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | -| iterator(): Itr#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | -| modCount ➜ 3 at ArrayList$Itr.(ArrayList.java:956) | | | | -| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | | +| block(): threw IllegalStateException at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:265) | | | | +| $i$f$forEach.add(Thread#1): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $i$f$forEach.add(Thread#2): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $i$f$forEach.add(Thread#3): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | +| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | cursor ➜ 0 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | -| Itr#1.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Itr#1.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:967) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1012) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1012) | | | | @@ -118,11 +94,11 @@ Detailed trace: | cursor = 1 at ArrayList$Itr.next(ArrayList.java:974) | | | | | lastRet = 0 at ArrayList$Itr.next(ArrayList.java:975) | | | | | Array#1[0] ➜ Thread#1 at ArrayList$Itr.next(ArrayList.java:975) | | | | -| Thread#1.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | -| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Thread#1.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | +| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | cursor ➜ 1 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | -| Itr#1.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Itr#1.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:967) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1012) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1012) | | | | @@ -132,11 +108,11 @@ Detailed trace: | cursor = 2 at ArrayList$Itr.next(ArrayList.java:974) | | | | | lastRet = 1 at ArrayList$Itr.next(ArrayList.java:975) | | | | | Array#1[1] ➜ Thread#2 at ArrayList$Itr.next(ArrayList.java:975) | | | | -| Thread#2.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | -| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Thread#2.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | +| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | cursor ➜ 2 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | -| Itr#1.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Itr#1.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:967) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1012) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1012) | | | | @@ -146,17 +122,16 @@ Detailed trace: | cursor = 3 at ArrayList$Itr.next(ArrayList.java:974) | | | | | lastRet = 2 at ArrayList$Itr.next(ArrayList.java:975) | | | | | Array#1[2] ➜ Thread#3 at ArrayList$Itr.next(ArrayList.java:975) | | | | -| Thread#3.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | -| Itr#1.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Thread#3.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | +| Itr#1.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | cursor ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | -| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| iterator(): Itr#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| modCount ➜ 3 at ArrayList$Itr.(ArrayList.java:956) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| iterator(): Itr#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | cursor ➜ 0 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | -| Itr#2.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| Itr#2.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:967) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1012) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1012) | | | | @@ -168,36 +143,36 @@ Detailed trace: | Array#1[0] ➜ Thread#1 at ArrayList$Itr.next(ArrayList.java:975) | | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | | | -| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | -| | wrapper.value ➜ 0 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | -| | wrapper.value = 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | -| | value.getAndIncrement(): 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | +| | wrapper.value ➜ 0 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | +| | wrapper.value = 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | -| | wrapper.value.getAndAddInt(1): 2 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | -| | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | -| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | wrapper.value ➜ 3 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | wrapper.value = 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | value.getAndIncrement(): 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | +| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | wrapper.value.getAndAddInt(1): 2 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | +| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | wrapper.value ➜ 3 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | wrapper.value = 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | | | | | run() | -| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | -| | | | wrapper.value ➜ 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | -| | | | wrapper.value = 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | -| | | | value.getAndIncrement(): 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | +| | | | wrapper.value ➜ 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | +| | | | wrapper.value = 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | -| | | | wrapper.value.getAndAddInt(1): 6 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | -| | | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | -| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | wrapper.value ➜ 7 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | wrapper.value = 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | -| Thread#1.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| | | | value.getAndIncrement(): 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | +| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | +| | | | wrapper.value.getAndAddInt(1): 6 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | +| | | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | +| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | wrapper.value ➜ 7 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | wrapper.value = 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | +| Thread#1.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | cursor ➜ 1 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | -| Itr#2.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| Itr#2.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:967) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1012) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1012) | | | | @@ -209,23 +184,23 @@ Detailed trace: | Array#1[1] ➜ Thread#2 at ArrayList$Itr.next(ArrayList.java:975) | | | | | switch (reason: waiting for Thread 2 to finish) | | | | | | | run() | | -| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | -| | | wrapper.value ➜ 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | -| | | wrapper.value = 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | -| | | value.getAndIncrement(): 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | +| | | wrapper.value ➜ 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | +| | | wrapper.value = 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | -| | | wrapper.value.getAndAddInt(1): 10 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | -| | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | -| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | wrapper.value ➜ 11 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | wrapper.value = 12 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | -| Thread#2.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| | | value.getAndIncrement(): 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | +| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | +| | | wrapper.value.getAndAddInt(1): 10 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | +| | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | +| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | wrapper.value ➜ 11 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | wrapper.value = 12 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | +| Thread#2.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | cursor ➜ 2 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | -| Itr#2.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| Itr#2.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:967) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1012) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1012) | | | | @@ -235,8 +210,8 @@ Detailed trace: | cursor = 3 at ArrayList$Itr.next(ArrayList.java:974) | | | | | lastRet = 2 at ArrayList$Itr.next(ArrayList.java:975) | | | | | Array#1[2] ➜ Thread#3 at ArrayList$Itr.next(ArrayList.java:975) | | | | -| Thread#3.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| Thread#3.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | cursor ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:962) | | | | | result: IllegalStateException #1 | | | | diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/custom_threads_trace_debugger_jdk11.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/custom_threads_trace_debugger_jdk11.txt index c82e571ef7..15a73f8e4f 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/custom_threads_trace_debugger_jdk11.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/custom_threads_trace_debugger_jdk11.txt @@ -1,74 +1,73 @@ = Concurrent test failed = java.lang.IllegalStateException: Check failed. - at org.jetbrains.kotlinx.lincheck_test.representation.CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) - at org.jetbrains.kotlinx.lincheck_test.representation.CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:264) - at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) + at org.jetbrains.kotlinx.lincheck_test.representation.CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:282) + at org.jetbrains.kotlinx.lincheck_test.representation.CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:265) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) at java.base/java.lang.Thread.run(Unknown Source) The following interleaving leads to the error: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | Thread 3 | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | | -| block(): threw IllegalStateException at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:264) | | | | -| $i$f$forEach.add(Thread#1): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| $i$f$forEach.add(Thread#2): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| $i$f$forEach.add(Thread#3): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | | +| block(): threw IllegalStateException at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:265) | | | | +| $i$f$forEach.add(Thread#1): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $i$f$forEach.add(Thread#2): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $i$f$forEach.add(Thread#3): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | | threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| iterator(): Itr#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Itr#2.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Itr#2.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | | | -| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | -| | wrapper.value ➜ 0 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | -| | wrapper.value = 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | -| | value.getAndIncrement(): 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | +| | wrapper.value ➜ 0 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | +| | wrapper.value = 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | -| | wrapper.value.getAndAddInt(1): 2 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | -| | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | -| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | wrapper.value ➜ 3 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | wrapper.value = 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | value.getAndIncrement(): 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | +| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | wrapper.value.getAndAddInt(1): 2 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | +| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | wrapper.value ➜ 3 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | wrapper.value = 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | | | | | run() | -| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | -| | | | wrapper.value ➜ 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | -| | | | wrapper.value = 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | -| | | | value.getAndIncrement(): 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | +| | | | wrapper.value ➜ 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | +| | | | wrapper.value = 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | -| | | | wrapper.value.getAndAddInt(1): 6 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | -| | | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | -| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | wrapper.value ➜ 7 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | wrapper.value = 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | -| Thread#1.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Itr#2.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| | | | value.getAndIncrement(): 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | +| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | +| | | | wrapper.value.getAndAddInt(1): 6 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | +| | | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | +| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | wrapper.value ➜ 7 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | wrapper.value = 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | +| Thread#1.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Itr#2.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | switch (reason: waiting for Thread 2 to finish) | | | | | | | run() | | -| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | -| | | wrapper.value ➜ 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | -| | | wrapper.value = 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | -| | | value.getAndIncrement(): 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | +| | | wrapper.value ➜ 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | +| | | wrapper.value = 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | -| | | wrapper.value.getAndAddInt(1): 10 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | -| | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | -| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | wrapper.value ➜ 11 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | wrapper.value = 12 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | -| Thread#2.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Itr#2.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Thread#3.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| | | value.getAndIncrement(): 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | +| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | +| | | wrapper.value.getAndAddInt(1): 10 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | +| | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | +| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | wrapper.value ➜ 11 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | wrapper.value = 12 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | +| Thread#2.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Itr#2.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Thread#3.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | result: IllegalStateException #1 | | | | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -76,39 +75,16 @@ Detailed trace: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | Thread 3 | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | | -| block(): threw IllegalStateException at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:264) | | | | -| $i$f$forEach.add(Thread#1): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| modCount ➜ 0 at ArrayList.add(ArrayList.java:498) | | | | -| modCount = 1 at ArrayList.add(ArrayList.java:498) | | | | -| elementData ➜ Array#1 at ArrayList.add(ArrayList.java:499) | | | | -| size ➜ 0 at ArrayList.add(ArrayList.java:499) | | | | -| add(Thread#1, Array#1, 0) at ArrayList.add(ArrayList.java:499) | | | | -| Array#1[0] = Thread#1 at ArrayList.add(ArrayList.java:487) | | | | -| size = 1 at ArrayList.add(ArrayList.java:488) | | | | -| $i$f$forEach.add(Thread#2): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| modCount ➜ 1 at ArrayList.add(ArrayList.java:498) | | | | -| modCount = 2 at ArrayList.add(ArrayList.java:498) | | | | -| elementData ➜ Array#1 at ArrayList.add(ArrayList.java:499) | | | | -| size ➜ 1 at ArrayList.add(ArrayList.java:499) | | | | -| add(Thread#2, Array#1, 1) at ArrayList.add(ArrayList.java:499) | | | | -| Array#1[1] = Thread#2 at ArrayList.add(ArrayList.java:487) | | | | -| size = 2 at ArrayList.add(ArrayList.java:488) | | | | -| $i$f$forEach.add(Thread#3): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| modCount ➜ 2 at ArrayList.add(ArrayList.java:498) | | | | -| modCount = 3 at ArrayList.add(ArrayList.java:498) | | | | -| elementData ➜ Array#1 at ArrayList.add(ArrayList.java:499) | | | | -| size ➜ 2 at ArrayList.add(ArrayList.java:499) | | | | -| add(Thread#3, Array#1, 2) at ArrayList.add(ArrayList.java:499) | | | | -| Array#1[2] = Thread#3 at ArrayList.add(ArrayList.java:487) | | | | -| size = 3 at ArrayList.add(ArrayList.java:488) | | | | -| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | -| iterator(): Itr#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | -| modCount ➜ 3 at ArrayList$Itr.(ArrayList.java:986) | | | | -| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | | +| block(): threw IllegalStateException at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:265) | | | | +| $i$f$forEach.add(Thread#1): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $i$f$forEach.add(Thread#2): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $i$f$forEach.add(Thread#3): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | +| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | cursor ➜ 0 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | -| Itr#1.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Itr#1.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:997) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1042) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1042) | | | | @@ -118,11 +94,11 @@ Detailed trace: | cursor = 1 at ArrayList$Itr.next(ArrayList.java:1004) | | | | | lastRet = 0 at ArrayList$Itr.next(ArrayList.java:1005) | | | | | Array#1[0] ➜ Thread#1 at ArrayList$Itr.next(ArrayList.java:1005) | | | | -| Thread#1.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | -| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Thread#1.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | +| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | cursor ➜ 1 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | -| Itr#1.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Itr#1.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:997) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1042) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1042) | | | | @@ -132,11 +108,11 @@ Detailed trace: | cursor = 2 at ArrayList$Itr.next(ArrayList.java:1004) | | | | | lastRet = 1 at ArrayList$Itr.next(ArrayList.java:1005) | | | | | Array#1[1] ➜ Thread#2 at ArrayList$Itr.next(ArrayList.java:1005) | | | | -| Thread#2.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | -| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Thread#2.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | +| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | cursor ➜ 2 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | -| Itr#1.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Itr#1.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:997) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1042) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1042) | | | | @@ -146,17 +122,16 @@ Detailed trace: | cursor = 3 at ArrayList$Itr.next(ArrayList.java:1004) | | | | | lastRet = 2 at ArrayList$Itr.next(ArrayList.java:1005) | | | | | Array#1[2] ➜ Thread#3 at ArrayList$Itr.next(ArrayList.java:1005) | | | | -| Thread#3.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | -| Itr#1.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Thread#3.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | +| Itr#1.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | cursor ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | -| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| iterator(): Itr#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| modCount ➜ 3 at ArrayList$Itr.(ArrayList.java:986) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| iterator(): Itr#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | cursor ➜ 0 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | -| Itr#2.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| Itr#2.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:997) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1042) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1042) | | | | @@ -168,36 +143,36 @@ Detailed trace: | Array#1[0] ➜ Thread#1 at ArrayList$Itr.next(ArrayList.java:1005) | | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | | | -| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | -| | wrapper.value ➜ 0 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | -| | wrapper.value = 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | -| | value.getAndIncrement(): 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | +| | wrapper.value ➜ 0 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | +| | wrapper.value = 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | -| | wrapper.value.getAndAddInt(1): 2 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | -| | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | -| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | wrapper.value ➜ 3 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | wrapper.value = 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | value.getAndIncrement(): 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | +| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | wrapper.value.getAndAddInt(1): 2 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | +| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | wrapper.value ➜ 3 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | wrapper.value = 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | | | | | run() | -| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | -| | | | wrapper.value ➜ 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | -| | | | wrapper.value = 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | -| | | | value.getAndIncrement(): 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | +| | | | wrapper.value ➜ 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | +| | | | wrapper.value = 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | -| | | | wrapper.value.getAndAddInt(1): 6 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | -| | | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | -| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | wrapper.value ➜ 7 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | wrapper.value = 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | -| Thread#1.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| | | | value.getAndIncrement(): 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | +| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | +| | | | wrapper.value.getAndAddInt(1): 6 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | +| | | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | +| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | wrapper.value ➜ 7 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | wrapper.value = 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | +| Thread#1.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | cursor ➜ 1 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | -| Itr#2.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| Itr#2.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:997) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1042) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1042) | | | | @@ -209,23 +184,23 @@ Detailed trace: | Array#1[1] ➜ Thread#2 at ArrayList$Itr.next(ArrayList.java:1005) | | | | | switch (reason: waiting for Thread 2 to finish) | | | | | | | run() | | -| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | -| | | wrapper.value ➜ 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | -| | | wrapper.value = 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | -| | | value.getAndIncrement(): 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | +| | | wrapper.value ➜ 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | +| | | wrapper.value = 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | -| | | wrapper.value.getAndAddInt(1): 10 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | -| | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | -| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | wrapper.value ➜ 11 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | wrapper.value = 12 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | -| Thread#2.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| | | value.getAndIncrement(): 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | +| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | +| | | wrapper.value.getAndAddInt(1): 10 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | +| | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | +| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | wrapper.value ➜ 11 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | wrapper.value = 12 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | +| Thread#2.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | cursor ➜ 2 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | -| Itr#2.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| Itr#2.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:997) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1042) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1042) | | | | @@ -235,8 +210,8 @@ Detailed trace: | cursor = 3 at ArrayList$Itr.next(ArrayList.java:1004) | | | | | lastRet = 2 at ArrayList$Itr.next(ArrayList.java:1005) | | | | | Array#1[2] ➜ Thread#3 at ArrayList$Itr.next(ArrayList.java:1005) | | | | -| Thread#3.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| Thread#3.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | cursor ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:992) | | | | | result: IllegalStateException #1 | | | | diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/custom_threads_trace_debugger_jdk21.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/custom_threads_trace_debugger_jdk21.txt index 41355e3715..0ade6a6846 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/custom_threads_trace_debugger_jdk21.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/custom_threads_trace_debugger_jdk21.txt @@ -1,74 +1,73 @@ = Concurrent test failed = java.lang.IllegalStateException: Check failed. - at org.jetbrains.kotlinx.lincheck_test.representation.CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) - at org.jetbrains.kotlinx.lincheck_test.representation.CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:264) - at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) + at org.jetbrains.kotlinx.lincheck_test.representation.CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:282) + at org.jetbrains.kotlinx.lincheck_test.representation.CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:265) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) at java.base/java.lang.Thread.run(Unknown Source) The following interleaving leads to the error: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | Thread 3 | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | | -| block(): threw IllegalStateException at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:264) | | | | -| $i$f$forEach.add(Thread#1): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| $i$f$forEach.add(Thread#2): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| $i$f$forEach.add(Thread#3): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | | +| block(): threw IllegalStateException at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:265) | | | | +| $i$f$forEach.add(Thread#1): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $i$f$forEach.add(Thread#2): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $i$f$forEach.add(Thread#3): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | | threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| iterator(): Itr#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Itr#2.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Itr#2.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | | | -| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | -| | wrapper.value ➜ 0 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | -| | wrapper.value = 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | -| | value.getAndIncrement(): 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | +| | wrapper.value ➜ 0 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | +| | wrapper.value = 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | -| | wrapper.value.getAndAddInt(1): 2 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | -| | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | -| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | wrapper.value ➜ 3 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | wrapper.value = 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | value.getAndIncrement(): 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | +| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | wrapper.value.getAndAddInt(1): 2 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | +| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | wrapper.value ➜ 3 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | wrapper.value = 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | | | | | run() | -| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | -| | | | wrapper.value ➜ 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | -| | | | wrapper.value = 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | -| | | | value.getAndIncrement(): 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | +| | | | wrapper.value ➜ 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | +| | | | wrapper.value = 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | -| | | | wrapper.value.getAndAddInt(1): 6 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | -| | | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | -| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | wrapper.value ➜ 7 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | wrapper.value = 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | -| Thread#1.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Itr#2.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| | | | value.getAndIncrement(): 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | +| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | +| | | | wrapper.value.getAndAddInt(1): 6 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | +| | | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | +| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | wrapper.value ➜ 7 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | wrapper.value = 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | +| Thread#1.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Itr#2.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | switch (reason: waiting for Thread 2 to finish) | | | | | | | run() | | -| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | -| | | wrapper.value ➜ 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | -| | | wrapper.value = 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | -| | | value.getAndIncrement(): 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | +| | | wrapper.value ➜ 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | +| | | wrapper.value = 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | -| | | wrapper.value.getAndAddInt(1): 10 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | -| | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | -| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | wrapper.value ➜ 11 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | wrapper.value = 12 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | -| Thread#2.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Itr#2.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| Thread#3.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| | | value.getAndIncrement(): 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | +| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | +| | | wrapper.value.getAndAddInt(1): 10 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | +| | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | +| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | wrapper.value ➜ 11 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | wrapper.value = 12 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | +| Thread#2.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Itr#2.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Thread#3.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | result: IllegalStateException #1 | | | | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -76,39 +75,16 @@ Detailed trace: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | Thread 3 | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | | -| block(): threw IllegalStateException at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:264) | | | | -| $i$f$forEach.add(Thread#1): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| modCount ➜ 0 at ArrayList.add(ArrayList.java:495) | | | | -| modCount = 1 at ArrayList.add(ArrayList.java:495) | | | | -| elementData ➜ Array#1 at ArrayList.add(ArrayList.java:496) | | | | -| size ➜ 0 at ArrayList.add(ArrayList.java:496) | | | | -| add(Thread#1, Array#1, 0) at ArrayList.add(ArrayList.java:496) | | | | -| Array#1[0] = Thread#1 at ArrayList.add(ArrayList.java:484) | | | | -| size = 1 at ArrayList.add(ArrayList.java:485) | | | | -| $i$f$forEach.add(Thread#2): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| modCount ➜ 1 at ArrayList.add(ArrayList.java:495) | | | | -| modCount = 2 at ArrayList.add(ArrayList.java:495) | | | | -| elementData ➜ Array#1 at ArrayList.add(ArrayList.java:496) | | | | -| size ➜ 1 at ArrayList.add(ArrayList.java:496) | | | | -| add(Thread#2, Array#1, 1) at ArrayList.add(ArrayList.java:496) | | | | -| Array#1[1] = Thread#2 at ArrayList.add(ArrayList.java:484) | | | | -| size = 2 at ArrayList.add(ArrayList.java:485) | | | | -| $i$f$forEach.add(Thread#3): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:278) | | | | -| modCount ➜ 2 at ArrayList.add(ArrayList.java:495) | | | | -| modCount = 3 at ArrayList.add(ArrayList.java:495) | | | | -| elementData ➜ Array#1 at ArrayList.add(ArrayList.java:496) | | | | -| size ➜ 2 at ArrayList.add(ArrayList.java:496) | | | | -| add(Thread#3, Array#1, 2) at ArrayList.add(ArrayList.java:496) | | | | -| Array#1[2] = Thread#3 at ArrayList.add(ArrayList.java:484) | | | | -| size = 3 at ArrayList.add(ArrayList.java:485) | | | | -| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | -| iterator(): Itr#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | -| modCount ➜ 3 at ArrayList$Itr.(ArrayList.java:1038) | | | | -| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | | +| block(): threw IllegalStateException at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:265) | | | | +| $i$f$forEach.add(Thread#1): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $i$f$forEach.add(Thread#2): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| $i$f$forEach.add(Thread#3): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | +| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | +| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | cursor ➜ 0 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | -| Itr#1.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Itr#1.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:1049) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1094) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1094) | | | | @@ -118,11 +94,11 @@ Detailed trace: | cursor = 1 at ArrayList$Itr.next(ArrayList.java:1056) | | | | | lastRet = 0 at ArrayList$Itr.next(ArrayList.java:1057) | | | | | Array#1[0] ➜ Thread#1 at ArrayList$Itr.next(ArrayList.java:1057) | | | | -| Thread#1.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | -| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Thread#1.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | +| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | cursor ➜ 1 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | -| Itr#1.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Itr#1.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:1049) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1094) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1094) | | | | @@ -132,11 +108,11 @@ Detailed trace: | cursor = 2 at ArrayList$Itr.next(ArrayList.java:1056) | | | | | lastRet = 1 at ArrayList$Itr.next(ArrayList.java:1057) | | | | | Array#1[1] ➜ Thread#2 at ArrayList$Itr.next(ArrayList.java:1057) | | | | -| Thread#2.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | -| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Thread#2.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | +| Itr#1.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | cursor ➜ 2 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | -| Itr#1.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Itr#1.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:1049) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1094) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1094) | | | | @@ -146,17 +122,16 @@ Detailed trace: | cursor = 3 at ArrayList$Itr.next(ArrayList.java:1056) | | | | | lastRet = 2 at ArrayList$Itr.next(ArrayList.java:1057) | | | | | Array#1[2] ➜ Thread#3 at ArrayList$Itr.next(ArrayList.java:1057) | | | | -| Thread#3.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:279) | | | | -| Itr#1.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:480) | | | | +| Thread#3.start() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | +| Itr#1.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:481) | | | | | cursor ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | -| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| iterator(): Itr#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | -| modCount ➜ 3 at ArrayList$Itr.(ArrayList.java:1038) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| threads.forEach() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| iterator(): Itr#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | cursor ➜ 0 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | -| Itr#2.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| Itr#2.next(): Thread#1 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:1049) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1094) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1094) | | | | @@ -168,36 +143,36 @@ Detailed trace: | Array#1[0] ➜ Thread#1 at ArrayList$Itr.next(ArrayList.java:1057) | | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | | | -| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | -| | wrapper.value ➜ 0 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | -| | wrapper.value = 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | -| | value.getAndIncrement(): 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | +| | wrapper.value ➜ 0 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | +| | wrapper.value = 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | -| | wrapper.value.getAndAddInt(1): 2 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | -| | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | -| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | wrapper.value ➜ 3 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | wrapper.value = 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | -| | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | value.getAndIncrement(): 1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | | +| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | wrapper.value.getAndAddInt(1): 2 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | | +| | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | +| | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | wrapper.value ➜ 3 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | wrapper.value = 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | | +| | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | | | | | | run() | -| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | -| | | | wrapper.value ➜ 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | -| | | | wrapper.value = 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | -| | | | value.getAndIncrement(): 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | +| | | | wrapper.value ➜ 4 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | +| | | | wrapper.value = 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | -| | | | wrapper.value.getAndAddInt(1): 6 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | -| | | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | -| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | wrapper.value ➜ 7 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | wrapper.value = 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | -| | | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | -| Thread#1.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| | | | value.getAndIncrement(): 5 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | +| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | +| | | | wrapper.value.getAndAddInt(1): 6 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | +| | | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | +| | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | wrapper.value ➜ 7 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | wrapper.value = 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | +| | | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | +| Thread#1.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | cursor ➜ 1 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | -| Itr#2.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| Itr#2.next(): Thread#2 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:1049) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1094) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1094) | | | | @@ -209,23 +184,23 @@ Detailed trace: | Array#1[1] ➜ Thread#2 at ArrayList$Itr.next(ArrayList.java:1057) | | | | | switch (reason: waiting for Thread 2 to finish) | | | | | | | run() | | -| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | -| | | wrapper.value ➜ 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | -| | | wrapper.value = 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:270) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | -| | | value.getAndIncrement(): 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | +| | | wrapper.value ➜ 8 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | +| | | wrapper.value = 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:271) | | | | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | -| | | wrapper.value.getAndAddInt(1): 10 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | -| | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | -| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | wrapper.value ➜ 11 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | wrapper.value = 12 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | -| | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | -| Thread#2.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| | | value.getAndIncrement(): 9 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:272) | | +| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | +| | | wrapper.value.getAndAddInt(1): 10 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:273) | | +| | | MONITORENTER at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | +| | | CustomThreadsRunConcurrentRepresentationTest.wrapper ➜ Wrapper#1 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | wrapper.value ➜ 11 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | wrapper.value = 12 at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:275) | | +| | | MONITOREXIT at CustomThreadsRunConcurrentRepresentationTest$block$task$1.run(RunConcurrentRepresentationTests.kt:274) | | +| Thread#2.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): true at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | cursor ➜ 2 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | -| Itr#2.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| Itr#2.next(): Thread#3 at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | checkForComodification() at ArrayList$Itr.next(ArrayList.java:1049) | | | | | this$0.modCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1094) | | | | | expectedModCount ➜ 3 at ArrayList$Itr.checkForComodification(ArrayList.java:1094) | | | | @@ -235,8 +210,8 @@ Detailed trace: | cursor = 3 at ArrayList$Itr.next(ArrayList.java:1056) | | | | | lastRet = 2 at ArrayList$Itr.next(ArrayList.java:1057) | | | | | Array#1[2] ➜ Thread#3 at ArrayList$Itr.next(ArrayList.java:1057) | | | | -| Thread#3.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:280) | | | | -| Itr#2.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:482) | | | | +| Thread#3.join() at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:281) | | | | +| Itr#2.hasNext(): false at CustomThreadsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:483) | | | | | cursor ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | | this$0.size ➜ 3 at ArrayList$Itr.hasNext(ArrayList.java:1044) | | | | | result: IllegalStateException #1 | | | | diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap.txt index fcbef6b7f2..148a00eaf8 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap.txt @@ -1,41 +1,31 @@ = Concurrent test failed = java.lang.IllegalStateException: Check failed. - at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) - at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) - at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) + at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) + at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) at java.base/java.lang.Thread.run(Unknown Source) The following interleaving leads to the error: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) | | | -| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) | | | -| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:373) | | | -| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:376) | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) | | | +| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | +| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:382) | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | -| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| | | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:610) | -| | | table ➜ null at HashMap.putVal(HashMap.java:626) | -| | | resize(): Array#1 at HashMap.putVal(HashMap.java:627) | -| | | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:628) | -| | | switch | +| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| | | switch | | | run() | | -| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | | Array#1[0] = Node#1 at HashMap.putVal(HashMap.java:629) | -| | | modCount ➜ 1 at HashMap.putVal(HashMap.java:659) | -| | | modCount = 2 at HashMap.putVal(HashMap.java:659) | -| | | size ➜ 1 at HashMap.putVal(HashMap.java:660) | -| | | size = 2 at HashMap.putVal(HashMap.java:660) | -| | | threshold ➜ 12 at HashMap.putVal(HashMap.java:660) | -| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | -| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:380) | | | -| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | -| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | +| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:385) | | | +| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:386) | | | +| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | +| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | | result: IllegalStateException #1 | | | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -43,44 +33,31 @@ Detailed trace: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) | | | -| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) | | | -| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:373) | | | -| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:376) | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) | | | +| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | +| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:382) | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | -| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | +| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | | | | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:610) | | | | table ➜ null at HashMap.putVal(HashMap.java:626) | | | | resize(): Array#1 at HashMap.putVal(HashMap.java:627) | -| | | table ➜ null at HashMap.resize(HashMap.java:676) | -| | | threshold ➜ 0 at HashMap.resize(HashMap.java:678) | -| | | threshold = 12 at HashMap.resize(HashMap.java:700) | -| | | table = Array#1 at HashMap.resize(HashMap.java:703) | | | | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:628) | | | | switch | | | run() | | -| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:610) | | -| | table ➜ Array#1 at HashMap.putVal(HashMap.java:626) | | -| | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:628) | | -| | Array#1[0] = Node#2 at HashMap.putVal(HashMap.java:629) | | -| | modCount ➜ 0 at HashMap.putVal(HashMap.java:659) | | -| | modCount = 1 at HashMap.putVal(HashMap.java:659) | | -| | size ➜ 0 at HashMap.putVal(HashMap.java:660) | | -| | size = 1 at HashMap.putVal(HashMap.java:660) | | -| | threshold ➜ 12 at HashMap.putVal(HashMap.java:660) | | -| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | +| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | | | | Array#1[0] = Node#1 at HashMap.putVal(HashMap.java:629) | | | | modCount ➜ 1 at HashMap.putVal(HashMap.java:659) | | | | modCount = 2 at HashMap.putVal(HashMap.java:659) | | | | size ➜ 1 at HashMap.putVal(HashMap.java:660) | | | | size = 2 at HashMap.putVal(HashMap.java:660) | | | | threshold ➜ 12 at HashMap.putVal(HashMap.java:660) | -| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | -| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:380) | | | -| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | -| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | +| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:385) | | | +| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:386) | | | +| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | +| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | | result: IllegalStateException #1 | | | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_jdk11.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_jdk11.txt index 3a359c8a97..41af28ee62 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_jdk11.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_jdk11.txt @@ -1,41 +1,31 @@ = Concurrent test failed = java.lang.IllegalStateException: Check failed. - at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) - at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) - at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) + at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) + at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) at java.base/java.lang.Thread.run(Unknown Source) The following interleaving leads to the error: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) | | | -| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) | | | -| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:373) | | | -| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:376) | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) | | | +| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | +| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:382) | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | -| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| | | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:608) | -| | | table ➜ null at HashMap.putVal(HashMap.java:624) | -| | | resize(): Array#1 at HashMap.putVal(HashMap.java:625) | -| | | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:626) | -| | | switch | +| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| | | switch | | | run() | | -| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | | Array#1[0] = Node#1 at HashMap.putVal(HashMap.java:627) | -| | | modCount ➜ 1 at HashMap.putVal(HashMap.java:657) | -| | | modCount = 2 at HashMap.putVal(HashMap.java:657) | -| | | size ➜ 1 at HashMap.putVal(HashMap.java:658) | -| | | size = 2 at HashMap.putVal(HashMap.java:658) | -| | | threshold ➜ 12 at HashMap.putVal(HashMap.java:658) | -| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | -| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:380) | | | -| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | -| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | +| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:385) | | | +| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:386) | | | +| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | +| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | | result: IllegalStateException #1 | | | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -43,44 +33,31 @@ Detailed trace: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) | | | -| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) | | | -| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:373) | | | -| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:376) | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) | | | +| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | +| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:382) | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | -| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | +| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | | | | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:608) | | | | table ➜ null at HashMap.putVal(HashMap.java:624) | | | | resize(): Array#1 at HashMap.putVal(HashMap.java:625) | -| | | table ➜ null at HashMap.resize(HashMap.java:674) | -| | | threshold ➜ 0 at HashMap.resize(HashMap.java:676) | -| | | threshold = 12 at HashMap.resize(HashMap.java:698) | -| | | table = Array#1 at HashMap.resize(HashMap.java:701) | | | | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:626) | | | | switch | | | run() | | -| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:608) | | -| | table ➜ Array#1 at HashMap.putVal(HashMap.java:624) | | -| | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:626) | | -| | Array#1[0] = Node#2 at HashMap.putVal(HashMap.java:627) | | -| | modCount ➜ 0 at HashMap.putVal(HashMap.java:657) | | -| | modCount = 1 at HashMap.putVal(HashMap.java:657) | | -| | size ➜ 0 at HashMap.putVal(HashMap.java:658) | | -| | size = 1 at HashMap.putVal(HashMap.java:658) | | -| | threshold ➜ 12 at HashMap.putVal(HashMap.java:658) | | -| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | +| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | | | | Array#1[0] = Node#1 at HashMap.putVal(HashMap.java:627) | | | | modCount ➜ 1 at HashMap.putVal(HashMap.java:657) | | | | modCount = 2 at HashMap.putVal(HashMap.java:657) | | | | size ➜ 1 at HashMap.putVal(HashMap.java:658) | | | | size = 2 at HashMap.putVal(HashMap.java:658) | | | | threshold ➜ 12 at HashMap.putVal(HashMap.java:658) | -| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | -| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:380) | | | -| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | -| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | +| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:385) | | | +| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:386) | | | +| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | +| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | | result: IllegalStateException #1 | | | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_jdk8.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_jdk8.txt index aa5cbad51c..64b42822ea 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_jdk8.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_jdk8.txt @@ -1,41 +1,31 @@ = Concurrent test failed = java.lang.IllegalStateException: Check failed. - at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) - at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) - at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) + at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) + at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) at java.lang.Thread.run(Thread.java:750) The following interleaving leads to the error: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) | | | -| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) | | | -| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:373) | | | -| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:376) | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) | | | +| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | +| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:382) | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | -| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| | | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:613) | -| | | table ➜ null at HashMap.putVal(HashMap.java:629) | -| | | resize(): Array#1 at HashMap.putVal(HashMap.java:630) | -| | | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:631) | -| | | switch | +| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| | | switch | | | run() | | -| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | | Array#1[0] = Node#1 at HashMap.putVal(HashMap.java:632) | -| | | modCount ➜ 1 at HashMap.putVal(HashMap.java:662) | -| | | modCount = 2 at HashMap.putVal(HashMap.java:662) | -| | | size ➜ 1 at HashMap.putVal(HashMap.java:663) | -| | | size = 2 at HashMap.putVal(HashMap.java:663) | -| | | threshold ➜ 12 at HashMap.putVal(HashMap.java:663) | -| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | -| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:380) | | | -| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | -| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | +| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:385) | | | +| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:386) | | | +| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | +| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | | result: IllegalStateException #1 | | | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -43,44 +33,31 @@ Detailed trace: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) | | | -| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) | | | -| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:373) | | | -| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:376) | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) | | | +| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | +| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:382) | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | -| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | +| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | | | | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:613) | | | | table ➜ null at HashMap.putVal(HashMap.java:629) | | | | resize(): Array#1 at HashMap.putVal(HashMap.java:630) | -| | | table ➜ null at HashMap.resize(HashMap.java:679) | -| | | threshold ➜ 0 at HashMap.resize(HashMap.java:681) | -| | | threshold = 12 at HashMap.resize(HashMap.java:703) | -| | | table = Array#1 at HashMap.resize(HashMap.java:706) | | | | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:631) | | | | switch | | | run() | | -| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:613) | | -| | table ➜ Array#1 at HashMap.putVal(HashMap.java:629) | | -| | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:631) | | -| | Array#1[0] = Node#2 at HashMap.putVal(HashMap.java:632) | | -| | modCount ➜ 0 at HashMap.putVal(HashMap.java:662) | | -| | modCount = 1 at HashMap.putVal(HashMap.java:662) | | -| | size ➜ 0 at HashMap.putVal(HashMap.java:663) | | -| | size = 1 at HashMap.putVal(HashMap.java:663) | | -| | threshold ➜ 12 at HashMap.putVal(HashMap.java:663) | | -| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | +| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | | | | Array#1[0] = Node#1 at HashMap.putVal(HashMap.java:632) | | | | modCount ➜ 1 at HashMap.putVal(HashMap.java:662) | | | | modCount = 2 at HashMap.putVal(HashMap.java:662) | | | | size ➜ 1 at HashMap.putVal(HashMap.java:663) | | | | size = 2 at HashMap.putVal(HashMap.java:663) | | | | threshold ➜ 12 at HashMap.putVal(HashMap.java:663) | -| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | -| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:380) | | | -| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | -| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | +| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:385) | | | +| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:386) | | | +| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | +| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | | result: IllegalStateException #1 | | | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_trace_debugger.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_trace_debugger.txt index fcbef6b7f2..148a00eaf8 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_trace_debugger.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_trace_debugger.txt @@ -1,41 +1,31 @@ = Concurrent test failed = java.lang.IllegalStateException: Check failed. - at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) - at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) - at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) + at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) + at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) at java.base/java.lang.Thread.run(Unknown Source) The following interleaving leads to the error: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) | | | -| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) | | | -| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:373) | | | -| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:376) | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) | | | +| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | +| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:382) | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | -| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| | | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:610) | -| | | table ➜ null at HashMap.putVal(HashMap.java:626) | -| | | resize(): Array#1 at HashMap.putVal(HashMap.java:627) | -| | | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:628) | -| | | switch | +| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| | | switch | | | run() | | -| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | | Array#1[0] = Node#1 at HashMap.putVal(HashMap.java:629) | -| | | modCount ➜ 1 at HashMap.putVal(HashMap.java:659) | -| | | modCount = 2 at HashMap.putVal(HashMap.java:659) | -| | | size ➜ 1 at HashMap.putVal(HashMap.java:660) | -| | | size = 2 at HashMap.putVal(HashMap.java:660) | -| | | threshold ➜ 12 at HashMap.putVal(HashMap.java:660) | -| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | -| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:380) | | | -| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | -| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | +| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:385) | | | +| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:386) | | | +| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | +| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | | result: IllegalStateException #1 | | | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -43,44 +33,31 @@ Detailed trace: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) | | | -| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) | | | -| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:373) | | | -| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:376) | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) | | | +| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | +| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:382) | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | -| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | +| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | | | | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:610) | | | | table ➜ null at HashMap.putVal(HashMap.java:626) | | | | resize(): Array#1 at HashMap.putVal(HashMap.java:627) | -| | | table ➜ null at HashMap.resize(HashMap.java:676) | -| | | threshold ➜ 0 at HashMap.resize(HashMap.java:678) | -| | | threshold = 12 at HashMap.resize(HashMap.java:700) | -| | | table = Array#1 at HashMap.resize(HashMap.java:703) | | | | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:628) | | | | switch | | | run() | | -| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:610) | | -| | table ➜ Array#1 at HashMap.putVal(HashMap.java:626) | | -| | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:628) | | -| | Array#1[0] = Node#2 at HashMap.putVal(HashMap.java:629) | | -| | modCount ➜ 0 at HashMap.putVal(HashMap.java:659) | | -| | modCount = 1 at HashMap.putVal(HashMap.java:659) | | -| | size ➜ 0 at HashMap.putVal(HashMap.java:660) | | -| | size = 1 at HashMap.putVal(HashMap.java:660) | | -| | threshold ➜ 12 at HashMap.putVal(HashMap.java:660) | | -| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | +| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | | | | Array#1[0] = Node#1 at HashMap.putVal(HashMap.java:629) | | | | modCount ➜ 1 at HashMap.putVal(HashMap.java:659) | | | | modCount = 2 at HashMap.putVal(HashMap.java:659) | | | | size ➜ 1 at HashMap.putVal(HashMap.java:660) | | | | size = 2 at HashMap.putVal(HashMap.java:660) | | | | threshold ➜ 12 at HashMap.putVal(HashMap.java:660) | -| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | -| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:380) | | | -| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | -| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | +| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:385) | | | +| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:386) | | | +| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | +| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | | result: IllegalStateException #1 | | | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_trace_debugger_jdk11.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_trace_debugger_jdk11.txt index 3a359c8a97..41af28ee62 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_trace_debugger_jdk11.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/hashmap_trace_debugger_jdk11.txt @@ -1,41 +1,31 @@ = Concurrent test failed = java.lang.IllegalStateException: Check failed. - at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) - at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) - at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) + at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) + at org.jetbrains.kotlinx.lincheck_test.representation.IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) at java.base/java.lang.Thread.run(Unknown Source) The following interleaving leads to the error: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) | | | -| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) | | | -| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:373) | | | -| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:376) | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) | | | +| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | +| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:382) | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | -| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| | | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:608) | -| | | table ➜ null at HashMap.putVal(HashMap.java:624) | -| | | resize(): Array#1 at HashMap.putVal(HashMap.java:625) | -| | | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:626) | -| | | switch | +| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| | | switch | | | run() | | -| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | | Array#1[0] = Node#1 at HashMap.putVal(HashMap.java:627) | -| | | modCount ➜ 1 at HashMap.putVal(HashMap.java:657) | -| | | modCount = 2 at HashMap.putVal(HashMap.java:657) | -| | | size ➜ 1 at HashMap.putVal(HashMap.java:658) | -| | | size = 2 at HashMap.putVal(HashMap.java:658) | -| | | threshold ➜ 12 at HashMap.putVal(HashMap.java:658) | -| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | -| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:380) | | | -| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | -| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | +| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:385) | | | +| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:386) | | | +| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | +| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | | result: IllegalStateException #1 | | | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -43,44 +33,31 @@ Detailed trace: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | Thread 1 | Thread 2 | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:46) | | | -| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:368) | | | -| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:373) | | | -| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:376) | | | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:374) | | | +| thread(block = Lambda#2): Thread#1 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | +| thread(block = Lambda#3): Thread#2 at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:382) | | | | switch (reason: waiting for Thread 1 to finish) | | | | | | run() | -| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | +| | | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | | | | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:608) | | | | table ➜ null at HashMap.putVal(HashMap.java:624) | | | | resize(): Array#1 at HashMap.putVal(HashMap.java:625) | -| | | table ➜ null at HashMap.resize(HashMap.java:674) | -| | | threshold ➜ 0 at HashMap.resize(HashMap.java:676) | -| | | threshold = 12 at HashMap.resize(HashMap.java:698) | -| | | table = Array#1 at HashMap.resize(HashMap.java:701) | | | | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:626) | | | | switch | | | run() | | -| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | -| | putVal(0, 0, 1, false, true): null at HashMap.put(HashMap.java:608) | | -| | table ➜ Array#1 at HashMap.putVal(HashMap.java:624) | | -| | Array#1[0] ➜ null at HashMap.putVal(HashMap.java:626) | | -| | Array#1[0] = Node#2 at HashMap.putVal(HashMap.java:627) | | -| | modCount ➜ 0 at HashMap.putVal(HashMap.java:657) | | -| | modCount = 1 at HashMap.putVal(HashMap.java:657) | | -| | size ➜ 0 at HashMap.putVal(HashMap.java:658) | | -| | size = 1 at HashMap.putVal(HashMap.java:658) | | -| | threshold ➜ 12 at HashMap.putVal(HashMap.java:658) | | -| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:374) | | +| | $hashMap.put(0, 1): null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | +| | $r1.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$0(RunConcurrentRepresentationTests.kt:380) | | | | | Array#1[0] = Node#1 at HashMap.putVal(HashMap.java:627) | | | | modCount ➜ 1 at HashMap.putVal(HashMap.java:657) | | | | modCount = 2 at HashMap.putVal(HashMap.java:657) | | | | size ➜ 1 at HashMap.putVal(HashMap.java:658) | | | | size = 2 at HashMap.putVal(HashMap.java:658) | | | | threshold ➜ 12 at HashMap.putVal(HashMap.java:658) | -| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:377) | -| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:379) | | | -| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:380) | | | -| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | -| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:381) | | | +| | | $r2.element = null at IncorrectHashmapRunConcurrentRepresentationTest.block$lambda$1(RunConcurrentRepresentationTests.kt:383) | +| Thread#1.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:385) | | | +| Thread#2.join() at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:386) | | | +| r1.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | +| r2.element ➜ null at IncorrectHashmapRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:387) | | | | result: IllegalStateException #1 | | | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked.txt index 816fadf360..4e5245b724 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked.txt @@ -4,9 +4,20 @@ The following interleaving leads to the error: | -------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:99) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:104) | +| PARK at LockSupport.park(LockSupport.java:341) | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +All unfinished threads are in deadlock + +Detailed trace: +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:99) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:104) | | lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:417) | | notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:420) | | enableWait(ConditionNode#1): 1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1611) | @@ -22,36 +33,3 @@ The following interleaving leads to the error: | PARK at LockSupport.park(LockSupport.java:341) | | -------------------------------------------------------------------------------------------------------------------------------------------------- | All unfinished threads are in deadlock - -Detailed trace: -| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Main Thread | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | -| lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:417) | -| sync.lockInterruptibly() at ReentrantLock.lockInterruptibly(ReentrantLock.java:372) | -| initialTryLock(): true at ReentrantLock$Sync.lockInterruptibly(ReentrantLock.java:160) | -| compareAndSetState(0, 1): true at ReentrantLock$NonfairSync.initialTryLock(ReentrantLock.java:225) | -| Unsafe#1.compareAndSetInt(NonfairSync#1, 16, 0, 1): true at AbstractQueuedSynchronizer.compareAndSetState(AbstractQueuedSynchronizer.java:556) | -| notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:420) | -| enableWait(ConditionNode#1): 1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1611) | -| node.setStatusRelaxed(3) at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1504) | -| Unsafe#1.putInt(ConditionNode#1, 12, 3) at AbstractQueuedSynchronizer$Node.setStatusRelaxed(AbstractQueuedSynchronizer.java:474) | -| LockSupport.setCurrentBlocker(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1612) | -| Unsafe#1.putReferenceOpaque(Thread#0, 76, ConditionObject#1) at LockSupport.setCurrentBlocker(LockSupport.java:161) | -| canReacquire(ConditionNode#1): false at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1614) | -| node.prev ➜ null at AbstractQueuedSynchronizer$ConditionObject.canReacquire(AbstractQueuedSynchronizer.java:1527) | -| node.status ➜ 3 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1618) | -| ForkJoinPool.managedBlock(ConditionNode#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1623) | -| ForkJoinPool.unmanagedBlock(ConditionNode#1) at ForkJoinPool.managedBlock(ForkJoinPool.java:3436) | -| blocker.isReleasable(): false at ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3465) | -| status ➜ 3 at AbstractQueuedSynchronizer$ConditionNode.isReleasable(AbstractQueuedSynchronizer.java:502) | -| blocker.block() at ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3465) | -| isReleasable(): false at AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:506) | -| status ➜ 3 at AbstractQueuedSynchronizer$ConditionNode.isReleasable(AbstractQueuedSynchronizer.java:502) | -| LockSupport.park() at AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:506) | -| PARK at LockSupport.park(LockSupport.java:341) | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -All unfinished threads are in deadlock diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_jdk11.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_jdk11.txt index 1ae77e0f2d..1723f27297 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_jdk11.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_jdk11.txt @@ -4,14 +4,10 @@ The following interleaving leads to the error: | -------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | -| lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:414) | -| notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:417) | -| LockSupport.park(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081) | -| LockSupport.setBlocker(Thread#0, ConditionObject#1) at LockSupport.park(LockSupport.java:193) | -| PARK at LockSupport.park(LockSupport.java:194) | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:99) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:104) | +| PARK at LockSupport.park(LockSupport.java:194) | | -------------------------------------------------------------------------------------------------------------------------------------------------- | All unfinished threads are in deadlock @@ -19,19 +15,13 @@ Detailed trace: | -------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:99) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:104) | | lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:414) | -| sync.acquireInterruptibly(1) at ReentrantLock.lockInterruptibly(ReentrantLock.java:317) | -| tryAcquire(1): true at AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1262) | -| nonfairTryAcquire(1): true at ReentrantLock$NonfairSync.tryAcquire(ReentrantLock.java:199) | -| compareAndSetState(0, 1): true at ReentrantLock$Sync.nonfairTryAcquire(ReentrantLock.java:130) | -| state.compareAndSet(0, 1): true at AbstractQueuedSynchronizer.compareAndSetState(AbstractQueuedSynchronizer.java:612) | | notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:417) | | LockSupport.park(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081) | | LockSupport.setBlocker(Thread#0, ConditionObject#1) at LockSupport.park(LockSupport.java:193) | -| Unsafe#1.putObject(Thread#0, 76, ConditionObject#1) at LockSupport.setBlocker(LockSupport.java:144) | | PARK at LockSupport.park(LockSupport.java:194) | | -------------------------------------------------------------------------------------------------------------------------------------------------- | All unfinished threads are in deadlock diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_jdk21.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_jdk21.txt index 8fa988d63d..dbf6a8886a 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_jdk21.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_jdk21.txt @@ -4,17 +4,28 @@ The following interleaving leads to the error: | -------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:99) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:104) | +| PARK at LockSupport.park(LockSupport.java:371) | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +All unfinished threads are in deadlock + +Detailed trace: +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:99) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:104) | | lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:417) | | notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:420) | -| newConditionNode(): ConditionNode#1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1697) | -| enableWait(ConditionNode#1): 1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1700) | -| LockSupport.setCurrentBlocker(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1701) | -| canReacquire(ConditionNode#1): false at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1703) | -| node.status ➜ 3 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1707) | -| ForkJoinPool.managedBlock(ConditionNode#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1712) | +| newConditionNode(): ConditionNode#1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1692) | +| enableWait(ConditionNode#1): 1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1695) | +| LockSupport.setCurrentBlocker(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1696) | +| canReacquire(ConditionNode#1): false at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1698) | +| node.status ➜ 3 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1702) | +| ForkJoinPool.managedBlock(ConditionNode#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1707) | | ForkJoinPool.unmanagedBlock(ConditionNode#1) at ForkJoinPool.managedBlock(ForkJoinPool.java:3725) | | blocker.isReleasable(): false at ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3780) | | blocker.block() at ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3780) | @@ -23,39 +34,3 @@ The following interleaving leads to the error: | PARK at LockSupport.park(LockSupport.java:371) | | -------------------------------------------------------------------------------------------------------------------------------------------------- | All unfinished threads are in deadlock - -Detailed trace: -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Main Thread | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | -| lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:417) | -| sync.lockInterruptibly() at ReentrantLock.lockInterruptibly(ReentrantLock.java:372) | -| initialTryLock(): true at ReentrantLock$Sync.lockInterruptibly(ReentrantLock.java:160) | -| compareAndSetState(0, 1): true at ReentrantLock$NonfairSync.initialTryLock(ReentrantLock.java:225) | -| Unsafe#1.compareAndSetInt(NonfairSync#1, 16, 0, 1): true at AbstractQueuedSynchronizer.compareAndSetState(AbstractQueuedSynchronizer.java:569) | -| notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:420) | -| newConditionNode(): ConditionNode#1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1697) | -| this$0.tryInitializeHead(): ExclusiveNode#1 at AbstractQueuedSynchronizer$ConditionObject.newConditionNode(AbstractQueuedSynchronizer.java:1625) | -| Unsafe#1.compareAndSetReference(NonfairSync#1, 20, null, ExclusiveNode#1): true at AbstractQueuedSynchronizer.tryInitializeHead(AbstractQueuedSynchronizer.java:596) | -| enableWait(ConditionNode#1): 1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1700) | -| node.setStatusRelaxed(3) at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1567) | -| Unsafe#1.putInt(ConditionNode#1, 12, 3) at AbstractQueuedSynchronizer$Node.setStatusRelaxed(AbstractQueuedSynchronizer.java:487) | -| LockSupport.setCurrentBlocker(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1701) | -| Unsafe#1.putReferenceOpaque(Thread#0, 92, ConditionObject#1) at LockSupport.setCurrentBlocker(LockSupport.java:162) | -| canReacquire(ConditionNode#1): false at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1703) | -| node.prev ➜ null at AbstractQueuedSynchronizer$ConditionObject.canReacquire(AbstractQueuedSynchronizer.java:1591) | -| node.status ➜ 3 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1707) | -| ForkJoinPool.managedBlock(ConditionNode#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1712) | -| ForkJoinPool.unmanagedBlock(ConditionNode#1) at ForkJoinPool.managedBlock(ForkJoinPool.java:3725) | -| blocker.isReleasable(): false at ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3780) | -| status ➜ 3 at AbstractQueuedSynchronizer$ConditionNode.isReleasable(AbstractQueuedSynchronizer.java:515) | -| blocker.block() at ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3780) | -| isReleasable(): false at AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:519) | -| status ➜ 3 at AbstractQueuedSynchronizer$ConditionNode.isReleasable(AbstractQueuedSynchronizer.java:515) | -| LockSupport.park() at AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:519) | -| PARK at LockSupport.park(LockSupport.java:371) | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -All unfinished threads are in deadlock diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_jdk8.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_jdk8.txt index 1e5af4f3a3..d871e26c72 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_jdk8.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_jdk8.txt @@ -4,9 +4,20 @@ The following interleaving leads to the error: | -------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:99) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:104) | +| PARK at LockSupport.park(LockSupport.java:175) | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +All unfinished threads are in deadlock + +Detailed trace: +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:99) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:104) | | lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:400) | | notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:403) | | LockSupport.park(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) | @@ -14,24 +25,3 @@ The following interleaving leads to the error: | PARK at LockSupport.park(LockSupport.java:175) | | -------------------------------------------------------------------------------------------------------------------------------------------------- | All unfinished threads are in deadlock - -Detailed trace: -| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Main Thread | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | -| lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:400) | -| sync.acquireInterruptibly(1) at ReentrantLock.lockInterruptibly(ReentrantLock.java:335) | -| tryAcquire(1): true at AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1221) | -| nonfairTryAcquire(1): true at ReentrantLock$NonfairSync.tryAcquire(ReentrantLock.java:213) | -| compareAndSetState(0, 1): true at ReentrantLock$Sync.nonfairTryAcquire(ReentrantLock.java:133) | -| Unsafe#1.compareAndSwapInt(NonfairSync#1, 16, 0, 1): true at AbstractQueuedSynchronizer.compareAndSetState(AbstractQueuedSynchronizer.java:566) | -| notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:403) | -| LockSupport.park(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) | -| LockSupport.setBlocker(Thread#0, ConditionObject#1) at LockSupport.park(LockSupport.java:174) | -| Unsafe#1.putObject(Thread#0, 88, ConditionObject#1) at LockSupport.setBlocker(LockSupport.java:125) | -| PARK at LockSupport.park(LockSupport.java:175) | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -All unfinished threads are in deadlock diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_trace_debugger.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_trace_debugger.txt index edf02682d3..d4869af3f8 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_trace_debugger.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_trace_debugger.txt @@ -4,9 +4,20 @@ The following interleaving leads to the error: | -------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:99) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:104) | +| PARK at LockSupport.park(LockSupport.java:341) | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +All unfinished threads are in deadlock + +Detailed trace: +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:99) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:104) | | lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:417) | | count ➜ 0 at ArrayBlockingQueue.take(ArrayBlockingQueue.java:419) | | notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:420) | @@ -23,59 +34,3 @@ The following interleaving leads to the error: | PARK at LockSupport.park(LockSupport.java:341) | | -------------------------------------------------------------------------------------------------------------------------------------------------- | All unfinished threads are in deadlock - -Detailed trace: -| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Main Thread | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | -| lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:417) | -| sync.lockInterruptibly() at ReentrantLock.lockInterruptibly(ReentrantLock.java:372) | -| initialTryLock(): true at ReentrantLock$Sync.lockInterruptibly(ReentrantLock.java:160) | -| compareAndSetState(0, 1): true at ReentrantLock$NonfairSync.initialTryLock(ReentrantLock.java:225) | -| Unsafe#1.compareAndSetInt(NonfairSync#1, 16, 0, 1): true at AbstractQueuedSynchronizer.compareAndSetState(AbstractQueuedSynchronizer.java:556) | -| setExclusiveOwnerThread(Thread#0) at ReentrantLock$NonfairSync.initialTryLock(ReentrantLock.java:226) | -| exclusiveOwnerThread = Thread#0 at AbstractOwnableSynchronizer.setExclusiveOwnerThread(AbstractOwnableSynchronizer.java:74) | -| count ➜ 0 at ArrayBlockingQueue.take(ArrayBlockingQueue.java:419) | -| notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:420) | -| enableWait(ConditionNode#1): 1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1611) | -| this$0.isHeldExclusively(): true at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1502) | -| getExclusiveOwnerThread(): Thread#0 at ReentrantLock$Sync.isHeldExclusively(ReentrantLock.java:186) | -| exclusiveOwnerThread ➜ Thread#0 at AbstractOwnableSynchronizer.getExclusiveOwnerThread(AbstractOwnableSynchronizer.java:84) | -| node.waiter = Thread#0 at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1503) | -| node.setStatusRelaxed(3) at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1504) | -| Unsafe#1.putInt(ConditionNode#1, 12, 3) at AbstractQueuedSynchronizer$Node.setStatusRelaxed(AbstractQueuedSynchronizer.java:474) | -| lastWaiter ➜ null at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1505) | -| firstWaiter = ConditionNode#1 at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1507) | -| lastWaiter = ConditionNode#1 at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1510) | -| this$0.getState(): 1 at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1511) | -| state ➜ 1 at AbstractQueuedSynchronizer.getState(AbstractQueuedSynchronizer.java:532) | -| this$0.release(1): true at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1512) | -| tryRelease(1): true at AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1007) | -| getState(): 1 at ReentrantLock$Sync.tryRelease(ReentrantLock.java:173) | -| state ➜ 1 at AbstractQueuedSynchronizer.getState(AbstractQueuedSynchronizer.java:532) | -| getExclusiveOwnerThread(): Thread#0 at ReentrantLock$Sync.tryRelease(ReentrantLock.java:174) | -| exclusiveOwnerThread ➜ Thread#0 at AbstractOwnableSynchronizer.getExclusiveOwnerThread(AbstractOwnableSynchronizer.java:84) | -| setExclusiveOwnerThread(null) at ReentrantLock$Sync.tryRelease(ReentrantLock.java:178) | -| exclusiveOwnerThread = null at AbstractOwnableSynchronizer.setExclusiveOwnerThread(AbstractOwnableSynchronizer.java:74) | -| setState(0) at ReentrantLock$Sync.tryRelease(ReentrantLock.java:179) | -| state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:541) | -| head ➜ null at AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1008) | -| LockSupport.setCurrentBlocker(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1612) | -| Unsafe#1.putReferenceOpaque(Thread#0, 76, ConditionObject#1) at LockSupport.setCurrentBlocker(LockSupport.java:161) | -| canReacquire(ConditionNode#1): false at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1614) | -| node.prev ➜ null at AbstractQueuedSynchronizer$ConditionObject.canReacquire(AbstractQueuedSynchronizer.java:1527) | -| node.status ➜ 3 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1618) | -| ForkJoinPool.managedBlock(ConditionNode#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1623) | -| ForkJoinPool.unmanagedBlock(ConditionNode#1) at ForkJoinPool.managedBlock(ForkJoinPool.java:3436) | -| blocker.isReleasable(): false at ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3465) | -| status ➜ 3 at AbstractQueuedSynchronizer$ConditionNode.isReleasable(AbstractQueuedSynchronizer.java:502) | -| blocker.block() at ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3465) | -| isReleasable(): false at AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:506) | -| status ➜ 3 at AbstractQueuedSynchronizer$ConditionNode.isReleasable(AbstractQueuedSynchronizer.java:502) | -| LockSupport.park() at AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:506) | -| PARK at LockSupport.park(LockSupport.java:341) | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -All unfinished threads are in deadlock diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_trace_debugger_jdk11.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_trace_debugger_jdk11.txt index 3bf08cd0d2..4a0f2b2093 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_trace_debugger_jdk11.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_trace_debugger_jdk11.txt @@ -4,18 +4,10 @@ The following interleaving leads to the error: | -------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | -| lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:414) | -| count ➜ 0 at ArrayBlockingQueue.take(ArrayBlockingQueue.java:416) | -| notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:417) | -| addConditionWaiter(): Node#2 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2077) | -| this$0.fullyRelease(Node#2): 1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2078) | -| this$0.isOnSyncQueue(Node#2): false at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2080) | -| LockSupport.park(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081) | -| LockSupport.setBlocker(Thread#0, ConditionObject#1) at LockSupport.park(LockSupport.java:193) | -| PARK at LockSupport.park(LockSupport.java:194) | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:100) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:105) | +| PARK at LockSupport.park(LockSupport.java:194) | | -------------------------------------------------------------------------------------------------------------------------------------------------- | All unfinished threads are in deadlock @@ -23,49 +15,17 @@ Detailed trace: | -------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:100) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:105) | | lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:414) | -| sync.acquireInterruptibly(1) at ReentrantLock.lockInterruptibly(ReentrantLock.java:317) | -| tryAcquire(1): true at AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1262) | -| nonfairTryAcquire(1): true at ReentrantLock$NonfairSync.tryAcquire(ReentrantLock.java:199) | -| getState(): 0 at ReentrantLock$Sync.nonfairTryAcquire(ReentrantLock.java:128) | -| state ➜ 0 at AbstractQueuedSynchronizer.getState(AbstractQueuedSynchronizer.java:588) | -| compareAndSetState(0, 1): true at ReentrantLock$Sync.nonfairTryAcquire(ReentrantLock.java:130) | -| state.compareAndSet(0, 1): true at AbstractQueuedSynchronizer.compareAndSetState(AbstractQueuedSynchronizer.java:612) | -| setExclusiveOwnerThread(Thread#0) at ReentrantLock$Sync.nonfairTryAcquire(ReentrantLock.java:131) | -| exclusiveOwnerThread = Thread#0 at AbstractOwnableSynchronizer.setExclusiveOwnerThread(AbstractOwnableSynchronizer.java:74) | | count ➜ 0 at ArrayBlockingQueue.take(ArrayBlockingQueue.java:416) | | notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:417) | | addConditionWaiter(): Node#2 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2077) | -| this$0.isHeldExclusively(): true at AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1887) | -| getExclusiveOwnerThread(): Thread#0 at ReentrantLock$Sync.isHeldExclusively(ReentrantLock.java:162) | -| exclusiveOwnerThread ➜ Thread#0 at AbstractOwnableSynchronizer.getExclusiveOwnerThread(AbstractOwnableSynchronizer.java:84) | -| lastWaiter ➜ null at AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1889) | -| Node#1.waitStatus.set(-2) at AbstractQueuedSynchronizer$Node.(AbstractQueuedSynchronizer.java:527) | -| Node#1.thread.set(Thread#0) at AbstractQueuedSynchronizer$Node.(AbstractQueuedSynchronizer.java:528) | -| firstWaiter = Node#2 at AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1899) | -| lastWaiter = Node#2 at AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1902) | | this$0.fullyRelease(Node#2): 1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2078) | -| getState(): 1 at AbstractQueuedSynchronizer.fullyRelease(AbstractQueuedSynchronizer.java:1764) | -| state ➜ 1 at AbstractQueuedSynchronizer.getState(AbstractQueuedSynchronizer.java:588) | -| release(1): true at AbstractQueuedSynchronizer.fullyRelease(AbstractQueuedSynchronizer.java:1765) | -| tryRelease(1): true at AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1302) | -| getState(): 1 at ReentrantLock$Sync.tryRelease(ReentrantLock.java:147) | -| state ➜ 1 at AbstractQueuedSynchronizer.getState(AbstractQueuedSynchronizer.java:588) | -| getExclusiveOwnerThread(): Thread#0 at ReentrantLock$Sync.tryRelease(ReentrantLock.java:148) | -| exclusiveOwnerThread ➜ Thread#0 at AbstractOwnableSynchronizer.getExclusiveOwnerThread(AbstractOwnableSynchronizer.java:84) | -| setExclusiveOwnerThread(null) at ReentrantLock$Sync.tryRelease(ReentrantLock.java:153) | -| exclusiveOwnerThread = null at AbstractOwnableSynchronizer.setExclusiveOwnerThread(AbstractOwnableSynchronizer.java:74) | -| setState(0) at ReentrantLock$Sync.tryRelease(ReentrantLock.java:155) | -| state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:597) | -| head ➜ null at AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1303) | | this$0.isOnSyncQueue(Node#2): false at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2080) | -| node.waitStatus ➜ -2 at AbstractQueuedSynchronizer.isOnSyncQueue(AbstractQueuedSynchronizer.java:1673) | | LockSupport.park(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081) | | LockSupport.setBlocker(Thread#0, ConditionObject#1) at LockSupport.park(LockSupport.java:193) | -| Unsafe#1.putObject(Thread#0, 76, ConditionObject#1) at LockSupport.setBlocker(LockSupport.java:144) | | PARK at LockSupport.park(LockSupport.java:194) | | -------------------------------------------------------------------------------------------------------------------------------------------------- | All unfinished threads are in deadlock diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_trace_debugger_jdk21.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_trace_debugger_jdk21.txt index c3a7f1ece1..f95e4d85a9 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_trace_debugger_jdk21.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/main_thread_blocked_trace_debugger_jdk21.txt @@ -4,18 +4,29 @@ The following interleaving leads to the error: | -------------------------------------------------------------------------------------------------------------------------------------------------- | | Main Thread | | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:99) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:104) | +| PARK at LockSupport.park(LockSupport.java:371) | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +All unfinished threads are in deadlock + +Detailed trace: +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | +| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:99) | +| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:104) | | lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:417) | | count ➜ 0 at ArrayBlockingQueue.take(ArrayBlockingQueue.java:419) | | notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:420) | -| newConditionNode(): ConditionNode#1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1697) | -| enableWait(ConditionNode#1): 1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1700) | -| LockSupport.setCurrentBlocker(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1701) | -| canReacquire(ConditionNode#1): false at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1703) | -| node.status ➜ 3 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1707) | -| ForkJoinPool.managedBlock(ConditionNode#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1712) | +| newConditionNode(): ConditionNode#1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1692) | +| enableWait(ConditionNode#1): 1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1695) | +| LockSupport.setCurrentBlocker(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1696) | +| canReacquire(ConditionNode#1): false at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1698) | +| node.status ➜ 3 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1702) | +| ForkJoinPool.managedBlock(ConditionNode#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1707) | | ForkJoinPool.unmanagedBlock(ConditionNode#1) at ForkJoinPool.managedBlock(ForkJoinPool.java:3725) | | blocker.isReleasable(): false at ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3780) | | blocker.block() at ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3780) | @@ -24,67 +35,3 @@ The following interleaving leads to the error: | PARK at LockSupport.park(LockSupport.java:371) | | -------------------------------------------------------------------------------------------------------------------------------------------------- | All unfinished threads are in deadlock - -Detailed trace: -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Main Thread | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $this_runCatching.block() at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) | -| block() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:96) | -| q.take() at MainThreadBlockedRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:101) | -| lock.lockInterruptibly() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:417) | -| sync.lockInterruptibly() at ReentrantLock.lockInterruptibly(ReentrantLock.java:372) | -| initialTryLock(): true at ReentrantLock$Sync.lockInterruptibly(ReentrantLock.java:160) | -| compareAndSetState(0, 1): true at ReentrantLock$NonfairSync.initialTryLock(ReentrantLock.java:225) | -| Unsafe#1.compareAndSetInt(NonfairSync#1, 16, 0, 1): true at AbstractQueuedSynchronizer.compareAndSetState(AbstractQueuedSynchronizer.java:569) | -| setExclusiveOwnerThread(Thread#0) at ReentrantLock$NonfairSync.initialTryLock(ReentrantLock.java:226) | -| exclusiveOwnerThread = Thread#0 at AbstractOwnableSynchronizer.setExclusiveOwnerThread(AbstractOwnableSynchronizer.java:74) | -| count ➜ 0 at ArrayBlockingQueue.take(ArrayBlockingQueue.java:419) | -| notEmpty.await() at ArrayBlockingQueue.take(ArrayBlockingQueue.java:420) | -| newConditionNode(): ConditionNode#1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1697) | -| this$0.tryInitializeHead(): ExclusiveNode#1 at AbstractQueuedSynchronizer$ConditionObject.newConditionNode(AbstractQueuedSynchronizer.java:1625) | -| tail ➜ null at AbstractQueuedSynchronizer.tryInitializeHead(AbstractQueuedSynchronizer.java:584) | -| head ➜ null at AbstractQueuedSynchronizer.tryInitializeHead(AbstractQueuedSynchronizer.java:586) | -| Unsafe#1.compareAndSetReference(NonfairSync#1, 20, null, ExclusiveNode#1): true at AbstractQueuedSynchronizer.tryInitializeHead(AbstractQueuedSynchronizer.java:596) | -| tail = ExclusiveNode#1 at AbstractQueuedSynchronizer.tryInitializeHead(AbstractQueuedSynchronizer.java:597) | -| enableWait(ConditionNode#1): 1 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1700) | -| this$0.isHeldExclusively(): true at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1565) | -| getExclusiveOwnerThread(): Thread#0 at ReentrantLock$Sync.isHeldExclusively(ReentrantLock.java:186) | -| exclusiveOwnerThread ➜ Thread#0 at AbstractOwnableSynchronizer.getExclusiveOwnerThread(AbstractOwnableSynchronizer.java:84) | -| node.waiter = Thread#0 at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1566) | -| node.setStatusRelaxed(3) at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1567) | -| Unsafe#1.putInt(ConditionNode#1, 12, 3) at AbstractQueuedSynchronizer$Node.setStatusRelaxed(AbstractQueuedSynchronizer.java:487) | -| lastWaiter ➜ null at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1568) | -| firstWaiter = ConditionNode#1 at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1570) | -| lastWaiter = ConditionNode#1 at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1573) | -| this$0.getState(): 1 at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1574) | -| state ➜ 1 at AbstractQueuedSynchronizer.getState(AbstractQueuedSynchronizer.java:545) | -| this$0.release(1): true at AbstractQueuedSynchronizer$ConditionObject.enableWait(AbstractQueuedSynchronizer.java:1575) | -| tryRelease(1): true at AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1059) | -| getState(): 1 at ReentrantLock$Sync.tryRelease(ReentrantLock.java:173) | -| state ➜ 1 at AbstractQueuedSynchronizer.getState(AbstractQueuedSynchronizer.java:545) | -| getExclusiveOwnerThread(): Thread#0 at ReentrantLock$Sync.tryRelease(ReentrantLock.java:174) | -| exclusiveOwnerThread ➜ Thread#0 at AbstractOwnableSynchronizer.getExclusiveOwnerThread(AbstractOwnableSynchronizer.java:84) | -| setExclusiveOwnerThread(null) at ReentrantLock$Sync.tryRelease(ReentrantLock.java:178) | -| exclusiveOwnerThread = null at AbstractOwnableSynchronizer.setExclusiveOwnerThread(AbstractOwnableSynchronizer.java:74) | -| setState(0) at ReentrantLock$Sync.tryRelease(ReentrantLock.java:179) | -| state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:554) | -| head ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1060) | -| AbstractQueuedSynchronizer.signalNext(ExclusiveNode#1) at AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1060) | -| h.next ➜ null at AbstractQueuedSynchronizer.signalNext(AbstractQueuedSynchronizer.java:643) | -| LockSupport.setCurrentBlocker(ConditionObject#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1701) | -| Unsafe#1.putReferenceOpaque(Thread#0, 92, ConditionObject#1) at LockSupport.setCurrentBlocker(LockSupport.java:162) | -| canReacquire(ConditionNode#1): false at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1703) | -| node.prev ➜ null at AbstractQueuedSynchronizer$ConditionObject.canReacquire(AbstractQueuedSynchronizer.java:1591) | -| node.status ➜ 3 at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1707) | -| ForkJoinPool.managedBlock(ConditionNode#1) at AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1712) | -| ForkJoinPool.unmanagedBlock(ConditionNode#1) at ForkJoinPool.managedBlock(ForkJoinPool.java:3725) | -| blocker.isReleasable(): false at ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3780) | -| status ➜ 3 at AbstractQueuedSynchronizer$ConditionNode.isReleasable(AbstractQueuedSynchronizer.java:515) | -| blocker.block() at ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3780) | -| isReleasable(): false at AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:519) | -| status ➜ 3 at AbstractQueuedSynchronizer$ConditionNode.isReleasable(AbstractQueuedSynchronizer.java:515) | -| LockSupport.park() at AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:519) | -| PARK at LockSupport.park(LockSupport.java:371) | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -All unfinished threads are in deadlock diff --git a/src/jvm/test/resources/expected_logs/run_concurrent_test/no_events.txt b/src/jvm/test/resources/expected_logs/run_concurrent_test/no_events.txt index e6176863a9..1fe33e751b 100644 --- a/src/jvm/test/resources/expected_logs/run_concurrent_test/no_events.txt +++ b/src/jvm/test/resources/expected_logs/run_concurrent_test/no_events.txt @@ -1,15 +1,15 @@ = Concurrent test failed = java.lang.IllegalStateException: Check failed. - at org.jetbrains.kotlinx.lincheck_test.representation.NoEventsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:71) - at org.jetbrains.kotlinx.lincheck_test.representation.NoEventsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:67) - at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:47) + at org.jetbrains.kotlinx.lincheck_test.representation.NoEventsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:74) + at org.jetbrains.kotlinx.lincheck_test.representation.NoEventsRunConcurrentRepresentationTest.block(RunConcurrentRepresentationTests.kt:70) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) at java.base/java.lang.Thread.run(Thread.java:840) The following interleaving leads to the error: -| ---------------------------------- | -| Main Thread | -| ---------------------------------- | -| result: IllegalStateException #1 | -| ---------------------------------- | +| -------------------------------- | +| Main Thread | +| -------------------------------- | +| result: IllegalStateException #1 | +| -------------------------------- | diff --git a/src/jvm/test/resources/expected_logs/semaphore_switch.txt b/src/jvm/test/resources/expected_logs/semaphore_switch.txt new file mode 100644 index 0000000000..1f056e84d5 --- /dev/null +++ b/src/jvm/test/resources/expected_logs/semaphore_switch.txt @@ -0,0 +1,85 @@ += Concurrent test failed = + +java.lang.IllegalStateException: Check failed. + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:49) + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) + at java.base/java.lang.Thread.run(Unknown Source) + +The following interleaving leads to the error: +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | Thread 1 | Thread 2 | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:541) | | | +| NonfairSync#2.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:541) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | PARK at LockSupport.park(LockSupport.java:211) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + +Detailed trace: +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Main Thread | Thread 1 | Thread 2 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:541) | | | +| NonfairSync#2.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:541) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | sync.acquireSharedInterruptibly(1) at Semaphore.acquire(Semaphore.java:318) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1046) | | +| | acquire(null, 1, true, true, false, 0): 1 at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1047) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:670) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:670) | | +| | tail ➜ null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:698) | | +| | node.setPrevRelaxed(null) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:699) | | +| | tryInitializeHead() at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:701) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:670) | | +| | tail ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:698) | | +| | node.setPrevRelaxed(ExclusiveNode#1) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:699) | | +| | casTail(ExclusiveNode#1, SharedNode#1): true at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:702) | | +| | head.next = SharedNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:705) | | +| | node.prev ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:656) | | +| | head ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:656) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:670) | | +| | node.status ➜ 0 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:709) | | +| | node.status = 1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:710) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:670) | | +| | node.status ➜ 1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:709) | | +| | LockSupport.park(NonfairSync#4) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:715) | | +| | LockSupport.setBlocker(Thread#1, NonfairSync#4) at LockSupport.park(LockSupport.java:210) | | +| | PARK at LockSupport.park(LockSupport.java:211) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| | LockSupport.setBlocker(Thread#1, null) at LockSupport.park(LockSupport.java:212) | | +| | node.clearStatus() at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:720) | | +| | tryAcquireShared(1): 0 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:670) | | +| | node.prev = null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:679) | | +| | head = SharedNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:680) | | +| | pred.next = null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:681) | | +| | node.waiter = null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:682) | | +| | AbstractQueuedSynchronizer.signalNextIfShared(SharedNode#1) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:684) | | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | diff --git a/src/jvm/test/resources/expected_logs/semaphore_switch_jdk11.txt b/src/jvm/test/resources/expected_logs/semaphore_switch_jdk11.txt new file mode 100644 index 0000000000..694d5430bd --- /dev/null +++ b/src/jvm/test/resources/expected_logs/semaphore_switch_jdk11.txt @@ -0,0 +1,76 @@ += Concurrent test failed = + +java.lang.IllegalStateException: Check failed. + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:49) + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) + at java.base/java.lang.Thread.run(Unknown Source) + +The following interleaving leads to the error: +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | Thread 1 | Thread 2 | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:597) | | | +| NonfairSync#2.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:597) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | PARK at LockSupport.park(LockSupport.java:194) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + +Detailed trace: +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | Thread 1 | Thread 2 | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:597) | | | +| NonfairSync#2.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:597) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | sync.acquireSharedInterruptibly(1) at Semaphore.acquire(Semaphore.java:318) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1344) | | +| | doAcquireSharedInterruptibly(1) at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1345) | | +| | addWaiter(Node#1): Node#3 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1026) | | +| | node.predecessor(): Node#2 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1029) | | +| | head ➜ Node#2 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1030) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1031) | | +| | AbstractQueuedSynchronizer.shouldParkAfterFailedAcquire(Node#2, Node#3): false at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1038) | | +| | node.predecessor(): Node#2 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1029) | | +| | head ➜ Node#2 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1030) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1031) | | +| | AbstractQueuedSynchronizer.shouldParkAfterFailedAcquire(Node#2, Node#3): true at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1038) | | +| | parkAndCheckInterrupt(): false at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1039) | | +| | LockSupport.park(NonfairSync#4) at AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:885) | | +| | LockSupport.setBlocker(Thread#1, NonfairSync#4) at LockSupport.park(LockSupport.java:193) | | +| | PARK at LockSupport.park(LockSupport.java:194) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| | LockSupport.setBlocker(Thread#1, null) at LockSupport.park(LockSupport.java:195) | | +| | node.predecessor(): Node#2 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1029) | | +| | head ➜ Node#2 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1030) | | +| | tryAcquireShared(1): 0 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1031) | | +| | setHeadAndPropagate(Node#3, 0) at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1033) | | +| | head.next = null at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1034) | | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/src/jvm/test/resources/expected_logs/semaphore_switch_jdk21.txt b/src/jvm/test/resources/expected_logs/semaphore_switch_jdk21.txt new file mode 100644 index 0000000000..9bea47d702 --- /dev/null +++ b/src/jvm/test/resources/expected_logs/semaphore_switch_jdk21.txt @@ -0,0 +1,87 @@ += Concurrent test failed = + +java.lang.IllegalStateException: Check failed. + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:49) + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) + at java.base/java.lang.Thread.run(Unknown Source) + +The following interleaving leads to the error: +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | Thread 1 | Thread 2 | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:554) | | | +| NonfairSync#2.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:554) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | PARK at LockSupport.park(LockSupport.java:221) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + +Detailed trace: +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Main Thread | Thread 1 | Thread 2 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:48) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:554) | | | +| NonfairSync#2.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:554) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | sync.acquireSharedInterruptibly(1) at Semaphore.acquire(Semaphore.java:318) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1098) | | +| | acquire(null, 1, true, true, false, 0): 1 at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1099) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:707) | | +| | tail ➜ null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:729) | | +| | tryInitializeHead(): ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:730) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:707) | | +| | tail ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:729) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:707) | | +| | tail ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:729) | | +| | node.setPrevRelaxed(ExclusiveNode#1) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:740) | | +| | casTail(ExclusiveNode#1, SharedNode#1): true at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:741) | | +| | head.next = SharedNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:744) | | +| | node.prev ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:693) | | +| | head ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:693) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:707) | | +| | tail ➜ SharedNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:729) | | +| | node.status ➜ 0 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:748) | | +| | node.status = 1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:749) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:707) | | +| | tail ➜ SharedNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:729) | | +| | node.status ➜ 1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:748) | | +| | LockSupport.park(NonfairSync#4) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:754) | | +| | LockSupport.setBlocker(Thread#1, NonfairSync#4) at LockSupport.park(LockSupport.java:216) | | +| | PARK at LockSupport.park(LockSupport.java:221) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| | LockSupport.setBlocker(Thread#1, null) at LockSupport.park(LockSupport.java:224) | | +| | node.clearStatus() at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:759) | | +| | tryAcquireShared(1): 0 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:707) | | +| | node.prev = null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:716) | | +| | head = SharedNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:717) | | +| | pred.next = null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:718) | | +| | node.waiter = null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:719) | | +| | AbstractQueuedSynchronizer.signalNextIfShared(SharedNode#1) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:721) | | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | diff --git a/src/jvm/test/resources/expected_logs/semaphore_switch_jdk8.txt b/src/jvm/test/resources/expected_logs/semaphore_switch_jdk8.txt new file mode 100644 index 0000000000..c452318727 --- /dev/null +++ b/src/jvm/test/resources/expected_logs/semaphore_switch_jdk8.txt @@ -0,0 +1,76 @@ += Concurrent test failed = + +java.lang.IllegalStateException: Check failed. + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:49) + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) + at java.lang.Thread.run(Thread.java:750) + +The following interleaving leads to the error: +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | Thread 1 | Thread 2 | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:550) | | | +| NonfairSync#2.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:550) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | PARK at LockSupport.park(LockSupport.java:175) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + +Detailed trace: +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | Thread 1 | Thread 2 | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:550) | | | +| NonfairSync#2.state = 0 at AbstractQueuedSynchronizer.setState(AbstractQueuedSynchronizer.java:550) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | sync.acquireSharedInterruptibly(1) at Semaphore.acquire(Semaphore.java:312) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1303) | | +| | doAcquireSharedInterruptibly(1) at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304) | | +| | addWaiter(Node#1): Node#2 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:982) | | +| | tail.predecessor(): Node#3 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:986) | | +| | head ➜ Node#3 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:987) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:988) | | +| | AbstractQueuedSynchronizer.shouldParkAfterFailedAcquire(Node#3, Node#2): false at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:996) | | +| | tail.predecessor(): Node#3 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:986) | | +| | head ➜ Node#3 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:987) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:988) | | +| | AbstractQueuedSynchronizer.shouldParkAfterFailedAcquire(Node#3, Node#2): true at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:996) | | +| | parkAndCheckInterrupt(): false at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997) | | +| | LockSupport.park(NonfairSync#4) at AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836) | | +| | LockSupport.setBlocker(Thread#1, NonfairSync#4) at LockSupport.park(LockSupport.java:174) | | +| | PARK at LockSupport.park(LockSupport.java:175) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| | LockSupport.setBlocker(Thread#1, null) at LockSupport.park(LockSupport.java:176) | | +| | tail.predecessor(): Node#3 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:986) | | +| | head ➜ Node#3 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:987) | | +| | tryAcquireShared(1): 0 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:988) | | +| | setHeadAndPropagate(Node#2, 0) at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:990) | | +| | head.next = null at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:991) | | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/src/jvm/test/resources/expected_logs/semaphore_switch_trace_debugger.txt b/src/jvm/test/resources/expected_logs/semaphore_switch_trace_debugger.txt new file mode 100644 index 0000000000..e258110e7b --- /dev/null +++ b/src/jvm/test/resources/expected_logs/semaphore_switch_trace_debugger.txt @@ -0,0 +1,89 @@ += Concurrent test failed = + +java.lang.IllegalStateException: Check failed. + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:49) + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) + at java.base/java.lang.Thread.run(Unknown Source) + +The following interleaving leads to the error: +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | Thread 1 | Thread 2 | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.setState(0) at Semaphore$Sync.(Semaphore.java:176) | | | +| NonfairSync#2.setState(0) at Semaphore$Sync.(Semaphore.java:176) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | PARK at LockSupport.park(LockSupport.java:211) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + +Detailed trace: +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Main Thread | Thread 1 | Thread 2 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.setState(0) at Semaphore$Sync.(Semaphore.java:176) | | | +| NonfairSync#2.setState(0) at Semaphore$Sync.(Semaphore.java:176) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | sync.acquireSharedInterruptibly(1) at Semaphore.acquire(Semaphore.java:318) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1046) | | +| | acquire(null, 1, true, true, false, 0): 1 at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1047) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:670) | | +| | node.prev ➜ null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:656) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:670) | | +| | node.waiter = Thread#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:697) | | +| | tail ➜ null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:698) | | +| | node.setPrevRelaxed(null) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:699) | | +| | tryInitializeHead() at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:701) | | +| | node.prev ➜ null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:656) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:670) | | +| | node.waiter = Thread#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:697) | | +| | tail ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:698) | | +| | node.setPrevRelaxed(ExclusiveNode#1) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:699) | | +| | casTail(ExclusiveNode#1, SharedNode#1): true at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:702) | | +| | head.next = SharedNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:705) | | +| | node.prev ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:656) | | +| | head ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:656) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:670) | | +| | node.status ➜ 0 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:709) | | +| | node.status = 1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:710) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:670) | | +| | node.status ➜ 1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:709) | | +| | LockSupport.park(NonfairSync#4) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:715) | | +| | LockSupport.setBlocker(Thread#1, NonfairSync#4) at LockSupport.park(LockSupport.java:210) | | +| | PARK at LockSupport.park(LockSupport.java:211) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| | LockSupport.setBlocker(Thread#1, null) at LockSupport.park(LockSupport.java:212) | | +| | node.clearStatus() at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:720) | | +| | tryAcquireShared(1): 0 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:670) | | +| | node.prev = null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:679) | | +| | head = SharedNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:680) | | +| | pred.next = null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:681) | | +| | node.waiter = null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:682) | | +| | AbstractQueuedSynchronizer.signalNextIfShared(SharedNode#1) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:684) | | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | diff --git a/src/jvm/test/resources/expected_logs/semaphore_switch_trace_debugger_jdk11.txt b/src/jvm/test/resources/expected_logs/semaphore_switch_trace_debugger_jdk11.txt new file mode 100644 index 0000000000..e7e7fd112f --- /dev/null +++ b/src/jvm/test/resources/expected_logs/semaphore_switch_trace_debugger_jdk11.txt @@ -0,0 +1,76 @@ += Concurrent test failed = + +java.lang.IllegalStateException: Check failed. + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:49) + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) + at java.base/java.lang.Thread.run(Unknown Source) + +The following interleaving leads to the error: +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | Thread 1 | Thread 2 | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.setState(0) at Semaphore$Sync.(Semaphore.java:176) | | | +| NonfairSync#2.setState(0) at Semaphore$Sync.(Semaphore.java:176) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | PARK at LockSupport.park(LockSupport.java:194) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + +Detailed trace: +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | Thread 1 | Thread 2 | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.setState(0) at Semaphore$Sync.(Semaphore.java:176) | | | +| NonfairSync#2.setState(0) at Semaphore$Sync.(Semaphore.java:176) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | sync.acquireSharedInterruptibly(1) at Semaphore.acquire(Semaphore.java:318) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1344) | | +| | doAcquireSharedInterruptibly(1) at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1345) | | +| | addWaiter(Node#1): Node#2 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1026) | | +| | node.predecessor(): Node#3 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1029) | | +| | head ➜ Node#3 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1030) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1031) | | +| | AbstractQueuedSynchronizer.shouldParkAfterFailedAcquire(Node#3, Node#2): false at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1038) | | +| | node.predecessor(): Node#3 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1029) | | +| | head ➜ Node#3 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1030) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1031) | | +| | AbstractQueuedSynchronizer.shouldParkAfterFailedAcquire(Node#3, Node#2): true at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1038) | | +| | parkAndCheckInterrupt(): false at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1039) | | +| | LockSupport.park(NonfairSync#4) at AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:885) | | +| | LockSupport.setBlocker(Thread#1, NonfairSync#4) at LockSupport.park(LockSupport.java:193) | | +| | PARK at LockSupport.park(LockSupport.java:194) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| | LockSupport.setBlocker(Thread#1, null) at LockSupport.park(LockSupport.java:195) | | +| | node.predecessor(): Node#3 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1029) | | +| | head ➜ Node#3 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1030) | | +| | tryAcquireShared(1): 0 at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1031) | | +| | setHeadAndPropagate(Node#2, 0) at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1033) | | +| | head.next = null at AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1034) | | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/src/jvm/test/resources/expected_logs/semaphore_switch_trace_debugger_jdk21.txt b/src/jvm/test/resources/expected_logs/semaphore_switch_trace_debugger_jdk21.txt new file mode 100644 index 0000000000..24ae56a0cc --- /dev/null +++ b/src/jvm/test/resources/expected_logs/semaphore_switch_trace_debugger_jdk21.txt @@ -0,0 +1,89 @@ += Concurrent test failed = + +java.lang.IllegalStateException: Check failed. + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:49) + at org.jetbrains.kotlinx.lincheck_test.representation.SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) + at org.jetbrains.kotlinx.lincheck_test.representation.BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) + at java.base/java.lang.Thread.run(Unknown Source) + +The following interleaving leads to the error: +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Main Thread | Thread 1 | Thread 2 | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.setState(0) at Semaphore$Sync.(Semaphore.java:176) | | | +| NonfairSync#2.setState(0) at Semaphore$Sync.(Semaphore.java:176) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | PARK at LockSupport.park(LockSupport.java:221) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + +Detailed trace: +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Main Thread | Thread 1 | Thread 2 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| $this_runCatching.block(): threw IllegalStateException at BaseRunConcurrentRepresentationTest.testRunWithModelChecker$lambda$1$lambda$0(RunConcurrentRepresentationTests.kt:49) | | | +| block(): threw IllegalStateException at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:31) | | | +| NonfairSync#1.setState(0) at Semaphore$Sync.(Semaphore.java:176) | | | +| NonfairSync#2.setState(0) at Semaphore$Sync.(Semaphore.java:176) | | | +| thread(block = Lambda#2): Thread#1 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:37) | | | +| thread(block = Lambda#3): Thread#2 at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:42) | | | +| switch (reason: waiting for Thread 1 to finish) | | | +| | run() | | +| | $semB.release() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:38) | | +| | $semA.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$0(ReentrantLockRepresentationTests.kt:39) | | +| | sync.acquireSharedInterruptibly(1) at Semaphore.acquire(Semaphore.java:318) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1098) | | +| | acquire(null, 1, true, true, false, 0): 1 at AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1099) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:707) | | +| | tail ➜ null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:729) | | +| | tryInitializeHead(): ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:730) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:707) | | +| | tail ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:729) | | +| | node.prev ➜ null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:693) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:707) | | +| | tail ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:729) | | +| | node.waiter = Thread#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:739) | | +| | node.setPrevRelaxed(ExclusiveNode#1) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:740) | | +| | casTail(ExclusiveNode#1, SharedNode#1): true at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:741) | | +| | head.next = SharedNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:744) | | +| | node.prev ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:693) | | +| | head ➜ ExclusiveNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:693) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:707) | | +| | tail ➜ SharedNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:729) | | +| | node.status ➜ 0 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:748) | | +| | node.status = 1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:749) | | +| | tryAcquireShared(1): -1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:707) | | +| | tail ➜ SharedNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:729) | | +| | node.status ➜ 1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:748) | | +| | LockSupport.park(NonfairSync#4) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:754) | | +| | LockSupport.setBlocker(Thread#1, NonfairSync#4) at LockSupport.park(LockSupport.java:216) | | +| | PARK at LockSupport.park(LockSupport.java:221) | | +| | switch (reason: thread is parked) | | +| | | run() | +| | | $semB.acquire() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:43) | +| | | $semA.release() at SemaphoreSwitchRepresentationTest.block$lambda$1(ReentrantLockRepresentationTests.kt:44) | +| | LockSupport.setBlocker(Thread#1, null) at LockSupport.park(LockSupport.java:224) | | +| | node.clearStatus() at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:759) | | +| | tryAcquireShared(1): 0 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:707) | | +| | node.prev = null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:716) | | +| | head = SharedNode#1 at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:717) | | +| | pred.next = null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:718) | | +| | node.waiter = null at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:719) | | +| | AbstractQueuedSynchronizer.signalNextIfShared(SharedNode#1) at AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:721) | | +| Thread#1.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:47) | | | +| Thread#2.join() at SemaphoreSwitchRepresentationTest.block(ReentrantLockRepresentationTests.kt:48) | | | +| result: IllegalStateException #1 | | | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | diff --git a/src/jvm/test/resources/expected_logs/unsafe_collection_switch_point.txt b/src/jvm/test/resources/expected_logs/unsafe_collection_switch_point.txt index 44501e25f9..1687e1e73c 100644 --- a/src/jvm/test/resources/expected_logs/unsafe_collection_switch_point.txt +++ b/src/jvm/test/resources/expected_logs/unsafe_collection_switch_point.txt @@ -10,19 +10,9 @@ The following interleaving leads to the error: | Thread 1 | Thread 2 | | ------------------------------------------------------------------------------------------------------------ | | | put2(): null | -| | hm.put(1, 2): null at UnsafeCollectionSwitchPointTest.put2(StdLibRepresentationTests.kt:86) | -| | putVal(1, 1, 2, false, true): null at HashMap.put(HashMap.java:610) | -| | table ➜ null at HashMap.putVal(HashMap.java:626) | -| | resize(): Array#1 at HashMap.putVal(HashMap.java:627) | -| | Array#1[1] ➜ null at HashMap.putVal(HashMap.java:628) | -| | switch | +| | hm.put(1, 2): null at UnsafeCollectionSwitchPointTest.put2(StdLibRepresentationTests.kt:89) | +| | switch | | put1(): null | | -| | Array#1[1] = Node#1 at HashMap.putVal(HashMap.java:629) | -| | modCount ➜ 1 at HashMap.putVal(HashMap.java:659) | -| | modCount = 2 at HashMap.putVal(HashMap.java:659) | -| | size ➜ 1 at HashMap.putVal(HashMap.java:660) | -| | size = 2 at HashMap.putVal(HashMap.java:660) | -| | threshold ➜ 12 at HashMap.putVal(HashMap.java:660) | | | result: null | | ------------------------------------------------------------------------------------------------------------ | @@ -31,14 +21,14 @@ Detailed trace: | Thread 1 | Thread 2 | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | put2(): null | -| | hm.put(1, 2): null at UnsafeCollectionSwitchPointTest.put2(StdLibRepresentationTests.kt:86) | +| | hm.put(1, 2): null at UnsafeCollectionSwitchPointTest.put2(StdLibRepresentationTests.kt:89) | | | putVal(1, 1, 2, false, true): null at HashMap.put(HashMap.java:610) | | | table ➜ null at HashMap.putVal(HashMap.java:626) | | | resize(): Array#1 at HashMap.putVal(HashMap.java:627) | | | Array#1[1] ➜ null at HashMap.putVal(HashMap.java:628) | | | switch | | put1(): null | | -| hm.put(1, 1): null at UnsafeCollectionSwitchPointTest.put1(StdLibRepresentationTests.kt:83) | | +| hm.put(1, 1): null at UnsafeCollectionSwitchPointTest.put1(StdLibRepresentationTests.kt:86) | | | result: null | | | | Array#1[1] = Node#1 at HashMap.putVal(HashMap.java:629) | | | modCount ➜ 1 at HashMap.putVal(HashMap.java:659) |