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

Test corelib_2/queue_test crashed in generated code #35338

Open
mkustermann opened this Issue Dec 6, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@mkustermann
Member

mkustermann commented Dec 6, 2018

From this log:


FAILED: app_jitk-vm debug_x64 corelib_2/queue_test
Expected: Pass
Actual: Crash

--- Command "app_jit" (took 02.000898s):
DART_CONFIGURATION=DebugX64 out/DebugX64/dart --snapshot=/b/s/w/ir/cache/builder/sdk/out/DebugX64/generated_compilations/app_jitk/tests_corelib_2_queue_test/out.jitsnapshot --snapshot-kind=app-jit --sync-async --ignore-unrecognized-flags --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/tests/corelib_2/queue_test.dart

exit code:
0

--- Command "vm" (took 709ms):
DART_CONFIGURATION=DebugX64 out/DebugX64/dart --sync-async --ignore-unrecognized-flags --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/out/DebugX64/generated_compilations/app_jitk/tests_corelib_2_queue_test/out.jitsnapshot

exit code:
-6

stderr:
===== CRASH =====
version=2.2.0-edge.5451ac62e26caeacd8a8c4a660ac320bdf9c84f3 (Thu Dec 6 03:29:12 2018 +0000) on "linux_x64"
si_signo=Trace/breakpoint trap(5), si_code=128, si_addr=(nil)
thread=25507, isolate=out.jitsnapshot:main()(0x55fca29ca900)
  [0x00007fae3cb49050] Unknown symbol
  [0x00007fae3cb49050] Unknown symbol
  [0x00007fae3cb75e87] Unknown symbol
  [0x00007fae3cb76135] Unknown symbol
  [0x00007fae3cb76f1f] Unknown symbol
  [0x00007fae3cb7c1a9] Unknown symbol
  [0x00007fae3cb76bf1] Unknown symbol
  [0x00007fae3cb81b45] Unknown symbol
  [0x00007fae3cb81d97] Unknown symbol
  [0x00007fae3cb6a6d6] Unknown symbol
  [0x00007fae3cb6a9cb] Unknown symbol
  [0x00007fae3cb52b19] Unknown symbol
  [0x00007fae3cb817d0] Unknown symbol
  [0x00007fae3ca81491] Unknown symbol
  [0x000055fca02d9e46] dart::DartEntry::InvokeFunction(dart::Function const&, dart::Array const&, dart::Array const&, unsigned long)
  [0x000055fca02dd164] dart::DartLibraryCalls::HandleMessage(dart::Object const&, dart::Instance const&)
  [0x000055fca031a4ee] dart::IsolateMessageHandler::HandleMessage(dart::Message*)
  [0x000055fca0359568] dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)
  [0x000055fca035a2d6] dart::MessageHandler::TaskCallback()
  [0x000055fca04f653c] dart::ThreadPool::Worker::Loop()
  [0x000055fca04f601a] dart::ThreadPool::Worker::Main(unsigned long)
  [0x000055fca042ec85] Unknown symbol
-- End of DumpStackTrace

--- Re-run this test:
python tools/test.py -n app_jitk-linux-debug-x64 corelib_2/queue_test

Cores at gs://dart-temp-crash-archive/a51a33a2-093f-4408-b896-5eed03688957/*.

Here are the stacks:

(gdb) t a a bt

