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=0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id A1DC81F44D for ; Thu, 21 Mar 2024 06:59:10 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=SRcc1aiM; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=fx5zuTZU; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 8507983685; Thu, 21 Mar 2024 06:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1711004330; bh=u4Q3vWxc7mgbdrPsMSFLCjkJCkctetqhBGGFpV+IWuM=; 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=SRcc1aiMfELmADm5g4NEAh0vmm/I62y9PUgtNfehq7NWQB81zZlLCtVh/os7CdeFT YnM7JlRZQELotKpjcf9AykM+mGwfiGoVcAcnLdtHyJMuThPPWsXE0rfxFWZMh+KXsa AktGc4xzmwWJ9OaeU9v0RlYNutz61J3wWHTtsJ0Q= Received: from s.wrqvwxzv.outbound-mail.sendgrid.net (s.wrqvwxzv.outbound-mail.sendgrid.net [149.72.154.232]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 2F9A48367B for ; Thu, 21 Mar 2024 06:58:45 +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=fx5zuTZU; 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=SjlFJnzGUGR5NRoRxUCOWXPumInWXu67MmpN4UPDt2E=; b=fx5zuTZUxvDK6WqJxWOoSWiMslhOvQbx+5C03lxAEHY5MkfRW40f0wAnuq4LfWEBHzTe 2jzpDl9IiG/64Gfhatl+Vh2E4G4SD068616LezsdClZ6OFqZFZxkZzRNvH14B9G7wCkDQd fPQP+DakY1TkjgBCxEgjrMkQ4pBBIQ9/GxnrfeEbAM8mVpRykmriNWMB1aRWRLQQAjM0s+ jzdrnHggnXqAE5zWir1DA+Wtd+MyM3i8Lmpb/WGvAJJGCJg0YCv7tp3G/AQc1nL8ACBV0q ctdxgtH1BZvz1PQfN5Ncgu5NCiYfjbLMFamVKLCndelw+OfMo90vxksYCIlQGb3w== Received: by recvd-7fc89fc779-mn88z with SMTP id recvd-7fc89fc779-mn88z-1-65FBDAA3-3 2024-03-21 06:58:43.326378789 +0000 UTC m=+208779.698298865 Received: from herokuapp.com (unknown) by geopod-ismtpd-34 (SG) with ESMTP id HNogGCxQQbGGT82HRdVDvA for ; Thu, 21 Mar 2024 06:58:43.292 +0000 (UTC) Date: Thu, 21 Mar 2024 06:58:43 +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: naruse 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: 93875 X-SG-EID: =?us-ascii?Q?u001=2EhGFfhdJzu4NO4V2+b30G6dbw+VuL3beZ0PPXT3QK5Aw+yzEytPMyHWWhg?= =?us-ascii?Q?MagkviFV7=2FAUx7fnB3tdvTxuSCk0OcPgXuo3vIH?= =?us-ascii?Q?vl0zTLRTMHjDjbMfiotDxi6ib6o6zcYHhBa4FdB?= =?us-ascii?Q?j+Z2vlzUJsKuRSZTs8I4MXKkJZ8l6MIingJQVuE?= =?us-ascii?Q?rfwuUxbNicfQoHygDr6moLSZq1xSzl6lmZlVgdo?= =?us-ascii?Q?6Q+=2FSwRiMy=2F+PzJk6GVN56ZAMiOOXILHAelaFIa?= =?us-ascii?Q?gYnS?= To: ruby-dev@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: JQ4VCVEJUPRKHLK2NQFG7OTDTR3VBQKO X-Message-ID-Hash: JQ4VCVEJUPRKHLK2NQFG7OTDTR3VBQKO 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=3A52081=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: "naruse (Yui NARUSE) via ruby-dev" Cc: "naruse (Yui NARUSE)" Issue #20311 has been updated by naruse (Yui NARUSE). Backport changed from 3.0: WONTFIX, 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED to 3.0: WONTFIX, 3.1: REQUIRED, 3.2: REQUIRED, 3.3: DONE ruby_3_3 f79b1d1ef1f7aa64d20f0eadbb3b0f8f7084deb3 merged revision(s) e626da82eae3d437b84d4f9ead0164d436b08e1a,f3af5ae7e6c1c096bbfe46d69de825a02b1696cf. ---------------------------------------- Bug #20311: Struct.new("A") memory leak? https://bugs.ruby-lang.org/issues/20311#change-107404 * Author: MaxLap (Maxime Lapointe) * Status: Closed * ruby -v: 3.3.0 * Backport: 3.0: WONTFIX, 3.1: REQUIRED, 3.2: REQUIRED, 3.3: DONE ---------------------------------------- The following code gives the impression of a memory leak. ```ruby 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/