diff options
| author | Jeremy Evans <code@jeremyevans.net> | 2024-04-21 18:51:25 -0700 |
|---|---|---|
| committer | Jeremy Evans <code@jeremyevans.net> | 2024-05-07 09:44:25 -0700 |
| commit | ef3803ed4028810f9088019f0db1a366370ab53a (patch) | |
| tree | 5ae7002bcd3b39d8dd7a9c7c9f8858d797f9c16b /thread_pthread.c | |
| parent | 8ec1c416f75ff20ccf71c08c51f91bdd42f226a8 (diff) | |
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
be1bbd5b7d40ad863ab35097765d3754726bbd54 (MaNy).
I have not yet been able to create a minimal self-contained example,
but it should be safe to remove the checks.
Diffstat (limited to 'thread_pthread.c')
| -rw-r--r-- | thread_pthread.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index 82b5e362cc..b9421559f2 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -2569,10 +2569,7 @@ ubf_wakeup_thread(rb_thread_t *th) { RUBY_DEBUG_LOG("th:%u thread_id:%p", rb_th_serial(th), (void *)th->nt->thread_id); - int r = pthread_kill(th->nt->thread_id, SIGVTALRM); - if (r != 0) { - rb_bug_errno("pthread_kill", r); - } + pthread_kill(th->nt->thread_id, SIGVTALRM); } static void |
