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

Ignore the result of pthread_kill in ubf_wakeup_thread #10594

Merged
merged 1 commit into from May 7, 2024

Conversation

jeremyevans
Copy link
Contributor

After an upgrade to Ruby 3.3.0, I experienced reproducible production crashes of the form:

[BUG] pthread_kill: No such process (ESRCH)

This is the only pthread_kill call in Ruby. The result of pthread_kill was previously ignored in Ruby 3.2 and below. Checking the result was added in be1bbd5 (MaNy).

I have not yet been able to create a minimal self-contained example, but it should be safe to remove the checks.

After an upgrade to Ruby 3.3.0, I experienced reproducible production crashes
of the form:

[BUG] pthread_kill: No such process (ESRCH)

This is the only pthread_kill call in Ruby. The result of pthread_kill was
previously ignored in Ruby 3.2 and below. Checking the result was added in
be1bbd5 (MaNy).

I have not yet been able to create a minimal self-contained example,
but it should be safe to remove the checks.
@jeremyevans jeremyevans requested a review from ko1 April 22, 2024 03:18
@nobu
Copy link
Member

nobu commented Apr 22, 2024

No clue by enabling USE_RUBY_DEBUG_LOG?

@kosaki
Copy link
Member

kosaki commented Apr 22, 2024

LGTM

@jeremyevans
Copy link
Contributor Author

No clue by enabling USE_RUBY_DEBUG_LOG?

I haven't had a chance to do that. ESRCH means the thread id given is invalid. Maybe it already exited and just needs to be joined, or maybe this an an OpenBSD-specific issue. In discussion with @ko1, he said the result of pthread_kill can be ignored.

@kosaki
Copy link
Member

kosaki commented May 4, 2024

No clue by enabling USE_RUBY_DEBUG_LOG?

I haven't had a chance to do that. ESRCH means the thread id given is invalid. Maybe it already exited and just needs to be joined, or maybe this an an OpenBSD-specific issue. In discussion with @ko1, he said the result of pthread_kill can be ignored.

I don't think this is OpenBSD-specific. But you know, OpenBSD's userland thread scheduler often find some thread timing issue. That's just their intention. I really respect them.

@jeremyevans jeremyevans merged commit ef3803e into ruby:master May 7, 2024
101 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants