Skip to content

Fix os::naked_short_nanosleep on OpenBSD when < 20 miliseconds. - #68

Merged
bsdkurt merged 1 commit into
battleblow:bsd-portfrom
bsdkurt:obsd.sleep
Jul 23, 2026
Merged

Fix os::naked_short_nanosleep on OpenBSD when < 20 miliseconds.#68
bsdkurt merged 1 commit into
battleblow:bsd-portfrom
bsdkurt:obsd.sleep

Conversation

@bsdkurt

@bsdkurt bsdkurt commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

nanosleep(2) on OpenBSD is currently accurate down to 20 miliseconds. Below 20 miliseconds, use a busy loop with SpinPause. This fixes serviceability/jvmti/vthread/ThreadStateTest/ThreadStateTest failure on OpenBSD.


nanosleep(2) on OpenBSD is currently accurate down to 20 miliseconds.
Below 20 miliseconds, use a busy loop with SpinPause. This fixes
serviceability/jvmti/vthread/ThreadStateTest/ThreadStateTest failure
on OpenBSD.
@bsdkurt

bsdkurt commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator Author

It took a few tries to pass java/math/BigInteger/largeMemory/SymmetricRangeTests.java on OpenBSD in GHA. I believe that is unrelated to this change though. I ran that test 100 times on my hardware on both amd64 and aarch64 and it is not reproducible for me outside GHA.

@bsdkurt
bsdkurt requested review from battleblow and snake66 July 22, 2026 14:24

@snake66 snake66 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find!

@bsdkurt
bsdkurt merged commit a1eb718 into battleblow:bsd-port Jul 23, 2026
373 of 375 checks passed
@bsdkurt
bsdkurt deleted the obsd.sleep branch July 23, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants