Project

General

Profile

Actions

Bug #11175

closed

possible fibers memory leak or risky GC behavior

Added by cvss (Kirill Vechera) almost 9 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:69342]

Description

There's strong memory growth on mass Fiber creation/deletion.

Script to demonstrate the problem (on x86_64-linux):

loop {
	10000.times.map { Fiber.new { } } 
	GC.start # not necessary, just to be sure
	puts File.open('/proc/self/status').grep(/VmRSS:/).first
}

Running this script shows RSS growing from 57 Mb to 1Gb within one minute. Than RSS remains in range from 850 Mb to 1200 Mb.

cv@new-cv:~/arena$ ruby fiber_memleak.rb
VmRSS:     57168 kB
VmRSS:    121668 kB
VmRSS:    183568 kB
...
VmRSS:   1114664 kB
VmRSS:   1122624 kB

Files

fiber_memleak.rb (146 Bytes) fiber_memleak.rb cvss (Kirill Vechera), 05/23/2015 09:27 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0