Skip to content

Flutter broken because of [ VM / dart:isolate ] Added ability to set names for spawned isolates. #36232

@dcharkes

Description

@dcharkes

5952526 causes Flutter test observatory and protocol to deadlock (log). Note that this only showed up after the fixing the patch files.

Bisection showing it is this commit:

dacoharkes@dacoharkes-l:~/flt/engine/src/third_party/dart$ git reset --hard 0ee14130955e67b48d6ce88cc0eb9bf22eddb174
HEAD is now at 0ee14130955 [dartdevc] Initial support for control flow collections
dacoharkes@dacoharkes-l:~/flt/engine/src/third_party/dart$ cd ../..
dacoharkes@dacoharkes-l:~/flt/engine/src$ ninja -C out/host_debug
ninja: Entering directory `out/host_debug'
[1158/1158] STAMP obj/default.stamp
dacoharkes@dacoharkes-l:~/flt/engine/src$ third_party/dart/tools/sdks/dart-sdk/bin/dart $PWD/flutter/shell/testing/observatory/test.dart $PWD/out/host_debug/flutter_tester $PWD/flutter/shell/testing/observatory/empty_main.dart
Launching /usr/local/google/home/dacoharkes/flt/engine/src/out/host_debug/flutter_tester [--observatory-port=0, --non-interactive, --run-forever, /usr/local/google/home/dacoharkes/flt/engine/src/flutter/shell/testing/observatory/empty_main.dart]
Observatory listening on http://127.0.0.1:45531/
Executing test 1/3
Executing test 2/3
-> 1 (getVM)
<- 1
-> 2 (BART_SIMPSON)
<- 2
Executing test 3/3
Launching /usr/local/google/home/dacoharkes/flt/engine/src/out/host_debug/flutter_tester [--start-paused, --observatory-port=0, --non-interactive, --run-forever, /usr/local/google/home/dacoharkes/flt/engine/src/flutter/shell/testing/observatory/empty_main.dart]
Observatory listening on http://127.0.0.1:44091/
dacoharkes@dacoharkes-l:~/flt/engine/src$ cd third_party/dart/
dacoharkes@dacoharkes-l:~/flt/engine/src/third_party/dart$ git reset --hard 59525264e82f46a1146ffea79748043ca20fe905
HEAD is now at 59525264e82 [ VM / dart:isolate ] Added ability to set names for spawned isolates.
dacoharkes@dacoharkes-l:~/flt/engine/src/third_party/dart$ cd ../..
dacoharkes@dacoharkes-l:~/flt/engine/src$ ninja -C out/host_debug
ninja: Entering directory `out/host_debug'
[1158/1158] STAMP obj/default.stamp
dacoharkes@dacoharkes-l:~/flt/engine/src$ third_party/dart/tools/sdks/dart-sdk/bin/dart $PWD/flutter/shell/testing/observatory/test.dart $PWD/out/host_debug/flutter_tester $PWD/flutter/shell/testing/observatory/empty_main.dart
Launching /usr/local/google/home/dacoharkes/flt/engine/src/out/host_debug/flutter_tester [--observatory-port=0, --non-interactive, --run-forever, /usr/local/google/home/dacoharkes/flt/engine/src/flutter/shell/testing/observatory/empty_main.dart]
^C

Deadlock state:

$ gdb --args third_party/dart/tools/sdks/dart-sdk/bin/dart $PWD/flutter/shell/testing/observatory/test.dart $PWD/out/host_debug/flutter_tester $PWD/flutter/shell/testing/observatory/empty_main.dart
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from third_party/dart/tools/sdks/dart-sdk/bin/dart...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/local/google/home/dacoharkes/flt/engine/src/third_party/dart/tools/sdks/dart-sdk/bin/dart /usr/local/google/home/dacoharkes/flt/engine/src/flutter/shell/testing/observatory/test.dart /usr/local/google/home/dacoharkes/flt/engine/src/out/host_debug/flutter_tester /usr/local/google/home/dacoharkes/flt/engine/src/flutter/shell/testing/observatory/empty_main.dart
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Launching /usr/local/google/home/dacoharkes/flt/engine/src/out/host_debug/flutter_tester [--observatory-port=0, --non-interactive, --run-forever, /usr/local/google/home/dacoharkes/flt/engine/src/flutter/shell/testing/observatory/empty_main.dart]
[Detaching after fork from child process 156257]
^C
Thread 1 "dart" received signal SIGINT, Interrupt.
0x00007ffff79c515f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
(gdb) t a a bt

Thread 9 (Thread 0x7ffff03bf700 (LWP 156258)):
#0  0x00007ffff79c8a9e in wait () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x000055555643cd19 in ?? ()
#2  0x000055555645540e in ?? ()
#3  0x00007ffff79bf494 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#4  0x00007ffff6c58a8f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 5 (Thread 0x7ffff24bf700 (LWP 156252)):
#0  0x00007ffff79c515f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x000055555676d748 in dart::Monitor::WaitMicros(long) ()
#2  0x0000555556946b2a in dart::BackgroundCompiler::Run() ()
#3  0x0000555556811e3d in dart::ThreadPool::Worker::Loop() ()
#4  0x0000555556811cd4 in dart::ThreadPool::Worker::Main(unsigned long) ()
#5  0x000055555676d019 in ?? ()
#6  0x00007ffff79bf494 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7  0x00007ffff6c58a8f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 2 (Thread 0x7ffff7fcb700 (LWP 156249)):
#0  0x00007ffff6c59083 in epoll_wait () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x0000555556435c55 in dart::bin::EventHandlerImplementation::Poll(unsigned long) ()
#2  0x000055555645540e in ?? ()
#3  0x00007ffff79bf494 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#4  0x00007ffff6c58a8f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 1 (Thread 0x7ffff7fcec00 (LWP 156244)):
#0  0x00007ffff79c515f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x000055555676d748 in dart::Monitor::WaitMicros(long) ()
#2  0x000055555697cbca in Dart_RunLoop ()
#3  0x000055555642db11 in dart::bin::RunMainIsolate(char const*, dart::bin::CommandLineOptions*) ()
#4  0x000055555642e631 in dart::bin::main(int, char**) ()
#5  0x000055555642eee9 in main ()

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions