Skip to content
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

Scavenger aborts appear to sometimes leave the no_safepoint_scope_depth unbalanced #45059

Closed
rmacnak-google opened this issue Feb 20, 2021 · 0 comments
Assignees

Comments

@rmacnak-google
Copy link
Contributor

../../runtime/vm/heap/safepoint.cc: 97: error: expected: T->no_safepoint_scope_depth() == 0
version=2.13.0-edge.bfe3a31cd423daf8d29f917c138b89bfb73eb50c (be) (Thu Feb 18 23:29:50 2021 +0000) on "linux_x64"
pid=23579, thread=23586, isolate_group=main(0x55c084b7b000), isolate=(nil)((nil))
isolate_instructions=55c081a1cfe0, vm_instructions=55c081a1cfe0
  pc 0x000055c081dec33c fp 0x00007f88f33fe030 dart::Profiler::DumpStackTrace(void*)+0x7c
  pc 0x000055c081a1d192 fp 0x00007f88f33fe110 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x000055c081ef1a3b fp 0x00007f88f33fe190 dart::SafepointHandler::SafepointThreads(dart::Thread*)+0x6bb
  pc 0x000055c081ede63c fp 0x00007f88f33fe2c0 dart::Heap::CollectOldSpaceGarbage(dart::Thread*, dart::Heap::GCType, dart::Heap::GCReason)+0xdc
  pc 0x000055c081edf4c0 fp 0x00007f88f33fe3a0 dart::Heap::CollectNewSpaceGarbage(dart::Thread*, dart::Heap::GCReason)+0x280
  pc 0x000055c081edd2cd fp 0x00007f88f33fe3e0 dart::Heap::AllocateNew(long)+0xed
  pc 0x000055c081cfddd5 fp 0x00007f88f33fe450 dart::Object::Allocate(long, long, dart::Heap::Space)+0x85
  pc 0x000055c081da224c fp 0x00007f88f33fe4a0 dart::Array::New(long, long, dart::Heap::Space)+0x2c
  pc 0x000055c081d06325 fp 0x00007f88f33fe4d0 dart::Array::New(long, dart::Heap::Space)+0x65
  pc 0x000055c081e56e54 fp 0x00007f88f33fe590 dart::DRT_AllocateArray(dart::NativeArguments)+0x184
  pc 0x00007f88f4202432 fp 0x00007f88f33fe5d8 Unknown symbol
  pc 0x00007f88f4200c7c fp 0x00007f88f33fe610 Unknown symbol
  pc 0x00007f88f3a28632 fp 0x00007f88f33fe668 Unknown symbol
  pc 0x00007f88f3a27789 fp 0x00007f88f33fe690 Unknown symbol
  pc 0x00007f88f3a276a0 fp 0x00007f88f33fe6e8 Unknown symbol
  pc 0x00007f88f3a26628 fp 0x00007f88f33fe718 Unknown symbol
  pc 0x00007f88f3a26383 fp 0x00007f88f33fe778 Unknown symbol
  pc 0x00007f88f3a25d58 fp 0x00007f88f33fe7b0 Unknown symbol
  pc 0x00007f88f42028bd fp 0x00007f88f33fe828 Unknown symbol
  pc 0x000055c081c6e4a6 fp 0x00007f88f33fe8c0 dart::DartEntry::InvokeCode(dart::Code const&, dart::Array const&, dart::Array const&, dart::Thread*)+0x116
  pc 0x000055c081c6e095 fp 0x00007f88f33fe930 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)+0x135
  pc 0x000055c081c71291 fp 0x00007f88f33fe990 dart::DartLibraryCalls::HandleMessage(dart::Object const&, dart::Instance const&)+0x1d1
  pc 0x000055c081cae09e fp 0x00007f88f33feb80 dart::IsolateMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message> >)+0x54e
  pc 0x000055c081cf23c1 fp 0x00007f88f33fec10 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)+0x221
  pc 0x000055c081cf32e9 fp 0x00007f88f33fec90 dart::MessageHandler::TaskCallback()+0x359
  pc 0x000055c081eacd2b fp 0x00007f88f33fed30 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*)+0x1cb
  pc 0x000055c081ead769 fp 0x00007f88f33fed80 dart::ThreadPool::Worker::Main(unsigned long)+0x179
  pc 0x000055c081de4e09 fp 0x00007f88f33feed0 out/DebugX64C/dart+0x1f9ee09
-- End of DumpStackTrace
[exit     : sp(0) fp(0x7f88f33fe5d8) pc(0)]
[stub     : sp(0x7f88f33fe5e8) fp(0x7f88f33fe610) pc(0x7f88f4200c7c)]
[dart     : sp(0x7f88f33fe620) fp(0x7f88f33fe668) pc(0x7f88f3a28632) *file:///b/s/w/ir/tests/standalone_2/fragmentation_test.dart_::_main ]
[dart     : sp(0x7f88f33fe678) fp(0x7f88f33fe690) pc(0x7f88f3a27789) file:///b/s/w/ir/tests/standalone_2/fragmentation_test.dart_::_main_main ]
[dart     : sp(0x7f88f33fe6a0) fp(0x7f88f33fe6e8) pc(0x7f88f3a276a0) dart:core__Closure@0150898_dyn_call ]
[dart     : sp(0x7f88f33fe6f8) fp(0x7f88f33fe718) pc(0x7f88f3a26628) dart:isolate_::__delayEntrypointInvocation@1026248_<anonymous closure> ]
[dart     : sp(0x7f88f33fe728) fp(0x7f88f33fe778) pc(0x7f88f3a26383) dart:core__Closure@0150898_dyn_call ]
[dart     : sp(0x7f88f33fe788) fp(0x7f88f33fe7b0) pc(0x7f88f3a25d58) dart:isolate__RawReceivePortImpl@1026248__handleMessage@1026248 ]
[entry    : sp(0x7f88f33fe7c0) fp(0x7f88f33fe828) pc(0x7f88f42028bd)]

--- Re-run this test:
python tools/test.py -n dartk-linux-debug-x64c standalone_2/fragmentation_test/10
@rmacnak-google rmacnak-google self-assigned this Feb 20, 2021
dart-bot pushed a commit that referenced this issue Feb 20, 2021
This only handles the POSIX case. The Windows case will work exactly the
same as this, so I want to get this reviewed before I start porting it
to windows.

TEST=Manual testing. I'll update the unit tests once it's ported.

Bug: #45059
Change-Id: I0bc0eddd95101fc2fddfe5668488670e741af586
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183142
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
dart-bot pushed a commit that referenced this issue Feb 21, 2021
This reverts commit d10d17c.

Reason for revert: Broke Mac builds

Original change's description:
> [vm] Align heap allocations to 2GB regions in comp ptr mode
>
> This only handles the POSIX case. The Windows case will work exactly the
> same as this, so I want to get this reviewed before I start porting it
> to windows.
>
> TEST=Manual testing. I'll update the unit tests once it's ported.
>
> Bug: #45059
> Change-Id: I0bc0eddd95101fc2fddfe5668488670e741af586
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183142
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

Bug: #45059
Change-Id: I840c31ead015f60bca32b551c8f8d31fa75ad645
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186101
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
dart-bot pushed a commit that referenced this issue Feb 22, 2021
Fixed the mac build.

This reverts commit 0ed3fb3.

Bug: #45059
Change-Id: I0cd6710a641b195403dda717108bdbe3395a21fa
TEST=CI
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186340
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
dart-bot pushed a commit that referenced this issue Feb 23, 2021
…cards.

The scavenger may abort while visiting the remembered cards if we run out of memory. The longjmp implementing this abort would skip ~MonitorLocker, leaving the monitor locked and (in debug mode) Thread::no_safepoint_scope_ unbalanced.

TEST=fragmentation_test
Bug: #45059
Change-Id: I63d77709c8d8948b5827f7ecde5b0ecb3af9a245
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186640
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant