Project

General

Profile

Actions

Bug #11174

closed

threads memory leak

Added by cvss (Kirill Vechera) almost 9 years ago. Updated 8 months ago.

Status:
Closed
Target version:
-
ruby -v:
2.2.3, 2.2.0, 2.1.0, 2.0.0, 1.9.3
[ruby-core:69341]

Description

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) thread_memleak4.rb cvss (Kirill Vechera), 05/23/2015 09:14 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0