Issue #11174 has been updated by cvss (Kirill Vechera).


I've just tested on a manually built glibc 2.28 with ruby ruby 2.7.0dev (2019-06-17T14:25:47Z trunk 801d0d9dd7) [x86_64-linux], the problem remains. So probably glibc 2.28 has no fix yet.

----------------------------------------
Bug #11174: threads memory leak
https://bugs.ruby-lang.org/issues/11174#change-78650

* Author: cvss (Kirill Vechera)
* Status: Open
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* Target version: 
* ruby -v: 2.2.3, 2.2.0, 2.1.0, 2.0.0, 1.9.3
* 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/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>