Skip to content

Possible bug found in JDK 21​ #103

@YuSu2024

Description

@YuSu2024

When using virtual threads in JDK 21, calling Thread.yield() during scheduling causes the corresponding virtual thread to enter an infinite loop instead of yielding the CPU, resulting in 100% CPU usage. However, when I replaced it with Thread.sleep(1), the issue disappeared.

Additionally, I tested this on my development machine (Windows 10, Microsoft OpenJDK 21), and the problem never occurred. I have the corresponding JFR file and would appreciate it if you could contact me to obtain the file and help resolve this issue.

yu.su.ext@1m.app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions