General

Profile

dug (Doug E)

  • Login: dug
  • Registered on: 07/11/2018
  • Last sign in: 10/08/2026

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 2 2

Activity

10/15/2026

07:16 PM Ruby Bug #22406: Process.fork can leave the child unable to resolve hostnames: getaddrinfo helper threads take glibc's resolver lock after releasing the fork lock
Thanks, that makes sense, and sorry for batching the two fixes. byroot dropped the commit for extensions that call `fork(2)` from https://github.com/ruby/ruby/pull/19364 before merging it, so the PR fixed only #22445. 🙇‍♂️ dug (Doug E)
04:53 AM Ruby Bug #22406: Process.fork can leave the child unable to resolve hostnames: getaddrinfo helper threads take glibc's resolver lock after releasing the fork lock
While preparing the backports I found one kind of child that still inherits the slot of exiting lookup threads: a child that an extension forks with `fork(2)` and then passes to `rb_thread_atfork()`, as the C API asks. `rb_thread_acquire... dug (Doug E)
04:45 AM Ruby Bug #22445: On macOS, a child of Kernel#fork can abort with "[BUG] pthread_rwlock_destroy: Resource busy (EBUSY)"
Pull request: https://github.com/ruby/ruby/pull/19364 🙇‍♂️ dug (Doug E)
04:25 AM Ruby Bug #22445 (Closed): On macOS, a child of Kernel#fork can abort with "[BUG] pthread_rwlock_destroy: Resource busy (EBUSY)"
On macOS, `Kernel#fork` can abort the child with `[BUG] pthread_rwlock_destroy: Resource busy (EBUSY)` when another thread is waiting for the fork lock at the moment of the fork. getaddrinfo helper threads take that lock for reading (Fea... dug (Doug E)

10/13/2026

07:36 PM Ruby Bug #22406: Process.fork can leave the child unable to resolve hostnames: getaddrinfo helper threads take glibc's resolver lock after releasing the fork lock
Hi @mame, could I trouble you for a review of [PR#19242](https://github.com/ruby/ruby/pull/19242) ? @byroot has requested your input. 🙇‍♂️ dug (Doug E)

10/08/2026

08:37 PM Ruby Bug #22406: Process.fork can leave the child unable to resolve hostnames: getaddrinfo helper threads take glibc's resolver lock after releasing the fork lock
@mame @byroot @ko1 Thank you for the time you've given this ticket, and for the thoughtful feedback here and on the pull requests.
https://github.com/ruby/ruby/pull/19242 now uses a single slot, as @byroot and Luke Gruber suggested on...
dug (Doug E)
02:34 AM Ruby Bug #22406: Process.fork can leave the child unable to resolve hostnames: getaddrinfo helper threads take glibc's resolver lock after releasing the fork lock
@ko1 Thank you for checking getnameinfo, and you're right that it belongs here. I've added it to https://github.com/ruby/ruby/pull/19242:
* The getnameinfo thread now runs within `rb_thread_prevent_fork`, is created joinable and calls...
dug (Doug E)
06:28 PM Ruby Bug #22341: Class#superclass can crash the interpreter in debug build
Closed the above PR in favor of https://bugs.ruby-lang.org/issues/22376 dug (Doug E)
03:20 AM Ruby Bug #22341: Class#superclass can crash the interpreter in debug build
I opened https://github.com/ruby/ruby/pull/19267, which removes the assertion as suggested in #note-1. Debug builds now raise `TypeError` ("uninitialized class") like release builds do, and there's a regression test in `TestClass#test_un... dug (Doug E)
03:19 AM Ruby Bug #20872: Undefined RUBY_API_VERSION_* macros used in <ruby/backward/cxxanyargs.hpp>
I think this was fixed by https://github.com/ruby/ruby/pull/15843, and can be closed. dug (Doug E)

Also available in: Atom