-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heap Snapshot has messed up array edge indexes #51576
Comments
Should we be passing in the index from the callsite instead? Does the callsite know the index? |
Just checked, and this is reproducible on 1.9, so probably this was never working correctly (thanks for the suggestion @d-netto):
|
-1 is the "default" result for the gc_slot_to_arrayidx. Though It's odd that we do get the default. |
It means the parent wasn't an array.... |
Couldn't reproduce this on 1.9. We're likely just passing a garbage pointer to the snapshot functions. |
If you look at a heap snapshot, all the edges coming from an array all report an index of
[0]
:Looking at the .heapsnapshot file produced by the current C++ code, it looks like we are constructing edges with garbage values. Here is a snippet from one .heapsnapshot file I produced:
The first field is the edge type, and
2
is "element", meaning this is an array item.The second field is supposed to be the array index, but all of them have the same value:
18446744073709551615
, which is -1 in Int64:This value is coming from
gc_slot_to_arrayidx(from, to)
, here:julia/src/gc-heap-snapshot.h
Line 66 in 62e57f7
So somehow the gc_slot_to_arrayidx value is wrong for all of the edges:
Is it valid to call
gc_slot_to_arrayidx(from, to)
on the parent/child objects? The callsites look like this, for example:julia/src/gc.c
Lines 2069 to 2076 in e5c6340
Asking for support here from @gbaraldi, @apaz-cli, @d-netto. Thanks in advance!
The text was updated successfully, but these errors were encountered: