From: Eric Wong Date: 2018-07-04T12:24:02+00:00 Subject: [ruby-core:87781] Re: timer thread [was Re: [ruby-alerts:7905] failure alert on trunk-asserts@silicon-docker (NG (r63844))] Benoit Daloze wrote: > Maybe those tests should be fixed instead? s/instead/in addition/ :) > It seems a bug if a test creates 1000+ threads to the point > pthread_create() fails, except if that test is specifically testing > for that condition. It's flat-out wasteful to spawn threads when they're unnecessary, and I wouldn't be surprised if non-test users hit this on occasion. glibc has extra overhead when running multithreaded code (cancellation checks, locking), so every Ruby process pays that cost even for programs which never see Thread.new themselves. It's also not easy to diagnose the real cause of the thread creation failures, either, as POSIX requires glibc to censor the error to EAGAIN instead of providing info about what actually failed :< Unsubscribe: