From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 7DC8019600DA for ; Fri, 3 Jul 2015 00:22:44 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id D5467B5D934 for ; Fri, 3 Jul 2015 00:48:30 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id CBA4297A820 for ; Fri, 3 Jul 2015 00:48:33 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Authentication-Results: funfun.nagaokaut.ac.jp (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=sendgrid.me Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v9e5u74DVRnS for ; Fri, 3 Jul 2015 00:48:33 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 6539697A827 for ; Fri, 3 Jul 2015 00:48:33 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 3B1CA95243A for ; Fri, 3 Jul 2015 00:48:29 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id C7F7B120475; Fri, 3 Jul 2015 00:48:28 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id 21150120464 for ; Fri, 3 Jul 2015 00:48:24 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=Rxbm+UR8GaWCKra+/sM9NqRRpSI=; b=Co2qr0b+CFikF5Ml1u CdGbCpqUxoGVA9Ps/lNRsm6um3cwKfmz6fs+E/ZoVmuFqudjP7xX/TcJL7o4t2eg +t56DmWpFSlVdSe+/T0zzbq4ivp+HeSIAKgywE+T7sYtK6jvHTJICtcH0IqGQw/5 +vUhP9KGiJzCKJZb1GyJtvg/w= Received: by filter0805p1mdw1.sendgrid.net with SMTP id filter0805p1mdw1.11563.55955D4233 2015-07-02 15:48:18.740383811 +0000 UTC Received: from herokuapp.com (ec2-54-166-246-59.compute-1.amazonaws.com [54.166.246.59]) by ismtpd-048 (SG) with ESMTP id 14e4f744bf9.1f49.587c72 Thu, 02 Jul 2015 15:48:18 +0000 (UTC) Date: Thu, 02 Jul 2015 15:48:18 +0000 From: from-ruby-lang@serversnab.ru To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 44443 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11174 X-Redmine-Issue-Author: cvss X-Redmine-Sender: cvss X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS4JC4QllPdb7jnNW5TREbUeAh1RlnM10aRj8X +q1RT2fcm6wlpc+RxxJV9cYC402dqmD40ERG8TFP4FzkIwGYKrudR7boIGRiDgIb7Po6PTaDrh8fFn roST2JZHy1S0YpewSlWq0AKR2x34s8cN4ei6 X-ML-Name: ruby-core X-Mail-Count: 69845 Subject: [ruby-core:69845] [Ruby trunk - Bug #11174] threads memory leak X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11174 has been updated by Cyril Vechera. ruby -v changed from 2.2.0 to 2.2.3, 2.2.0, 2.1.0, 2.0.0, 1.9.3 I've checked the bug on older versions and the 2.2-head: leaks all but 1.8.7 ~~~ $ ruby --version ruby 2.2.3p139 (2015-07-01) [x86_64-linux] $ ruby /tmp/thread_memleak4.rb VmRSS: 47152 kB VmRSS: 72872 kB VmRSS: 90448 kB VmRSS: 105752 kB ~~~ ~~~ $ ruby --version ruby 1.8.7 (2014-01-28 patchlevel 376) [x86_64-linux] $ ruby /tmp/thread_memleak4.rb VmRSS: 2496 kB VmRSS: 3688 kB VmRSS: 2768 kB VmRSS: 2536 kB VmRSS: 2536 kB ~~~ ---------------------------------------- Bug #11174: threads memory leak https://bugs.ruby-lang.org/issues/11174#change-53244 * Author: Cyril Vechera * Status: Open * Priority: Normal * Assignee: * 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/