I checked the glibc source, and it intentionally keeps the thread alive: ```c /* If the runlist is empty, then we sleep for a while, waiting for something to arrive in it. */ if (runp == NULL && optim.gai_idle_time >=...eugeneius (Eugene Kenny)
Here's a small script that reproduces the problem: ```ruby require "socket" Socket.getaddrinfo("localhost", nil) pid = fork do Socket.getaddrinfo("localhost", nil) end Process.wait pid ``` In Rails' test suite, the `...eugeneius (Eugene Kenny)
The simpler repro script runs successfully from 2.3.0 onwards, and `git bisect` between 2.2.0 and 2.3.0 shows that r59221 (from #11384) fixed it.eugeneius (Eugene Kenny)
Here's another patch that also fixes the problem, while keeping the optimisation from r55376. I'll admit that I have no idea what this option does or how it could cause this bug - I noticed that the "portable" implementation of `forwa...eugeneius (Eugene Kenny)