dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.19k stars 1.56k forks source link

Flaky crashes on vm/cc tests on dartk-reload-rollback-linux-debug-x64 and dartk-mac #41609

Open alexmarkov opened 4 years ago

alexmarkov commented 4 years ago

The following flaky crashes can be reproduced in running all vm/cc tests in a loop:

tools/test.py --repeat 100 -n dartk-reload-rollback-linux-debug-x64 vm/cc
Test configuration:
    dartk-reload-rollback-linux-debug-x64(architecture: x64, compiler: dartk, mode: debug, runtime: vm, system: linux, hot-reload-rollback)
Suites tested: vm
[27:08 |  22% | +24795 | -    0]

FAILED: dartk-vm debug_x64 vm/cc/DartAPI_NotifyLowMemory
Expected: Pass
Actual: Crash

--- Command "run_vm_unittest" (took 03.000117s):
DART_CONFIGURATION=DebugX64 out/DebugX64/run_vm_tests --dfe=/usr/local/google/home/alexmarkov/work/dart/sdk/out/DebugX64/gen/kernel-service.dart.snapshot --ignore-unrecognized-flags DartAPI_NotifyLowMemory

exit code:
-6

stdout:
Running test: DartAPI_NotifyLowMemory

stderr:
../../runtime/vm/heap/safepoint.h: 237: error: expected: T->execution_state() == Thread::kThreadInVM
version=2.9.0-edge.b779c938eb61516505a59d861d12c584ca2335e1 (be) (Mon Apr 20 22:12:54 2020 +0000) on "linux_x64"
pid=146186, thread=146186, isolate=isolate(0x564d9336ca00)
isolate_instructions=564d90be2c40, vm_instructions=564d90be2c40
  pc 0x0000564d90fd126c fp 0x00007fffe1c6e7a0 dart::Profiler::DumpStackTrace(void*)+0x7c
  pc 0x0000564d90d68732 fp 0x00007fffe1c6e880 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x0000564d90edc9cb fp 0x00007fffe1c6e8d0 out/DebugX64/run_vm_tests+0x3dd89cb
  pc 0x0000564d90ea21ff fp 0x00007fffe1c6e940 dart::IsolateGroup::ForEachIsolate(std::__2::function<void (dart::Isolate*)>, bool)+0x19f
  pc 0x0000564d90eaa386 fp 0x00007fffe1c6e970 out/DebugX64/run_vm_tests+0x3da6386
  pc 0x0000564d90ea0b49 fp 0x00007fffe1c6e9e0 dart::Isolate::VisitIsolates(dart::IsolateVisitor*)+0x99
  pc 0x0000564d90ea3c2f fp 0x00007fffe1c6ea10 dart::Isolate::NotifyLowMemory()+0x2f
  pc 0x0000564d9154c77a fp 0x00007fffe1c6ea70 Dart_NotifyLowMemory+0x4a
  pc 0x0000564d90ee727e fp 0x00007fffe1c6ead0 dart::NativeEntry::AutoScopeNativeCallWrapperNoStackCheck(_Dart_NativeArguments*, void (*)(_Dart_NativeArguments*))+0xde
  pc 0x00007f7526281649 fp 0x00007fffe1c6eb18 Unknown symbol
  pc 0x00007f7525a02570 fp 0x00007fffe1c6eb48 Unknown symbol
  pc 0x00007f7525a02cc5 fp 0x00007fffe1c6eb98 Unknown symbol
  pc 0x00007f752628188a fp 0x00007fffe1c6ebf8 Unknown symbol
  pc 0x0000564d90e3e7ea fp 0x00007fffe1c6ec90 dart::DartEntry::InvokeCode(dart::Code const&, dart::Array const&, dart::Array const&, dart::Thread*)+0xda
  pc 0x0000564d90e3e13d fp 0x00007fffe1c6ed30 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)+0x28d
  pc 0x0000564d90f47fef fp 0x00007fffe1c6eda0 dart::Library::Invoke(dart::String const&, dart::Array const&, dart::Array const&, bool, bool) const+0x19f
  pc 0x0000564d915627de fp 0x00007fffe1c6eea0 Dart_Invoke+0x5ae
  pc 0x0000564d90a30f89 fp 0x00007fffe1c6ef60 dart::Dart_TestDartAPI_NotifyLowMemory()+0x179
  pc 0x0000564d909bbc6e fp 0x00007fffe1c6ef80 dart::TestCase::Run()+0x1e
  pc 0x0000564d909bbdb3 fp 0x00007fffe1c6efb0 dart::TestCaseBase::RunTest()+0x53
  pc 0x0000564d90b26fe7 fp 0x00007fffe1c6efd0 dart::TestCaseBase::RunAll()+0x27
  pc 0x0000564d909bc401 fp 0x00007fffe1c6f060 out/DebugX64/run_vm_tests+0x38b8401
  pc 0x0000564d909bbf69 fp 0x00007fffe1c6f070 main+0x9
-- End of DumpStackTrace
[exit     : sp(0) fp(0x7fffe1c6eb18) pc(0)]
[dart     : sp(0x7fffe1c6eb28) fp(0x7fffe1c6eb48) pc(0x7f7525a02570) file:///test-lib_::_notifyLowMemory ]
[dart     : sp(0x7fffe1c6eb58) fp(0x7fffe1c6eb98) pc(0x7f7525a02cc5) *file:///test-lib_::_main ]
[entry    : sp(0x7fffe1c6eba8) fp(0x7fffe1c6ebf8) pc(0x7f752628188a)]

--- Re-run this test:
python tools/test.py -n dartk-reload-rollback-linux-debug-x64 vm/cc/DartAPI_NotifyLowMemory
[55:42 |  38% | +42044 | -    1]

FAILED: dartk-vm debug_x64 vm/cc/MessageHandler_Run
Expected: Pass
Actual: Crash

--- Command "run_vm_unittest" (took 71ms):
DART_CONFIGURATION=DebugX64 out/DebugX64/run_vm_tests --dfe=/usr/local/google/home/alexmarkov/work/dart/sdk/out/DebugX64/gen/kernel-service.dart.snapshot --ignore-unrecognized-flags MessageHandler_Run

exit code:
-6

stdout:
Running test: MessageHandler_Run

stderr:
../../runtime/vm/os_thread_linux.cc: 411: error: pthread error: 22 (Invalid argument)
version=2.9.0-edge.b779c938eb61516505a59d861d12c584ca2335e1 (be) (Mon Apr 20 22:12:54 2020 +0000) on "linux_x64"
pid=255649, thread=255656, isolate=(null)((nil))
isolate_instructions=0, vm_instructions=55b4c7f76c40
  pc 0x000055b4c836526c fp 0x00007fe89c4fd660 dart::Profiler::DumpStackTrace(void*)+0x7c
  pc 0x000055b4c80fc732 fp 0x00007fe89c4fd740 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x000055b4c835fe27 fp 0x00007fe89c4fdb70 dart::Monitor::Enter()+0x77
  pc 0x000055b4c82764ad fp 0x00007fe89c4fdc00 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)+0x2bd
  pc 0x000055b4c8277510 fp 0x00007fe89c4fdc80 dart::MessageHandler::TaskCallback()+0x520
  pc 0x000055b4c842a045 fp 0x00007fe89c4fdcd0 dart::ThreadPool::Worker::Loop()+0xe5
  pc 0x000055b4c8429b41 fp 0x00007fe89c4fdd20 dart::ThreadPool::Worker::Main(unsigned long)+0x131
  pc 0x000055b4c835f222 fp 0x00007fe89c4fde70 out/DebugX64/run_vm_tests+0x3ec7222
-- End of DumpStackTrace

===== CRASH =====
si_signo=Segmentation fault(11), si_code=1, si_addr=0x590
Aborting re-entrant request for stack trace.

--- Re-run this test:
python tools/test.py -n dartk-reload-rollback-linux-debug-x64 vm/cc/MessageHandler_Run
[69:28 |  52% | +56951 | -    2]

FAILED: dartk-vm debug_x64 vm/cc/Profiler_ChainedSamples
Expected: Pass
Actual: Crash

--- Command "run_vm_unittest" (took 01.000404s):
DART_CONFIGURATION=DebugX64 out/DebugX64/run_vm_tests --dfe=/usr/local/google/home/alexmarkov/work/dart/sdk/out/DebugX64/gen/kernel-service.dart.snapshot --ignore-unrecognized-flags Profiler_ChainedSamples

exit code:
-6

stdout:
Running test: Profiler_ChainedSamples

stderr:
../../runtime/vm/thread_interrupter.h: 138: error: expected: old_value < 0
version=2.9.0-edge.b779c938eb61516505a59d861d12c584ca2335e1 (be) (Mon Apr 20 22:12:54 2020 +0000) on "linux_x64"
pid=57368, thread=57368, isolate=isolate(0x56280ea2ea00)
isolate_instructions=56280bfdbc40, vm_instructions=56280bfdbc40
  pc 0x000056280c3ca26c fp 0x00007ffd9ee4c4f0 dart::Profiler::DumpStackTrace(void*)+0x7c
  pc 0x000056280c161732 fp 0x00007ffd9ee4c5d0 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x000056280c3d156f fp 0x00007ffd9ee4c690 out/DebugX64/run_vm_tests+0x3ed456f
  pc 0x000056280bed1d8b fp 0x00007ffd9ee4f420 out/DebugX64/run_vm_tests+0x39d4d8b
  pc 0x000056280bed1af7 fp 0x00007ffd9ee4f4c0 dart::Dart_TestProfiler_ChainedSamples()+0xd7
  pc 0x000056280bdb4c6e fp 0x00007ffd9ee4f4e0 dart::TestCase::Run()+0x1e
  pc 0x000056280bdb4db3 fp 0x00007ffd9ee4f510 dart::TestCaseBase::RunTest()+0x53
  pc 0x000056280bf1ffe7 fp 0x00007ffd9ee4f530 dart::TestCaseBase::RunAll()+0x27
  pc 0x000056280bdb5401 fp 0x00007ffd9ee4f5c0 out/DebugX64/run_vm_tests+0x38b8401
  pc 0x000056280bdb4f69 fp 0x00007ffd9ee4f5d0 main+0x9
-- End of DumpStackTrace

--- Re-run this test:
python tools/test.py -n dartk-reload-rollback-linux-debug-x64 vm/cc/Profiler_ChainedSamples
[71:59 |  53% | +57825 | -    3]

FAILED: dartk-vm debug_x64 vm/cc/Service_Profile
Expected: Pass
Actual: Crash

--- Command "run_vm_unittest" (took 01.000341s):
DART_CONFIGURATION=DebugX64 out/DebugX64/run_vm_tests --dfe=/usr/local/google/home/alexmarkov/work/dart/sdk/out/DebugX64/gen/kernel-service.dart.snapshot --ignore-unrecognized-flags Service_Profile

exit code:
-6

stdout:
Running test: Service_Profile

stderr:
../../runtime/vm/thread_interrupter.h: 138: error: expected: old_value < 0
version=2.9.0-edge.b779c938eb61516505a59d861d12c584ca2335e1 (be) (Mon Apr 20 22:12:54 2020 +0000) on "linux_x64"
pid=63455, thread=63455, isolate=isolate(0x55bc27d18a00)
isolate_instructions=55bc25625c40, vm_instructions=55bc25625c40
  pc 0x000055bc25a1426c fp 0x00007ffc3195a8b0 dart::Profiler::DumpStackTrace(void*)+0x7c
  pc 0x000055bc257ab732 fp 0x00007ffc3195a990 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x000055bc25a1b56f fp 0x00007ffc3195aa50 out/DebugX64/run_vm_tests+0x3ed456f
  pc 0x000055bc25a1d3a1 fp 0x00007ffc3195ab50 dart::ProfilerService::PrintJSONImpl(dart::Thread*, dart::JSONStream*, dart::SampleFilter*, dart::SampleBuffer*, bool)+0xe1
  pc 0x000055bc25a1d4e0 fp 0x00007ffc3195abc0 dart::ProfilerService::PrintJSON(dart::JSONStream*, long, long, bool)+0xa0
  pc 0x000055bc25a9dcce fp 0x00007ffc3195ac00 out/DebugX64/run_vm_tests+0x3f56cce
  pc 0x000055bc25a99dcf fp 0x00007ffc3195ad70 dart::Service::InvokeMethod(dart::Isolate*, dart::Array const&, bool)+0x50f
  pc 0x000055bc25a9a9de fp 0x00007ffc3195ada0 dart::Service::HandleIsolateMessage(dart::Isolate*, dart::Array const&)+0x1e
  pc 0x000055bc255310c6 fp 0x00007ffc3195af50 dart::Dart_TestService_Profile()+0x536
  pc 0x000055bc253fec6e fp 0x00007ffc3195af70 dart::TestCase::Run()+0x1e
  pc 0x000055bc253fedb3 fp 0x00007ffc3195afa0 dart::TestCaseBase::RunTest()+0x53
  pc 0x000055bc25569fe7 fp 0x00007ffc3195afc0 dart::TestCaseBase::RunAll()+0x27
  pc 0x000055bc253ff401 fp 0x00007ffc3195b050 out/DebugX64/run_vm_tests+0x38b8401
  pc 0x000055bc253fef69 fp 0x00007ffc3195b060 main+0x9
-- End of DumpStackTrace

--- Re-run this test:
python tools/test.py -n dartk-reload-rollback-linux-debug-x64 vm/cc/Service_Profile
[72:01 |  53% | +57832 | -    4]

FAILED: dartk-vm debug_x64 vm/cc/Service_Profile
Expected: Pass
Actual: Crash

--- Command "run_vm_unittest" (took 01.000348s):
DART_CONFIGURATION=DebugX64 out/DebugX64/run_vm_tests --dfe=/usr/local/google/home/alexmarkov/work/dart/sdk/out/DebugX64/gen/kernel-service.dart.snapshot --ignore-unrecognized-flags Service_Profile

exit code:
-6

stdout:
Running test: Service_Profile

stderr:
../../runtime/vm/thread_interrupter.h: 138: error: expected: old_value < 0
version=2.9.0-edge.b779c938eb61516505a59d861d12c584ca2335e1 (be) (Mon Apr 20 22:12:54 2020 +0000) on "linux_x64"
pid=63520, thread=63520, isolate=isolate(0x56001d04aa00)
isolate_instructions=56001a300c40, vm_instructions=56001a300c40
  pc 0x000056001a6ef26c fp 0x00007fffc59ed9c0 dart::Profiler::DumpStackTrace(void*)+0x7c
  pc 0x000056001a486732 fp 0x00007fffc59edaa0 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x000056001a6f656f fp 0x00007fffc59edb60 out/DebugX64/run_vm_tests+0x3ed456f
  pc 0x000056001a6f83a1 fp 0x00007fffc59edc60 dart::ProfilerService::PrintJSONImpl(dart::Thread*, dart::JSONStream*, dart::SampleFilter*, dart::SampleBuffer*, bool)+0xe1
  pc 0x000056001a6f84e0 fp 0x00007fffc59edcd0 dart::ProfilerService::PrintJSON(dart::JSONStream*, long, long, bool)+0xa0
  pc 0x000056001a778cce fp 0x00007fffc59edd10 out/DebugX64/run_vm_tests+0x3f56cce
  pc 0x000056001a774dcf fp 0x00007fffc59ede80 dart::Service::InvokeMethod(dart::Isolate*, dart::Array const&, bool)+0x50f
  pc 0x000056001a7759de fp 0x00007fffc59edeb0 dart::Service::HandleIsolateMessage(dart::Isolate*, dart::Array const&)+0x1e
  pc 0x000056001a20c0c6 fp 0x00007fffc59ee060 dart::Dart_TestService_Profile()+0x536
  pc 0x000056001a0d9c6e fp 0x00007fffc59ee080 dart::TestCase::Run()+0x1e
  pc 0x000056001a0d9db3 fp 0x00007fffc59ee0b0 dart::TestCaseBase::RunTest()+0x53
  pc 0x000056001a244fe7 fp 0x00007fffc59ee0d0 dart::TestCaseBase::RunAll()+0x27
  pc 0x000056001a0da401 fp 0x00007fffc59ee160 out/DebugX64/run_vm_tests+0x38b8401
  pc 0x000056001a0d9f69 fp 0x00007fffc59ee170 main+0x9
-- End of DumpStackTrace

--- Re-run this test:
python tools/test.py -n dartk-reload-rollback-linux-debug-x64 vm/cc/Service_Profile
[72:24 |  53% | +58243 | -    5]

FAILED: dartk-vm debug_x64 vm/cc/Service_Profile
Expected: Pass
Actual: Crash

--- Command "run_vm_unittest" (took 01.000103s):
DART_CONFIGURATION=DebugX64 out/DebugX64/run_vm_tests --dfe=/usr/local/google/home/alexmarkov/work/dart/sdk/out/DebugX64/gen/kernel-service.dart.snapshot --ignore-unrecognized-flags Service_Profile

exit code:
-6

stdout:
Running test: Service_Profile

stderr:
../../runtime/vm/thread_interrupter.h: 138: error: expected: old_value < 0
version=2.9.0-edge.b779c938eb61516505a59d861d12c584ca2335e1 (be) (Mon Apr 20 22:12:54 2020 +0000) on "linux_x64"
pid=65464, thread=65464, isolate=isolate(0x55fb746daa00)
isolate_instructions=55fb7273dc40, vm_instructions=55fb7273dc40
  pc 0x000055fb72b2c26c fp 0x00007ffc8d52def0 dart::Profiler::DumpStackTrace(void*)+0x7c
  pc 0x000055fb728c3732 fp 0x00007ffc8d52dfd0 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x000055fb72b3356f fp 0x00007ffc8d52e090 out/DebugX64/run_vm_tests+0x3ed456f
  pc 0x000055fb72b353a1 fp 0x00007ffc8d52e190 dart::ProfilerService::PrintJSONImpl(dart::Thread*, dart::JSONStream*, dart::SampleFilter*, dart::SampleBuffer*, bool)+0xe1
  pc 0x000055fb72b354e0 fp 0x00007ffc8d52e200 dart::ProfilerService::PrintJSON(dart::JSONStream*, long, long, bool)+0xa0
  pc 0x000055fb72bb5cce fp 0x00007ffc8d52e240 out/DebugX64/run_vm_tests+0x3f56cce
  pc 0x000055fb72bb1dcf fp 0x00007ffc8d52e3b0 dart::Service::InvokeMethod(dart::Isolate*, dart::Array const&, bool)+0x50f
  pc 0x000055fb72bb29de fp 0x00007ffc8d52e3e0 dart::Service::HandleIsolateMessage(dart::Isolate*, dart::Array const&)+0x1e
  pc 0x000055fb726490c6 fp 0x00007ffc8d52e590 dart::Dart_TestService_Profile()+0x536
  pc 0x000055fb72516c6e fp 0x00007ffc8d52e5b0 dart::TestCase::Run()+0x1e
  pc 0x000055fb72516db3 fp 0x00007ffc8d52e5e0 dart::TestCaseBase::RunTest()+0x53
  pc 0x000055fb72681fe7 fp 0x00007ffc8d52e600 dart::TestCaseBase::RunAll()+0x27
  pc 0x000055fb72517401 fp 0x00007ffc8d52e690 out/DebugX64/run_vm_tests+0x38b8401
  pc 0x000055fb72516f69 fp 0x00007ffc8d52e6a0 main+0x9
-- End of DumpStackTrace

--- Re-run this test:
python tools/test.py -n dartk-reload-rollback-linux-debug-x64 vm/cc/Service_Profile
[72:30 |  53% | +58425 | -    6]

FAILED: dartk-vm debug_x64 vm/cc/Service_Profile
Expected: Pass
Actual: Crash

--- Command "run_vm_unittest" (took 01.000085s):
DART_CONFIGURATION=DebugX64 out/DebugX64/run_vm_tests --dfe=/usr/local/google/home/alexmarkov/work/dart/sdk/out/DebugX64/gen/kernel-service.dart.snapshot --ignore-unrecognized-flags Service_Profile

exit code:
-6

stdout:
Running test: Service_Profile

stderr:
../../runtime/vm/thread_interrupter.h: 138: error: expected: old_value < 0
version=2.9.0-edge.b779c938eb61516505a59d861d12c584ca2335e1 (be) (Mon Apr 20 22:12:54 2020 +0000) on "linux_x64"
pid=66104, thread=66104, isolate=isolate(0x5583aeb8ea00)
isolate_instructions=5583acd1bc40, vm_instructions=5583acd1bc40
  pc 0x00005583ad10a26c fp 0x00007ffe0d4ea0c0 dart::Profiler::DumpStackTrace(void*)+0x7c
  pc 0x00005583acea1732 fp 0x00007ffe0d4ea1a0 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x00005583ad11156f fp 0x00007ffe0d4ea260 out/DebugX64/run_vm_tests+0x3ed456f
  pc 0x00005583ad1133a1 fp 0x00007ffe0d4ea360 dart::ProfilerService::PrintJSONImpl(dart::Thread*, dart::JSONStream*, dart::SampleFilter*, dart::SampleBuffer*, bool)+0xe1
  pc 0x00005583ad1134e0 fp 0x00007ffe0d4ea3d0 dart::ProfilerService::PrintJSON(dart::JSONStream*, long, long, bool)+0xa0
  pc 0x00005583ad193cce fp 0x00007ffe0d4ea410 out/DebugX64/run_vm_tests+0x3f56cce
  pc 0x00005583ad18fdcf fp 0x00007ffe0d4ea580 dart::Service::InvokeMethod(dart::Isolate*, dart::Array const&, bool)+0x50f
  pc 0x00005583ad1909de fp 0x00007ffe0d4ea5b0 dart::Service::HandleIsolateMessage(dart::Isolate*, dart::Array const&)+0x1e
  pc 0x00005583acc270c6 fp 0x00007ffe0d4ea760 dart::Dart_TestService_Profile()+0x536
  pc 0x00005583acaf4c6e fp 0x00007ffe0d4ea780 dart::TestCase::Run()+0x1e
  pc 0x00005583acaf4db3 fp 0x00007ffe0d4ea7b0 dart::TestCaseBase::RunTest()+0x53
  pc 0x00005583acc5ffe7 fp 0x00007ffe0d4ea7d0 dart::TestCaseBase::RunAll()+0x27
  pc 0x00005583acaf5401 fp 0x00007ffe0d4ea860 out/DebugX64/run_vm_tests+0x38b8401
  pc 0x00005583acaf4f69 fp 0x00007ffe0d4ea870 main+0x9
-- End of DumpStackTrace

--- Re-run this test:
python tools/test.py -n dartk-reload-rollback-linux-debug-x64 vm/cc/Service_Profile
[72:39 |  54% | +58706 | -    7]

FAILED: dartk-vm debug_x64 vm/cc/Service_Profile
Expected: Pass
Actual: Crash

--- Command "run_vm_unittest" (took 01.000342s):
DART_CONFIGURATION=DebugX64 out/DebugX64/run_vm_tests --dfe=/usr/local/google/home/alexmarkov/work/dart/sdk/out/DebugX64/gen/kernel-service.dart.snapshot --ignore-unrecognized-flags Service_Profile

exit code:
-6

stdout:
Running test: Service_Profile

stderr:
../../runtime/vm/thread_interrupter.h: 138: error: expected: old_value < 0
version=2.9.0-edge.b779c938eb61516505a59d861d12c584ca2335e1 (be) (Mon Apr 20 22:12:54 2020 +0000) on "linux_x64"
pid=67070, thread=67070, isolate=isolate(0x5594c232ca00)
isolate_instructions=5594bff51c40, vm_instructions=5594bff51c40
  pc 0x00005594c034026c fp 0x00007ffe73ef0720 dart::Profiler::DumpStackTrace(void*)+0x7c
  pc 0x00005594c00d7732 fp 0x00007ffe73ef0800 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x00005594c034756f fp 0x00007ffe73ef08c0 out/DebugX64/run_vm_tests+0x3ed456f
  pc 0x00005594c03493a1 fp 0x00007ffe73ef09c0 dart::ProfilerService::PrintJSONImpl(dart::Thread*, dart::JSONStream*, dart::SampleFilter*, dart::SampleBuffer*, bool)+0xe1
  pc 0x00005594c03494e0 fp 0x00007ffe73ef0a30 dart::ProfilerService::PrintJSON(dart::JSONStream*, long, long, bool)+0xa0
  pc 0x00005594c03c9cce fp 0x00007ffe73ef0a70 out/DebugX64/run_vm_tests+0x3f56cce
  pc 0x00005594c03c5dcf fp 0x00007ffe73ef0be0 dart::Service::InvokeMethod(dart::Isolate*, dart::Array const&, bool)+0x50f
  pc 0x00005594c03c69de fp 0x00007ffe73ef0c10 dart::Service::HandleIsolateMessage(dart::Isolate*, dart::Array const&)+0x1e
  pc 0x00005594bfe5d0c6 fp 0x00007ffe73ef0dc0 dart::Dart_TestService_Profile()+0x536
  pc 0x00005594bfd2ac6e fp 0x00007ffe73ef0de0 dart::TestCase::Run()+0x1e
  pc 0x00005594bfd2adb3 fp 0x00007ffe73ef0e10 dart::TestCaseBase::RunTest()+0x53
  pc 0x00005594bfe95fe7 fp 0x00007ffe73ef0e30 dart::TestCaseBase::RunAll()+0x27
  pc 0x00005594bfd2b401 fp 0x00007ffe73ef0ec0 out/DebugX64/run_vm_tests+0x38b8401
  pc 0x00005594bfd2af69 fp 0x00007ffe73ef0ed0 main+0x9
-- End of DumpStackTrace

--- Re-run this test:
python tools/test.py -n dartk-reload-rollback-linux-debug-x64 vm/cc/Service_Profile
[73:00 |  54% | +59419 | -    8]

FAILED: dartk-vm debug_x64 vm/cc/Service_Profile
Expected: Pass
Actual: Crash

--- Command "run_vm_unittest" (took 01.000115s):
DART_CONFIGURATION=DebugX64 out/DebugX64/run_vm_tests --dfe=/usr/local/google/home/alexmarkov/work/dart/sdk/out/DebugX64/gen/kernel-service.dart.snapshot --ignore-unrecognized-flags Service_Profile

exit code:
-6

stdout:
Running test: Service_Profile

stderr:
../../runtime/vm/thread_interrupter.h: 138: error: expected: old_value < 0
version=2.9.0-edge.b779c938eb61516505a59d861d12c584ca2335e1 (be) (Mon Apr 20 22:12:54 2020 +0000) on "linux_x64"
pid=69850, thread=69850, isolate=isolate(0x5565e5890a00)
isolate_instructions=5565e37e4c40, vm_instructions=5565e37e4c40
  pc 0x00005565e3bd326c fp 0x00007ffdc71c64a0 dart::Profiler::DumpStackTrace(void*)+0x7c
  pc 0x00005565e396a732 fp 0x00007ffdc71c6580 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x00005565e3bda56f fp 0x00007ffdc71c6640 out/DebugX64/run_vm_tests+0x3ed456f
  pc 0x00005565e3bdc3a1 fp 0x00007ffdc71c6740 dart::ProfilerService::PrintJSONImpl(dart::Thread*, dart::JSONStream*, dart::SampleFilter*, dart::SampleBuffer*, bool)+0xe1
  pc 0x00005565e3bdc4e0 fp 0x00007ffdc71c67b0 dart::ProfilerService::PrintJSON(dart::JSONStream*, long, long, bool)+0xa0
  pc 0x00005565e3c5ccce fp 0x00007ffdc71c67f0 out/DebugX64/run_vm_tests+0x3f56cce
  pc 0x00005565e3c58dcf fp 0x00007ffdc71c6960 dart::Service::InvokeMethod(dart::Isolate*, dart::Array const&, bool)+0x50f
  pc 0x00005565e3c599de fp 0x00007ffdc71c6990 dart::Service::HandleIsolateMessage(dart::Isolate*, dart::Array const&)+0x1e
  pc 0x00005565e36f00c6 fp 0x00007ffdc71c6b40 dart::Dart_TestService_Profile()+0x536
  pc 0x00005565e35bdc6e fp 0x00007ffdc71c6b60 dart::TestCase::Run()+0x1e
  pc 0x00005565e35bddb3 fp 0x00007ffdc71c6b90 dart::TestCaseBase::RunTest()+0x53
  pc 0x00005565e3728fe7 fp 0x00007ffdc71c6bb0 dart::TestCaseBase::RunAll()+0x27
  pc 0x00005565e35be401 fp 0x00007ffdc71c6c40 out/DebugX64/run_vm_tests+0x38b8401
  pc 0x00005565e35bdf69 fp 0x00007ffdc71c6c50 main+0x9
-- End of DumpStackTrace

--- Re-run this test:
python tools/test.py -n dartk-reload-rollback-linux-debug-x64 vm/cc/Service_Profile
[167:51 | 100% | +108491 | -    9]

These crashes appear on flakiness dashboard as well. I was not able to reproduce them when running test cases separately.

/cc @rmacnak-google @aam

dcharkes commented 3 years ago

Also flakes on mac

/=====================================================================================================\
| dartk-weak-asserts-mac-debug-x64:vm/cc/DartAPI_NotifyLowMemory broke (Pass -> Crash, expected Pass) |
\=====================================================================================================/

--- Command "run_vm_unittest" (took 12.000824s):
DART_CONFIGURATION=DebugX64 xcodebuild/DebugX64/run_vm_tests --dfe=/b/s/w/ir/xcodebuild/DebugX64/gen/kernel-service.dart.snapshot --ignore-unrecognized-flags DartAPI_NotifyLowMemory

exit code:
-6

stdout:
Running test: DartAPI_NotifyLowMemory

stderr:
../../runtime/vm/heap/safepoint.h: 238: error: expected: T->execution_state() == Thread::kThreadInVM
version=2.12.0-edge.3a73870244cfe80b78f56102438b10e9a0f1a810 (be) (Mon Nov 23 22:07:07 2020 +0000) on "macos_x64"
pid=44315, thread=775, isolate_group=isolate(0x7f898502c200), isolate=isolate(0x7f8985038200)
isolate_instructions=100a2de20, vm_instructions=100a2de20
  pc 0x0000000100dddbb4 fp 0x00007ffeef497ad0 dart::Profiler::DumpStackTrace(void*)+0x64
  pc 0x0000000100b8e902 fp 0x00007ffeef497bb0 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x000000010094e102 fp 0x00007ffeef497be0 dart::TransitionVMToBlocked::TransitionVMToBlocked(dart::Thread*)+0x112
  pc 0x0000000100cebd29 fp 0x00007ffeef497c20 dart::SafepointMonitorLocker::SafepointMonitorLocker(dart::Monitor*)+0x49
  pc 0x000000010094f40c fp 0x00007ffeef497c70 dart::SafepointRwLock::EnterRead()+0x1c
  pc 0x0000000100cb16f2 fp 0x00007ffeef497ce0 dart::IsolateGroup::ForEachIsolate(std::__2::function<void (dart::Isolate*)>, bool)+0x112
  pc 0x0000000100cb82e4 fp 0x00007ffeef497d20 void std::__2::__function::__policy_invoker<void (dart::IsolateGroup*)>::__call_impl<std::__2::__function::__default_alloc_func<dart::Isolate::VisitIsolates(dart::IsolateVisitor*)::$_6, void (dart::IsolateGroup*)> >(std::__2::__function::__policy_storage const*, dart::IsolateGroup*)+0x44
  pc 0x0000000100caffd9 fp 0x00007ffeef497da0 dart::Isolate::VisitIsolates(dart::IsolateVisitor*)+0x99
  pc 0x0000000100cb25bf fp 0x00007ffeef497dd0 dart::Isolate::NotifyLowMemory()+0x2f
  pc 0x0000000101382cc0 fp 0x00007ffeef497e30 Dart_NotifyLowMemory+0x30
  pc 0x0000000100cf3a17 fp 0x00007ffeef497e90 dart::NativeEntry::AutoScopeNativeCallWrapperNoStackCheck(_Dart_NativeArguments*, void (*)(_Dart_NativeArguments*))+0xe7
  pc 0x0000000105802614 fp 0x00007ffeef497ed0 Unknown symbol
  pc 0x0000000105e02110 fp 0x00007ffeef497f00 Unknown symbol
  pc 0x0000000105e02a20 fp 0x00007ffeef497f50 Unknown symbol
  pc 0x000000010580286d fp 0x00007ffeef497fb8 Unknown symbol
  pc 0x0000000100c657fc fp 0x00007ffeef498050 dart::DartEntry::InvokeCode(dart::Code const&, dart::Array const&, dart::Array const&, dart::Thread*)+0xfc
  pc 0x0000000100c6555d fp 0x00007ffeef4980c0 dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)+0x11d
  pc 0x0000000100d537f5 fp 0x00007ffeef498140 dart::Library::Invoke(dart::String const&, dart::Array const&, dart::Array const&, bool, bool) const+0x215
  pc 0x0000000101398ded fp 0x00007ffeef498240 Dart_Invoke+0x59d
  pc 0x000000010085bd46 fp 0x00007ffeef498300 dart::Dart_TestDartAPI_NotifyLowMemory()+0x176
  pc 0x00000001007e13ee fp 0x00007ffeef498320 dart::TestCase::Run()+0x1e
  pc 0x00000001007e1553 fp 0x00007ffeef498350 dart::TestCaseBase::RunTest()+0x53
  pc 0x0000000100963de7 fp 0x00007ffeef498370 dart::TestCaseBase::RunAll()+0x27
  pc 0x00000001007e1b79 fp 0x00007ffeef4983b0 dart::Main(int, char const**)+0x469
  pc 0x00000001007e1709 fp 0x00007ffeef4983c0 main+0x9
  pc 0x00007fff5f62a015 fp 0x00007ffeef4983d0 start+0x1
-- End of DumpStackTrace
[exit     : sp(0) fp(0x7ffeef497ed0) pc(0)]
[dart     : sp(0x7ffeef497ee0) fp(0x7ffeef497f00) pc(0x105e02110) file:///test-lib_::_notifyLowMemory ]
[dart     : sp(0x7ffeef497f10) fp(0x7ffeef497f50) pc(0x105e02a20) *file:///test-lib_::_main ]
[entry    : sp(0x7ffeef497f60) fp(0x7ffeef497fb8) pc(0x10580286d)]

--- Re-run this test:
python tools/test.py -n dartk-weak-asserts-mac-debug-x64 vm/cc/DartAPI_NotifyLowMemory

https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8862777175685409904/+/steps/test_results/0/logs/ignored_flaky_test_failure_logs/0