-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Crash in GC on arm64 #39090
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
Comments
Is there a way for us to check if this is something new - or whether it has been going on for a while? I wonder if this might be related to some of the ARM64 specific changes that we have laded (contributed by ARM) |
I looked at two, and in both the concurrent marker is visiting small variable length objects (Array or TypeArguments), whose header and length fields agree that the object is small, but the marker is visiting slots as if the object was large and falling off the end of a page. In fact, it is visiting the object as if the object's length in elements was equal to the address of null, so this might be a data race on the length field. This is strange because the atomics to enter a safepoint should be preventing such a data race. https://github.com/dart-lang/sdk/blob/master/runtime/docs/gc.md#data-races |
If this started recently this might also be related to the recent atomic changes. |
@rmacnak-google I have a question about this code. GC docs say:
which is implemented by this code NoSafepointScope no_safepoint;
InitializeObject(address, cls_id, size);
RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag);
ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_));
if (raw_obj->IsOldObject() && thread->is_marking()) {
// Black allocation. Prevents a data race between the mutator and concurrent
// marker on ARM and ARM64 (the marker may observe a publishing store of
// this object before the stores that initialize its slots), and helps the
// collection to finish sooner.
raw_obj->SetMarkBitUnsynchronized();
heap->old_space()->AllocateBlack(size);
}
return raw_obj; I find a bit strange that we use When I look into I think this might the root cause of the issue. |
… old object from being ordered after publishing stores of that object. Compare f4f0831, which implicitly removed a barrier from PageSpace::AllocateBlack. Bug: #39090 Change-Id: I3a9274b90875a6860cb102a238b6f95a6a7b2ff2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123004 Reviewed-by: Alexander Markov <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
I think @rmacnak-google change has fixed it - I don't see any more instances of it in the flakiness dashboard. |
… old object from being ordered after publishing stores of that object. Compare f4f0831, which implicitly removed a barrier from PageSpace::AllocateBlack. Bug: #39090 Change-Id: I3a9274b90875a6860cb102a238b6f95a6a7b2ff2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123004 Reviewed-by: Alexander Markov <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
During gardening I noticed there are flaky crashes on arm64.
From this build with this log:
core dumps are available - see the "isolated out" in the build mentioned above.
(There are more, e.g. this build with log, or this )
/cc @a-siva @rmacnak-google @mraleph
The text was updated successfully, but these errors were encountered: