Skip to content

Tests for kotlinx-coroutines-debug module fail on OpenJDK 17 due to changed internals #3700

@FenstonSingel

Description

@FenstonSingel

When running on OpenJDK 17 (and down to OpenJDK 14 according to my checks of corresponding sources), RunningThreadStackMergeTest fails on testStackMergeWithContext, testStackMergeEscapeSuspendMethod, and testMergeThroughInvokeSuspend. The reason is a change in OpenJDK's java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject. This change results in a stack dump that differs from expected one by three new frames:

Coroutine "coroutine#X":StandaloneCoroutine{Active}@ADDR, state: RUNNING at
[email protected]/jdk.internal.misc.Unsafe.park(Native Method)
at [email protected]/java.util.concurrent.locks.LockSupport.park(LockSupport.java:341)
+NEW+ at [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:506)
+NEW+ at [email protected]/java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3463)
+NEW+ at [email protected]/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3434)
at [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1623)
at [email protected]/java.util.concurrent.CyclicBarrier.dowait(CyclicBarrier.java:236)
at [email protected]/java.util.concurrent.CyclicBarrier.await(CyclicBarrier.java:364)

(nb: line numbers most probably also differ, but that's not really that relevant)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions