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 [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) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 18DC21F4B8 for ; Fri, 19 Jan 2024 15:29:35 +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=2vai7Rnf; 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=pRra3w2o; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 62D7F81ECD; Fri, 19 Jan 2024 15:29:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1705678168; bh=QQrXvZ0JeTCtVtA8SLRFoFGNoJjJ+9DVn/LbXPZGcuw=; 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=2vai7RnfdUlzSNt0OTb4077hIbDIpE5oET+9BkJWC9R1IHeZJ/uhyvLGYHZ8vTEgy zZfdZ8shb7eNIvGUK2ZJ7kou82+1WCbOoy2xAWJQL1DZ/t51ahv7QN56RXqhWr3isI 9YS13oJK1A/0qO0cXPAMpcaAJMEjlxN4dsiZFpRo= Received: from csnrwnwx.outbound-mail.sendgrid.net (csnrwnwx.outbound-mail.sendgrid.net [198.37.146.154]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 28FFF81ECB for ; Fri, 19 Jan 2024 15:29:24 +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=pRra3w2o; 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=hCoA4lRqGGJ0xVzH4hubghvq0G/S6che0JvVAsJwGPg=; b=pRra3w2oOC13H10YLRRP+GonfHgTc2cT8PvCbKnToDYFCxYhLyoWFtMWR9tjtTJrWdxR +an3eLzFPtd7/X42+dhGWuYDbnGdkJAZ1JXlm1V38t+OvV4+oB6SL8X596T8crV842ZrX5 UIWeG4dZYN9tnXu3+l1jO6/Ahs6BR4YAeNk44DchoffAZ+FXzFH4Vl3KPQlNtgM0ychc0N gx07/YpT8wWtGNlEwBFakn9KXuVUJZI/+stA9STt+2A54SyUEMuD5H6ZAqCsIeX0YitkLS /RBXlkC6UGWbbip42PnvgNeKjYIii9yIRXsn+gOwRZPKAAn52iIbCBTP11XazjLA== Received: by filterdrecv-655bd866f5-cs4cb with SMTP id filterdrecv-655bd866f5-cs4cb-1-65AA9553-4 2024-01-19 15:29:23.111689616 +0000 UTC m=+699147.109242862 Received: from herokuapp.com (unknown) by geopod-ismtpd-20 (SG) with ESMTP id 9b-dl60ZQD6DTFXm35WfpA for ; Fri, 19 Jan 2024 15:29:23.054 +0000 (UTC) Date: Fri, 19 Jan 2024 15:29:23 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20194 X-Redmine-Issue-Author: peterzhu2118 X-Redmine-Sender: peterzhu2118 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: 92897 X-SG-EID: =?us-ascii?Q?Je5A7G63GhfECAlIirw6sGXmOX2lHebfQJh1Ny5404yZTMLDoRFxOJ=2FeRh30W+?= =?us-ascii?Q?VG3jKN3IIMvrTc6x81xc9blLAXOXOoA9wb31uxX?= =?us-ascii?Q?25tZKSG9UTjpBJJhZVIUFIeKAr=2FMeiI4W3=2FHRCT?= =?us-ascii?Q?mbh9EKFazyw=2FC1OMcG6hqpgk9Sa+QaXWTrLuEz4?= =?us-ascii?Q?vrTPoFP07q6lWXGg94MtSbvMFPr0rO+bNrF0RJR?= =?us-ascii?Q?mSWytfEBcjakrd+Uv4KGbp8YGfl=2F+9aOrNqtFH9?= =?us-ascii?Q?F0PmzRm3lXQDyLHERVk=2Fg=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: C44UDWE5KIS3KN6454X2G6PAAW2GM3A6 X-Message-ID-Hash: C44UDWE5KIS3KN6454X2G6PAAW2GM3A6 X-MailFrom: bounces+313651-b711-ruby-core=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 Subject: [ruby-core:116336] [Ruby master Bug#20194] Memory leak with TracePoint on bmethod List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "peterzhu2118 (Peter Zhu) via ruby-core" Cc: "peterzhu2118 (Peter Zhu)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20194 has been reported by peterzhu2118 (Peter Zhu). ---------------------------------------- Bug #20194: Memory leak with TracePoint on bmethod https://bugs.ruby-lang.org/issues/20194 * Author: peterzhu2118 (Peter Zhu) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED ---------------------------------------- GitHub PR: https://github.com/ruby/ruby/pull/9614 When disabling the TracePoint on bmethod, the hooks list is not freed. For example: ```ruby obj = Object.new obj.define_singleton_method(:foo) {} bmethod = obj.method(:foo) tp = TracePoint.new(:return) {} 10.times do 100_000.times do tp.enable(target: bmethod) {} end puts `ps -o rss= -p #{$$}` end ``` Before: ``` 18208 22832 26528 29728 34000 37776 40864 44400 47680 51504 ``` After: ``` 16688 17168 17168 17248 17696 17760 17824 17824 17856 17920 ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/