Isolate: "out.jitsnapshot:main()"

  Thread 1 (Thread 0x7fae3b8ff700 (LWP 25507)):
  #0  0x00007fae3bd8fc37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
  #1  0x00007fae3bd93028 in __GI_abort () at abort.c:89
  #2  0x000055fca007de2a in dart::bin::segv_handler (signal=<optimized out>, siginfo=0x7fae3b8fd830, context=<optimized out>) at ../../runtime/bin/platform_linux.cc:36
  #3  <signal handler called>
  #4  0x00007fae3cb49050 in ?? ()
  ....

  Thread 8 (Thread 0x7fae3607f700 (LWP 25529)):
  #0  __lll_unlock_wake () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:371
  #1  0x00007fae3c63b894 in _L_unlock_722 () from /lib/x86_64-linux-gnu/libpthread.so.0
  #2  0x00007fae3c63b7e4 in __pthread_mutex_unlock_usercnt (decr=1, mutex=0x55fca29a48a0) at pthread_mutex_unlock.c:57
  #3  __GI___pthread_mutex_unlock (mutex=0x55fca29a48a0) at pthread_mutex_unlock.c:310
  #4  0x000055fca042f8df in dart::Monitor::Exit (this=0x55fca29a48a0) at ../../runtime/vm/os_thread_linux.cc:420
  #5  0x000055fca0698172 in ~MonitorLocker (this=<optimized out>) at ../../runtime/vm/lockers.h:143
  #6  dart::ThreadBarrier::Exit (this=0x7fae3647ba38) at ../../runtime/vm/thread_barrier.h:93
  #7  0x000055fca06a31b4 in dart::MarkTask::Run (this=0x55fca29c81e0) at ../../runtime/vm/heap/marker.cc:679
  #8  0x000055fca04f653c in dart::ThreadPool::Worker::Loop (this=0x55fca29fa320) at ../../runtime/vm/thread_pool.cc:381
  #9  0x000055fca04f601a in dart::ThreadPool::Worker::Main (args=94543548490528) at ../../runtime/vm/thread_pool.cc:436
  #10 0x000055fca042ec85 in dart::ThreadStart (data_ptr=<optimized out>) at ../../runtime/vm/os_thread_linux.cc:131
  #11 0x00007fae3c638184 in start_thread (arg=0x7fae3607f700) at pthread_create.c:312
  #12 0x00007fae3be5703d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

  Thread 7 (Thread 0x7fae3647e700 (LWP 25518)):
  #0  dart::AssertAssignableInstr::MakeLocationSummary (this=<optimized out>, zone=0x7fae3647c898, opt=<optimized out>) at ../../runtime/vm/compiler/backend/il_x64.cc:427
  #1  0x000055fca05b2781 in InitializeLocationSummary (this=0x55fca318a908, zone=0xfffe, optimizing=255) at ../../runtime/vm/compiler/backend/il.h:766
  #2  dart::SSALivenessAnalysis::ComputeInitialSets (this=0x7fae3647be20) at ../../runtime/vm/compiler/backend/linearscan.cc:188
  #3  0x000055fca0536846 in dart::LivenessAnalysis::Analyze (this=0x7fae3647be20) at ../../runtime/vm/compiler/backend/flow_graph.cc:694
  #4  0x000055fca05bdf73 in dart::FlowGraphAllocator::AllocateRegisters (this=0x7fae3647bd60) at ../../runtime/vm/compiler/backend/linearscan.cc:2968
  #5  0x000055fca05fb5c7 in dart::CompilerPass_AllocateRegisters::DoBody (this=<optimized out>, state=<optimized out>) at ../../runtime/vm/compiler/compiler_pass.cc:390
  #6  0x000055fca05fa43f in dart::CompilerPass::Run (this=0x55fca097bec8 <dart::compiler_pass_AllocateRegisters>, state=0x7fae3647c6a8) at ../../runtime/vm/compiler/compiler_pass.cc:178
  #7  0x000055fca05fa84d in dart::CompilerPass::RunPipeline (mode=<optimized out>, pass_state=0x7fae3647c6a8) at ../../runtime/vm/compiler/compiler_pass.cc:267
  #8  0x000055fca0679e41 in dart::CompileParsedFunctionHelper::Compile (this=0x7fae3647d278, pipeline=0x7fae3647d3d8) at ../../runtime/vm/compiler/jit/compiler.cc:815
  #9  0x000055fca067b1a9 in dart::CompileFunctionHelper (pipeline=0x7fae3647d3d8, function=..., optimized=<optimized out>, osr_id=-1) at ../../runtime/vm/compiler/jit/compiler.cc:948
  #10 0x000055fca067c4a8 in dart::Compiler::CompileOptimizedFunction (thread=0x55fca2f0e000, function=..., osr_id=-1) at ../../runtime/vm/compiler/jit/compiler.cc:1219
  #11 0x000055fca067e626 in dart::BackgroundCompiler::Run (this=0x55fca29a2330) at ../../runtime/vm/compiler/jit/compiler.cc:1639
  #12 0x000055fca04f653c in dart::ThreadPool::Worker::Loop (this=0x55fca29fa500) at ../../runtime/vm/thread_pool.cc:381
  #13 0x000055fca04f601a in dart::ThreadPool::Worker::Main (args=94543548491008) at ../../runtime/vm/thread_pool.cc:436
  #14 0x000055fca042ec85 in dart::ThreadStart (data_ptr=<optimized out>) at ../../runtime/vm/os_thread_linux.cc:131
  #15 0x00007fae3c638184 in start_thread (arg=0x7fae3647e700) at pthread_create.c:312
  #16 0x00007fae3be5703d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

"vm-service"
  Thread 5 (Thread 0x7fae3657f700 (LWP 25517)):
  #0  decode (value=461338) at ../../runtime/vm/bitfield.h:49
  #1  GetClassId (this=0x7fae36a8c8e1) at ../../runtime/vm/raw_object.h:680
  #2  SetRaw (this=0x7fae3657d7c0, value=0x7fae36a8c8e1) at ../../runtime/vm/object.h:9438
  #3  dart::Object::initializeHandle (obj=0x7fae3657d7c0, raw_ptr=0x7fae36a8c8e1) at ../../runtime/vm/object.h:645
  #4  0x000055fca0408872 in operator= (this=0x7fae3657cfc0, value=0x36a8c8e0) at ../../runtime/vm/object.h:251
  #5  dart::HashTable<dart::ClassFunctionsTraits, 0l, 0l>::FindKey<dart::FunctionName> (this=0x7fae3657d098, key=...) at ../../runtime/vm/hash_table.h:167
  #6  0x000055fca038eee4 in GetOrNull<dart::FunctionName> (this=0x7fae3657d7c0, key=..., present=<optimized out>) at ../../runtime/vm/hash_table.h:680
  #7  dart::Class::LookupFunction (this=<optimized out>, name=..., kind=dart::Class::kInstance) at ../../runtime/vm/object.cc:4643
  #8  0x000055fca049292b in dart::Resolver::ResolveDynamicAnyArgs (zone=0x7fae3657d2f8, receiver_class=..., function_name=..., allow_add=false) at ../../runtime/vm/resolver.cc:115
  #9  0x000055fca049267d in dart::Resolver::ResolveDynamicForReceiverClass (receiver_class=..., function_name=..., args_desc=..., allow_add=true) at ../../runtime/vm/resolver.cc:43
  #10 0x000055fca04a69cc in dart::InlineCacheMissHandler (args=..., ic_data=...) at ../../runtime/vm/runtime_entry.cc:1135
  #11 0x000055fca049b7f9 in DRT_HelperInlineCacheMissHandlerOneArg (zone=<optimized out>, arguments=..., isolate=<optimized out>, thread=<optimized out>) at ../../runtime/vm/runtime_entry.cc:1224
  #12 dart::DRT_InlineCacheMissHandlerOneArg (arguments=...) at ../../runtime/vm/runtime_entry.cc:1218
  #13 0x00007fae3ca80fce in ?? ()
  #14 0x000055fca29e8800 in ?? ()
  #15 0x0000000000000002 in ?? ()
  #16 0x00007fae3657dc50 in ?? ()
  #17 0x00007fae3657dc58 in ?? ()
  #18 0x00007fae3657dc58 in ?? ()
  #19 0x00007fae3cb06341 in ?? ()
  #20 0x00007fae3cb03d71 in ?? ()
  #21 0x00007fae3657dc80 in ?? ()
  #22 0x00007fae3ca82165 in ?? ()
  #23 0x00007fae360b9511 in ?? ()
  #24 0x00007fae36fe1959 in ?? ()
  #25 0x0000000000000000 in ?? ()

"kernel-service"
  Thread 2 (Thread 0x7fae3b7fe700 (LWP 25508)):
  #0  0x000055fca06b3dbe in dart::ObjectSet::Contains (this=0x7fae3b7fbd20, raw_obj=<optimized out>) at ../../runtime/vm/object_set.h:63
  #1  0x000055fca06b3cfe in dart::VerifyPointersVisitor::VisitPointers (this=0x7fae3b7fc578, first=0x7fae37f54778, last=0x7fae37f547a0) at ../../runtime/vm/heap/verifier.cc:51
  #2  0x000055fca0450f11 in dart::RawArray::VisitArrayPointers (raw_obj=<optimized out>, visitor=<optimized out>) at ../../runtime/vm/raw_object.cc:426
  #3  0x000055fca044e662 in dart::RawObject::VisitPointersPredefined (this=0x7fae37f54751, visitor=0x7fae396fcf80, class_id=68) at ../../runtime/vm/raw_object.cc:313
  #4  0x000055fca06a49ec in dart::HeapPage::VisitObjectPointers (this=<optimized out>, visitor=0x7fae3b7fc578) at ../../runtime/vm/heap/pages.cc:129
  #5  0x000055fca06a7b31 in dart::PageSpace::VisitObjectPointers (this=<optimized out>, visitor=0x7fae3b7fc578) at ../../runtime/vm/heap/pages.cc:762
  #6  0x000055fca069f1a2 in VisitObjectPointers (this=<optimized out>, visitor=0x55fca07b9338 <vtable for dart::VerifyPointersVisitor+16>) at ../../runtime/vm/heap/heap.cc:296
  #7  dart::Heap::VerifyGC (this=<optimized out>, mark_expectation=<optimized out>) at ../../runtime/vm/heap/heap.cc:652
  #8  0x000055fca069f0de in dart::Heap::Verify (this=0x55fca2a5a000, mark_expectation=dart::kForbidMarked) at ../../runtime/vm/heap/heap.cc:640
  #9  0x000055fca029eb7c in dart::Deserializer::ReadIsolateSnapshot (this=0x7fae3b7fc6d8, object_store=<optimized out>) at ../../runtime/vm/clustered_snapshot.cc:5221
  #10 0x000055fca029fa16 in dart::FullSnapshotReader::ReadIsolateSnapshot (this=0x7fae3b7fd008) at ../../runtime/vm/clustered_snapshot.cc:5580
  #11 0x000055fca02d289d in dart::Dart::InitializeIsolate (snapshot_data=0x7fae3a1c4000 <error: Cannot access memory at address 0x7fae3a1c4000>, snapshot_instructions=0x7fae39bfd000 <error: Cannot access memory at address 0x7fae39bfd000>, shared_data=0x0, shared_instructions=0x0, kernel_buffer=0x0, kernel_buffer_size=0, data=0x55fca29c8050) at ../../runtime/vm/dart.cc:603
  #12 0x000055fca06c62a4 in dart::CreateIsolate (script_uri=<optimized out>, main=<optimized out>, snapshot_data=0x7fae3a1c4000 <error: Cannot access memory at address 0x7fae3a1c4000>, snapshot_instructions=0x7fae39bfd000 <error: Cannot access memory at address 0x7fae39bfd000>, shared_data=0x0, shared_instructions=0x0, kernel_buffer=0x0, kernel_buffer_size=0, flags=<optimized out>, callback_data=0x55fca29c8050, error=0x7fae3b7fdc90) at ../../runtime/vm/dart_api_impl.cc:1138
  #13 0x000055fca06c6092 in Dart_CreateIsolate (script_uri=0x55fc9f2ba428 "kernel-service", main=0x0, snapshot_data=0x7fae3a1c4000 <error: Cannot access memory at address 0x7fae3a1c4000>, snapshot_instructions=0x7fae39bfd000 <error: Cannot access memory at address 0x7fae39bfd000>, shared_data=0x0, shared_instructions=0x0, flags=0x7fae3b7fdc68, callback_data=0x55fca29c8050, error=0x7fae3b7fdc90) at ../../runtime/vm/dart_api_impl.cc:1185
  #14 0x000055fca0070ee3 in CreateAndSetupKernelIsolate (script_uri=<optimized out>, main=<optimized out>, package_root=<optimized out>, packages_config=0x7fff482e8853 "/b/s/w/ir/cache/builder/sdk/.packages", flags=<optimized out>, error=<optimized out>, exit_code=<optimized out>) at ../../runtime/bin/main.cc:420
  #15 dart::bin::CreateIsolateAndSetup (script_uri=<optimized out>, main=0x0, package_root=0x0, package_config=<optimized out>, flags=0x7fae3b7fdc68, data=<optimized out>, error=0x7fae3b7fdc90) at ../../runtime/bin/main.cc:658
  #16 0x000055fca0345aa4 in dart::RunKernelTask::Run (this=0x55fca29a6018) at ../../runtime/vm/kernel_isolate.cc:100
  #17 0x000055fca04f653c in dart::ThreadPool::Worker::Loop (this=0x55fca29fa140) at ../../runtime/vm/thread_pool.cc:381
  #18 0x000055fca04f601a in dart::ThreadPool::Worker::Main (args=94543548490048) at ../../runtime/vm/thread_pool.cc:436
  #19 0x000055fca042ec85 in dart::ThreadStart (data_ptr=<optimized out>) at ../../runtime/vm/os_thread_linux.cc:131
  #20 0x00007fae3c638184 in start_thread (arg=0x7fae3b7fe700) at pthread_create.c:312
  #21 0x00007fae3be5703d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7fae35f7e700 (LWP 25530)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:238
#1  0x000055fca042fa3d in dart::Monitor::WaitMicros (this=0x55fca29fa5a0, micros=5000000) at ../../runtime/vm/os_thread_linux.cc:445
#2  0x000055fca04f663e in WaitMicros (this=<optimized out>, micros=5000000) at ../../runtime/vm/lockers.h:177
#3  dart::ThreadPool::Worker::Loop (this=0x55fca29fa5a0) at ../../runtime/vm/thread_pool.cc:394
#4  0x000055fca04f601a in dart::ThreadPool::Worker::Main (args=94543548491168) at ../../runtime/vm/thread_pool.cc:436
#5  0x000055fca042ec85 in dart::ThreadStart (data_ptr=<optimized out>) at ../../runtime/vm/os_thread_linux.cc:131
#6  0x00007fae3c638184 in start_thread (arg=0x7fae35f7e700) at pthread_create.c:312
#7  0x00007fae3be5703d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7fae3cc5a7c0 (LWP 25505)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x000055fca042fa64 in dart::Monitor::WaitMicros (this=0x7fff482e7140, micros=0) at ../../runtime/vm/os_thread_linux.cc:440
#2  0x000055fca06c851a in Wait (this=<optimized out>, millis=0) at ../../runtime/vm/lockers.h:169
#3  Dart_RunLoop () at ../../runtime/vm/dart_api_impl.cc:1615
#4  0x000055fca006fdf6 in dart::bin::RunMainIsolate (script_name=0x7fff482e8879 "/b/s/w/ir/cache/builder/sdk/out/DebugX64/generated_compilations/app_jitk/tests_corelib_2_queue_test/out.jitsnapshot", dart_options=0x7fff482e7310) at ../../runtime/bin/main.cc:899
#5  0x000055fca0070a97 in dart::bin::main (argc=5, argv=0x7fff482e7478) at ../../runtime/bin/main.cc:1140
#6  0x000055fca0071439 in main (argc=1211003244, argv=0x80) at ../../runtime/bin/main.cc:1178

@mkustermann mkustermann added the area-vm label Dec 6, 2018

@mkustermann

This comment has been minimized.

Member

mkustermann commented Dec 6, 2018

When looking at T1:


  Thread 1 (Thread 0x7fae3b8ff700 (LWP 25507)):
  #0  0x00007fae3bd8fc37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
  #1  0x00007fae3bd93028 in __GI_abort () at abort.c:89
  #2  0x000055fca007de2a in dart::bin::segv_handler (signal=<optimized out>, siginfo=0x7fae3b8fd830, context=<optimized out>) at ../../runtime/bin/platform_linux.cc:36
  #3  <signal handler called>
  #4  0x00007fae3cb49050 in ?? ()
  ....

Looking at the stack, I seem to be unable to get the name of the function:

(gdb) frame 2
(gdb) p (ucontext_t*)$r14   // r14 == context (optimized out)
$43 = (ucontext_t *) 0x7fae3b8fd700

(gdb) p (void*)$43->uc_mcontext.gregs[REG_RBP] 
$45 = (void *) 0x7fae3b8fdcc8

(gdb) x/1gx 0x7fae3b8fdcc0
0x7fae3b8fdcc0: 0x00007fae3b18ab31

(gdb) x/1gx 0x00007fae3b18ab30
0x7fae3b18ab30: 0x0000000000100b18

(gdb) p ('dart::ClassId')0x10
$46 = dart::kCodeCid

(gdb) p ('dart::RawCode'*)0x00007fae3b18ab30
$47 = (dart::RawCode *) 0x7fae3b18ab30

(gdb) p $47->owner_
$48 = (dart::RawObject *) 0x7fae3b4be4e1

(gdb) x/1gx 0x7fae3b4be4e0
0x7fae3b4be4e0: 0x0000000000070a18

(gdb) p ('dart::ClassId')0x7
$50 = dart::kFunctionCid

(gdb) p ('dart::RawFunction'*)0x7fae3b4be4e0
$51 = (dart::RawFunction *) 0x7fae3b4be4e0

(gdb) p $51->name_
$52 = (dart::RawString *) 0x7fae3cc4c951

(gdb) x/1gx 0x7fae3cc4c950
0x7fae3cc4c950: Cannot access memory at address 0x7fae3cc4c950

@rmacnak-google Do you think this could be a concurrent marking bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment