From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,SPF_PASS, T_DKIM_INVALID shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 4F4C81F4DD for ; Tue, 29 Aug 2017 18:40:58 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 272F31208E2; Wed, 30 Aug 2017 03:40:54 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 6B8961208DF for ; Wed, 30 Aug 2017 03:40:51 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=KiUC++e6/2DjNDiSwo4s4tkhK1k=; b=zHcR8WbMViTlrETDqL Gjpl2eXypKJF66sdjqZ6Yn0wjcDwbKGjj1/ZN6EfQS0bZVT7gPNogtkb1jwQ62CE RhFCxMDoBQDBkiBzyAZgINwU0GVmDzMKD1evhORas6MgYl4Wdo04Rl4YvxDZX9rg uP4We9B4dvSc1IITK6ZHTJF5A= Received: by filter0025p3mdw1.sendgrid.net with SMTP id filter0025p3mdw1-16086-59A5B530-6 2017-08-29 18:40:48.114252428 +0000 UTC Received: from herokuapp.com (ec2-54-92-221-103.compute-1.amazonaws.com [54.92.221.103]) by ismtpd0024p1mdw1.sendgrid.net (SG) with ESMTP id uj9IiKdqSgSOdYQf3QKMlw for ; Tue, 29 Aug 2017 18:40:47.966 +0000 (UTC) Date: Tue, 29 Aug 2017 18:40:48 +0000 (UTC) From: kadmos@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 57569 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 13846 X-Redmine-Issue-Author: parhs X-Redmine-Sender: parhs 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS4xHaBIjj16eUwIQJz1Z/MFWgPo9LaIJqWz+i OBm7lEwX1HYeCh4LzO0tlmq7ECDKyZ1dcs8Iqmu6QO/onKQKOgmrPz0YznKrNjpBchOcRv12dnwkXp /8PBja8JqBJBjTbzKIWjVa0IrBNsO3jhH1ZT X-ML-Name: ruby-core X-Mail-Count: 82517 Subject: [ruby-core:82517] [Ruby trunk Bug#13846] Openbsd possible memory leak when using Thread 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #13846 has been updated by parhs (Coding Gorilla). I installed 2.5.0-dev (from github) and seems that this bug does not occur or at least it is fixed. I believe that it might be related to #13772. My daemons started with low memory around 30mb and ended up after a week to 300mb with high cpu usage and whole system lagging. Even local ssh connection had noticeable lag. With 2.5.0-dev that I tested RSS memory for this example seems stable. For my daemon it is increasing but very slowly compared to how it used to though it might be normal. (I got 100kb max rss increase after 6 hours compared to 4-5mb before) ---------------------------------------- Bug #13846: Openbsd possible memory leak when using Thread https://bugs.ruby-lang.org/issues/13846#change-66327 * Author: parhs (Coding Gorilla) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: 2.3.4 * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- On openBSD 5.9/6.1 running this code causes RSS memory to increase without limit. This does not happen in ubuntu or other linux. ~~~ ruby loop do thr = Thread.new { puts "thread test" } thr.join GC.start end ~~~ This is related to other things too, like when calling Open3.* , virtually everything that is using threads... I have attached a screenshot with RSS memory plot I did. ---Files-------------------------------- Screen Shot 2017-08-29 at 11.11.42 AM.png (51.7 KB) -- https://bugs.ruby-lang.org/