ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:71085] [Ruby trunk - Bug #11593] [Open] Is it possible that ObjectSpace.dump_all catch dead objects?
       [not found] <redmine.issue-11593.20151014075358@ruby-lang.org>
@ 2015-10-14  7:53 ` alex.gaziev
  2015-10-14  8:46 ` [ruby-core:71086] [Ruby trunk - Bug #11593] " alex.gaziev
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: alex.gaziev @ 2015-10-14  7:53 UTC (permalink / raw)
  To: ruby-core

Issue #11593 has been reported by Alex Gaziev.

----------------------------------------
Bug #11593: Is it possible that ObjectSpace.dump_all catch dead objects?
https://bugs.ruby-lang.org/issues/11593

* Author: Alex Gaziev
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 2.2.3p173
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
I'm analysing leak in my application and I'm using ObjectSpace.dump_all to build graphs from ROOT objects to leaked objects to understand where is the leak.
And I found that I can't trace some of objects by their references to ROOTs.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:71086] [Ruby trunk - Bug #11593] Is it possible that ObjectSpace.dump_all catch dead objects?
       [not found] <redmine.issue-11593.20151014075358@ruby-lang.org>
  2015-10-14  7:53 ` [ruby-core:71085] [Ruby trunk - Bug #11593] [Open] Is it possible that ObjectSpace.dump_all catch dead objects? alex.gaziev
@ 2015-10-14  8:46 ` alex.gaziev
  2015-11-19  6:40 ` [ruby-core:71570] " ko1
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: alex.gaziev @ 2015-10-14  8:46 UTC (permalink / raw)
  To: ruby-core

Issue #11593 has been updated by Alex Gaziev.

Description updated
Assignee set to Koichi Sasada

----------------------------------------
Bug #11593: Is it possible that ObjectSpace.dump_all catch dead objects?
https://bugs.ruby-lang.org/issues/11593#change-54452

* Author: Alex Gaziev
* Status: Open
* Priority: Normal
* Assignee: Koichi Sasada
* 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?



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:71570] [Ruby trunk - Bug #11593] Is it possible that ObjectSpace.dump_all catch dead objects?
       [not found] <redmine.issue-11593.20151014075358@ruby-lang.org>
  2015-10-14  7:53 ` [ruby-core:71085] [Ruby trunk - Bug #11593] [Open] Is it possible that ObjectSpace.dump_all catch dead objects? alex.gaziev
  2015-10-14  8:46 ` [ruby-core:71086] [Ruby trunk - Bug #11593] " alex.gaziev
@ 2015-11-19  6:40 ` ko1
  2015-11-19  8:16 ` [ruby-core:71577] " alex.gaziev
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: ko1 @ 2015-11-19  6:40 UTC (permalink / raw)
  To: ruby-core

Issue #11593 has been updated by Koichi Sasada.


It can be a bug of object traversing API. It is not well tested.
Do you have any script I can try?

@tmm1 do you have any idea?

Thanks,
Koichi

----------------------------------------
Bug #11593: Is it possible that ObjectSpace.dump_all catch dead objects?
https://bugs.ruby-lang.org/issues/11593#change-54951

* Author: Alex Gaziev
* Status: Open
* Priority: Normal
* Assignee: Koichi Sasada
* 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?



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:71577] [Ruby trunk - Bug #11593] Is it possible that ObjectSpace.dump_all catch dead objects?
       [not found] <redmine.issue-11593.20151014075358@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2015-11-19  6:40 ` [ruby-core:71570] " ko1
@ 2015-11-19  8:16 ` alex.gaziev
  2015-11-19 13:32 ` [ruby-core:71586] [Ruby trunk - Bug #11593] [Feedback] " ko1
  2015-11-20  6:30 ` [ruby-core:71601] [Ruby trunk - Bug #11593] " alex.gaziev
  5 siblings, 0 replies; 6+ messages in thread
From: alex.gaziev @ 2015-11-19  8:16 UTC (permalink / raw)
  To: ruby-core

Issue #11593 has been updated by Alex Gaziev.

File dead_thread.rb added

After running this example (dead_thread.rb) you can grep by printed address of thread and find out that it doesn't have parent

----------------------------------------
Bug #11593: Is it possible that ObjectSpace.dump_all catch dead objects?
https://bugs.ruby-lang.org/issues/11593#change-54959

* Author: Alex Gaziev
* Status: Open
* Priority: Normal
* Assignee: Koichi Sasada
* 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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:71586] [Ruby trunk - Bug #11593] [Feedback] Is it possible that ObjectSpace.dump_all catch dead objects?
       [not found] <redmine.issue-11593.20151014075358@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2015-11-19  8:16 ` [ruby-core:71577] " alex.gaziev
@ 2015-11-19 13:32 ` ko1
  2015-11-20  6:30 ` [ruby-core:71601] [Ruby trunk - Bug #11593] " alex.gaziev
  5 siblings, 0 replies; 6+ messages in thread
From: ko1 @ 2015-11-19 13:32 UTC (permalink / raw)
  To: 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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ruby-core:71601] [Ruby trunk - Bug #11593] Is it possible that ObjectSpace.dump_all catch dead objects?
       [not found] <redmine.issue-11593.20151014075358@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2015-11-19 13:32 ` [ruby-core:71586] [Ruby trunk - Bug #11593] [Feedback] " ko1
@ 2015-11-20  6:30 ` alex.gaziev
  5 siblings, 0 replies; 6+ messages in thread
From: alex.gaziev @ 2015-11-20  6:30 UTC (permalink / raw)
  To: ruby-core

Issue #11593 has been updated by Alex Gaziev.


Ok, I understood. This issue can be closed now, thank you

----------------------------------------
Bug #11593: Is it possible that ObjectSpace.dump_all catch dead objects?
https://bugs.ruby-lang.org/issues/11593#change-54984

* 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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-20  5:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-11593.20151014075358@ruby-lang.org>
2015-10-14  7:53 ` [ruby-core:71085] [Ruby trunk - Bug #11593] [Open] Is it possible that ObjectSpace.dump_all catch dead objects? alex.gaziev
2015-10-14  8:46 ` [ruby-core:71086] [Ruby trunk - Bug #11593] " alex.gaziev
2015-11-19  6:40 ` [ruby-core:71570] " ko1
2015-11-19  8:16 ` [ruby-core:71577] " alex.gaziev
2015-11-19 13:32 ` [ruby-core:71586] [Ruby trunk - Bug #11593] [Feedback] " ko1
2015-11-20  6:30 ` [ruby-core:71601] [Ruby trunk - Bug #11593] " alex.gaziev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).