From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [IPv6:2a01:4f8:1c0c:6b10::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 1D1CD1F44D for ; Fri, 1 Mar 2024 06:04:20 +0000 (UTC) Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 5F6A67EFCA; Fri, 1 Mar 2024 06:04:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1709273043; bh=aVeP8JsiBP3dkoyq18NbmcG9EPPP47BjFNTZWNvK7Ic=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=ovYLMpvpFuhJesFdNdbotJbkduneyux60W0llUDj809lbuaMLd7VnjG4eNi6r59b6 bJao7/1n0fYgyeTin2JnKjexx9id3rBeE+l53nGUonTf+wHcepO1ZvQ7C1uyR2S1VN LKCehEcsqq/RrFNA+5X3P+TZe8ZwZyrORTOT2jXg= Received: from s.wfbtzhsv.outbound-mail.sendgrid.net (s.wfbtzhsv.outbound-mail.sendgrid.net [159.183.224.104]) by nue.mailmanlists.eu (Postfix) with ESMTPS id CB7E37EFC2 for ; Fri, 1 Mar 2024 06:03:56 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=rLMmNgA3; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=v0xSc9A37+cYYqd+Jn8rOnk5jbWufMBBKcJckCIYOFw=; b=rLMmNgA3rbSXZ4iZDxd85MLc8M+NpWfRAd7NcIS+vz4AidwVX09p4W86hNlJVIkSLRPF iMQ/4HhtqaP+wZW82bMedyERP66munCcjDF/TcvSpD3oMOLm33b/bv1/INF7qGdI8PcXH+ RMMr1FEFY8C01uis5yL3+IXzzprKpNkldfl45ilNIo8nh26bPhv2JCXf1p4dyBekfVpTfX XL/1QgtQrG28isaSCPFQ6yFzgA+PSc+i3fK0eOw1p39wn7Rkdn+8yv351LwKh3Cfk4uCbU k+TMB1UHXkdivDxaotX94pIXUjzC5qCRHmS4nH/Z2GGr10XccduHOoP6IvzmJ5RQ== Received: by filterdrecv-58bfc74dd6-2tzs2 with SMTP id filterdrecv-58bfc74dd6-2tzs2-1-65E16FCB-1E 2024-03-01 06:03:55.857159093 +0000 UTC m=+3080839.622317988 Received: from herokuapp.com (unknown) by geopod-ismtpd-29 (SG) with ESMTP id LoFbOZ_oS-6Fxfn-Ul7bag for ; Fri, 01 Mar 2024 06:03:55.808 +0000 (UTC) Date: Fri, 01 Mar 2024 06:03:55 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20311 X-Redmine-Issue-Author: MaxLap X-Redmine-Issue-Priority: Normal 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-Redmine-MailingListIntegration-Message-Ids: 93588 X-SG-EID: =?us-ascii?Q?rA5eEsXeCy+asKowYcicHxhOSUaOWYD+XnPnBc7LFC8Re9tNQ4Sv5BA=2FOz+glG?= =?us-ascii?Q?+50K4steq4vSjkkyeSAt=2FQpZK6mQgZdK22n=2FlxG?= =?us-ascii?Q?4Fre1DQGlxH72PxFSoj6ryguBGuiijDNf+ttXNr?= =?us-ascii?Q?1V9=2FOZR+XKpOPwLh9vtr4ZC7N6vDaJq8nt0FYIf?= =?us-ascii?Q?0Qyrj2uCyYflxnIZWnz9aSZ4PKza+on53o3eIkm?= =?us-ascii?Q?a+6QX+0vctZZnTsb61uwM6DE5ZaLMoi2T93f6P0?= =?us-ascii?Q?3gwcV7jmZJreCTIGGEeUA=3D=3D?= To: ruby-dev@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: W2OIHDBIQK4MY7GPEJZJQWN2KPYXGP7U X-Message-ID-Hash: W2OIHDBIQK4MY7GPEJZJQWN2KPYXGP7U X-MailFrom: bounces+313651-12dc-ruby-dev=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: "Ruby developers (Japanese)" Subject: =?utf-8?q?=5Bruby-dev=3A52077=5D_?= [Ruby master Bug#20311] Struct.new("A") memory leak? List-Id: "Ruby developers (Japanese)" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "nobu (Nobuyoshi Nakada) via ruby-dev" Cc: "nobu (Nobuyoshi Nakada)" Issue #20311 has been updated by nobu (Nobuyoshi Nakada). byroot (Jean Boussier) wrote in #note-3: > So if a module is added twice, you need to remove it from the set if it's removed twice... I'll see if I can do that. Is there any chance for the same module to be added twice? ---------------------------------------- Bug #20311: Struct.new("A") memory leak? https://bugs.ruby-lang.org/issues/20311#change-107087 * Author: MaxLap (Maxime Lapointe) * Status: Open * ruby -v: 3.3.0 * Backport: 3.0: WONTFIX, 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED ---------------------------------------- The following code gives the impression of a memory leak. ``` 10.times do 5000.times do Struct.new("A") Struct.send(:remove_const, :A) end GC.start puts `ps -o rss= -p #{$$}`.to_i end ``` ``` 27868 35324 43400 51472 58676 66144 73764 81196 88512 95752 ``` Is there another location where the struct gets set that I need to clear up for the GC free the memory? Happens in 3.2.2, 3.2.3, 3.3.0, 3.3-head, ruby-head. -- https://bugs.ruby-lang.org/