From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 753901F461 for ; Mon, 13 May 2019 23:50:13 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id DE95C1209DB; Tue, 14 May 2019 08:50:07 +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 98FA61209D7 for ; Tue, 14 May 2019 08:50:05 +0900 (JST) Received: by filter0144p3mdw1.sendgrid.net with SMTP id filter0144p3mdw1-13810-5CDA02AE-F 2019-05-13 23:50:06.417230723 +0000 UTC m=+21016.907617050 Received: from herokuapp.com (unknown [18.212.173.8]) by ismtpd0042p1mdw1.sendgrid.net (SG) with ESMTP id 5oQPKKxJQR68oqsms4gTFw for ; Mon, 13 May 2019 23:50:06.393 +0000 (UTC) Date: Mon, 13 May 2019 23:50:06 +0000 (UTC) From: nobu@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 68119 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15844 X-Redmine-Issue-Author: alangano X-Redmine-Sender: nobu 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: =?us-ascii?Q?q8Dly+pU2+3ektTtZVXgZtbJPXwqo7p86jCsvYTW4BxnFz=2Fb5yZiXwep=2FpswUt?= =?us-ascii?Q?ctkF0FZZR3ZLf0BupVRe+ksyP5EWPd5uc8Ew5AH?= =?us-ascii?Q?BKUYFQ18f+Kxq6M+84hg=2FMXu3id0JR8k5IqM8KF?= =?us-ascii?Q?72l5PR1F7LQvDt8Pybh8q5wdEuox24840KSd4ha?= =?us-ascii?Q?j4=2FuLUm=2FqhmXMcIgF2OTxjnKfPJ8Y=2FwAtxQ=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 92636 Subject: [ruby-core:92636] [Ruby trunk Bug#15844] VM has trouble releasing memory (?) on NoMethodError 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 #15844 has been updated by nobu (Nobuyoshi Nakada). Status changed from Open to Rejected On exiting by an exception, ruby tries to print the exception and `NoMethodError` shows its receiver. Your `Node` is a recursive construction, so it increases exponentially by the size. Define your own `inspect` method not to include `@left` and `@right` members. ---------------------------------------- Bug #15844: VM has trouble releasing memory (?) on NoMethodError https://bugs.ruby-lang.org/issues/15844#change-77997 * Author: alangano (Alan Gano) * Status: Rejected * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux] * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- When the test case is run, the process goes haywire. I observe RSS bouncing around, and trending upwards. CPU on the process is at 100%. The test case is a partial implementation of a binary tree which is also a doubly linked list. I chopped it down as far as I could. The issue is triggered by a calling a non-existent method on the Tree object. The test case only has 100 nodes -- it should be instantaneous. I kill it after some 6+ minutes with RSS hitting upwards of 5GB. I am working in 2.6.3. Duplicated in 2.5.3 and 2.4.3 (with some code modifications) ---Files-------------------------------- issue.rb (2.67 KB) -- https://bugs.ruby-lang.org/