From: Eric Wong Date: 2017-07-27T09:36:25+00:00 Subject: [ruby-core:82197] Re: [Ruby trunk Feature#13637] [PATCH] tool/runruby.rb: test with smallest possible machine stack Rei.Odaira@gmail.com wrote: > Thanks for the patch. Unfortunately, it did not solve the problem. Looks like this test does not call `nogvl_copy_stream_read_write()` but instead calls `copy_stream_fallback_body()`. As far as I read the code, there is no large array stack-allocated on that path...? Ah, looks like you're right. Hmm.. which OpenSSL version do you use? Perhaps we can set a higher stack size for some versions of OpenSSL on AIX; I don't think we've seen this other platforms... Also, are NFDBITS and HAVE_RB_FD_INIT macros defined? Platforms without them will allocate select() bitmaps on stack; which can get big. Perhaps enabling the (currently Linux-only) poll() rb_wait_for_single_fd can avoid big bitmaps for you: diff --git a/thread.c b/thread.c index b7ee1d8d9b..c9e52b8698 100644 --- a/thread.c +++ b/thread.c @@ -3823,7 +3823,7 @@ rb_thread_fd_select(int max, rb_fdset_t * read, rb_fdset_t * write, rb_fdset_t * * one we know of that supports using poll() in all places select() * would work. */ -#if defined(HAVE_POLL) && defined(__linux__) +#if defined(HAVE_POLL) && (defined(__linux__) || defined(_AIX)) # define USE_POLL #endif Also, does pahole work on your binaries? git clone git://git.kernel.org/pub/scm/devel/pahole/pahole.git That helps find down big stack users (including OpenSSL or any other 3rd party binaries). Unsubscribe: