From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id F36D119C026F for ; Thu, 19 Nov 2015 22:02:18 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id AD3A8B5D831 for ; Thu, 19 Nov 2015 22:33:04 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 2063A18CC7B9 for ; Thu, 19 Nov 2015 22:33:04 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id E997012045C; Thu, 19 Nov 2015 22:33:02 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id 59424120440 for ; Thu, 19 Nov 2015 22:32:58 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=IVIOCF2fuNo0DUxbX2C2cER2Yzk=; b=sloHRZuds/uB4Jdz2m fxgCp2/aIyHbPW6z4OLQVtK+utZNL09tsgGcvuZ7LJvUhXJ/61m/61otdfzuUXA5 Q2iF1UYP6/ZfchWQi6SV3SFEJgBiINwHjin6CpS1/d27RhqgibWLwlMeNbgyzxc5 L01sgEp3EpqPX56u0sRXfraOI= Received: by filter0437p1mdw1.sendgrid.net with SMTP id filter0437p1mdw1.17297.564DCF8315 2015-11-19 13:32:51.251144573 +0000 UTC Received: from herokuapp.com (ec2-23-22-244-149.compute-1.amazonaws.com [23.22.244.149]) by ismtpd0005p1iad1.sendgrid.net (SG) with ESMTP id MZ4L6ZWNQhS3QsIgNJmKtw for ; Thu, 19 Nov 2015 13:32:51.259 +0000 (UTC) Date: Thu, 19 Nov 2015 13:32:51 +0000 From: ko1@atdot.net To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 46249 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11593 X-Redmine-Issue-Author: gazay X-Redmine-Issue-Assignee: tmm1 X-Redmine-Sender: ko1 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS45UTCW1rbxmMlepG8lToBCphk2qOGgfSCFOK Ee8q2Q2FONLwYrXSNZ15clubFGCerACPPe3B1USsG87uTrhOYUnyRHWnECEETgPoLj4bhMkLJULTiR Uo3CZdsNXfJX7RHOFhosp6SYTSTG4BuiYfot X-ML-Name: ruby-core X-Mail-Count: 71586 Subject: [ruby-core:71586] [Ruby trunk - Bug #11593] [Feedback] Is it possible that ObjectSpace.dump_all catch dead objects? 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: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11593 has been updated by Koichi Sasada. Status changed from Open to Feedback Assignee changed from Koichi Sasada to Aman Gupta Sorry, last comment was my mistake. ObjectSpace.dump_all() can output garbage (but not collected yet) objects. This is current implementation. ```C /* dump all objects */ rb_objspace_each_objects(heap_i, &dc); ``` This code is similar to ObjectSpace.each_object and it iterates uncollected objects. I'm not sure it is enough or not (but maybe it is okay). ---------------------------------------- Bug #11593: Is it possible that ObjectSpace.dump_all catch dead objects? https://bugs.ruby-lang.org/issues/11593#change-54969 * Author: Alex Gaziev * Status: Feedback * Priority: Normal * Assignee: Aman Gupta * ruby -v: 2.2.3p173 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- Koichi, can you please help. There are lines in a dump that are not referenced by anyone else. And these are not ROOTs. For example, I'm looking in my dump by address of object and there is no other objects which have references to this object: ``` $ ag 0x7fc4adc55a20 dump.json 1812949:{"address":"0x7fc4adc55a20", "type":"DATA", "class":"0xaf6c70", "struct":"proc", "references":["0x7fc4adc55a48", "0x7fc504140390", "0x7fc4adc55a20", "0x7fc5041404d0"], "memsize":104} ``` How can it be? Is it a dead object who got in a dump or am I missing something? ---Files-------------------------------- dead_thread.rb (216 Bytes) -- https://bugs.ruby-lang.org/