ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: from-ruby-lang@serversnab.ru
To: ruby-core@ruby-lang.org
Subject: [ruby-core:69341] [Ruby trunk - Bug #11174] [Open] threads memory leak
Date: Sat, 23 May 2015 21:16:49 +0000	[thread overview]
Message-ID: <redmine.issue-11174.20150523211647.ff9138a31f2a76ae@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-11174.20150523211647@ruby-lang.org

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/

       reply	other threads:[~2015-05-23 20:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-11174.20150523211647@ruby-lang.org>
2015-05-23 21:16 ` from-ruby-lang [this message]
2015-07-02 15:48 ` [ruby-core:69845] [Ruby trunk - Bug #11174] threads memory leak from-ruby-lang
2017-08-29  7:41 ` [ruby-core:82499] [Ruby trunk Bug#11174] " kadmos
2017-09-15  2:27 ` [ruby-core:82802] " ko1
2018-09-14  9:17 ` [ruby-core:89004] " hartator
2018-09-14 11:09   ` [ruby-core:89008] " Eric Wong
2018-09-14 11:25     ` [ruby-core:89010] " Eric Wong
2019-06-17 15:17 ` [ruby-core:93203] " from-ruby-lang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-11174.20150523211647.ff9138a31f2a76ae@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).