Skip to content

Commit ef3803e

Browse files
committed
Ignore the result of pthread_kill in ubf_wakeup_thread
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.
1 parent 8ec1c41 commit ef3803e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

thread_pthread.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2569,10 +2569,7 @@ ubf_wakeup_thread(rb_thread_t *th)
25692569
{
25702570
RUBY_DEBUG_LOG("th:%u thread_id:%p", rb_th_serial(th), (void *)th->nt->thread_id);
25712571

2572-
int r = pthread_kill(th->nt->thread_id, SIGVTALRM);
2573-
if (r != 0) {
2574-
rb_bug_errno("pthread_kill", r);
2575-
}
2572+
pthread_kill(th->nt->thread_id, SIGVTALRM);
25762573
}
25772574

25782575
static void

0 commit comments

Comments
 (0)