From: from-ruby-lang@... Date: 2015-05-23T21:16:49+00:00 Subject: [ruby-core:69341] [Ruby trunk - Bug #11174] [Open] threads memory leak Issue #11174 has been reported by Cyril Vechera. ---------------------------------------- Bug #11174: threads memory leak https://bugs.ruby-lang.org/issues/11174 * Author: Cyril Vechera * Status: Open * Priority: Normal * Assignee: * ruby -v: 2.2.0 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- There's strong memory growth during intensive thread using. Script to demonstrate the problem (on x86_64-linux): ~~~ loop { 10.times { 1000.times.map { Thread.new { } }.each(&:join) } GC.start # not necessary, just to be sure puts File.open('/proc/self/status').grep(/VmRSS:/).first } ~~~ Running this script shows RSS growing from 45 Mb at the start time to 700 Mb after few minutes. ~~~ $ ruby thread_memleak4.rb VmRSS: 45036 kB VmRSS: 66748 kB VmRSS: 87024 kB ... VmRSS: 678052 kB ~~~ ---Files-------------------------------- thread_memleak4.rb (138 Bytes) -- https://bugs.ruby-lang.org/