Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spin-loop representation #555

Open
eupp opened this issue Mar 3, 2025 · 0 comments
Open

Fix spin-loop representation #555

eupp opened this issue Mar 3, 2025 · 0 comments

Comments

@eupp
Copy link
Collaborator

eupp commented Mar 3, 2025

Due to some bug, spin loops can be represented incorrectly: spin-loop arrow and spin-loop nestedness is broken.

Example:

|             BlockingEventLoop#1.processNextEvent(): 9223372036854775807 at BlockingCoroutine.joinBlocking(Builders.kt:85)    |                                                                                                                                                                          |                                                                                                                                                                                            |
|             | isCompleted(): false at BlockingCoroutine.joinBlocking(Builders.kt:87)                                         |                                                                                                                                                                          |                                                                                                                                                                                            |
|             | AbstractTimeSourceKt.getTimeSource(): null at BlockingCoroutine.joinBlocking(Builders.kt:88)                   |
|             | LockSupport.parkNanos(<cont>, 9223372036854775807) at BlockingCoroutine.joinBlocking(Builders.kt:88)           |
|             | BlockingEventLoop#1.processNextEvent(): 9223372036854775807 at BlockingCoroutine.joinBlocking(Builders.kt:85)  |
|             | processUnconfinedEvent(): false at EventLoopImplBase.processNextEvent(EventLoop.common.kt:260)                 |
|             | _delayed.get(): null at EventLoopImplBase.processNextEvent(EventLoop.common.kt:262)                            |
|             | dequeue(): null at EventLoopImplBase.processNextEvent(EventLoop.common.kt:278)                                 |
|             | getNextTime(): 9223372036854775807 at EventLoopImplBase.processNextEvent(EventLoop.common.kt:283)              |
|             |   getNextTime(): 9223372036854775807 at EventLoopImplBase.getNextTime(EventLoop.common.kt:205)                 |
|             └╶╶ switch (reason: active lock detected)                                                                        |

https://github.com/JetBrains/lincheck/blob/39a959952b0df23fb52b16a093b147198d854c17/src/jvm/test/resources/expected_logs/run_concurrent_test/coroutines/coroutines_jdk17.txt#L70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant