[android] SIGTERM to server with connected client causes crash
Bug #1364637 reported by
Kevin DuBois
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
High
|
Kevin DuBois | ||
mir (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
mir (Ubuntu RTM) |
Fix Released
|
High
|
Unassigned |
Bug Description
Noticed a racy crash if you ctrl-c the server while a client is communicating to it.
To reproduce:
run a mir demo server
run a mir demo client
send SIGTERM to the server while the client is still running.
About once every 8-10 times I see (on krillin)
root@ubuntu-
^Cpure virtual method called
terminate called without an active exception
Aborted (core dumped)
tested with mir/devel rev1882
Related branches
lp://staging/~kdub/mir/fix-1364637
- PS Jenkins bot (community): Approve (continuous-integration)
- Alexandros Frantzis (community): Approve
- Alberto Aguirre (community): Approve
-
Diff: 633 lines (+109/-80)17 files modifiedsrc/platform/graphics/android/android_platform.cpp (+2/-2)
src/platform/graphics/android/display_resource_factory.h (+3/-2)
src/platform/graphics/android/hwc_common_device.cpp (+10/-6)
src/platform/graphics/android/hwc_common_device.h (+3/-3)
src/platform/graphics/android/hwc_wrapper.h (+2/-1)
src/platform/graphics/android/output_builder.cpp (+6/-3)
src/platform/graphics/android/output_builder.h (+5/-1)
src/platform/graphics/android/real_hwc_wrapper.cpp (+4/-2)
src/platform/graphics/android/real_hwc_wrapper.h (+4/-1)
src/platform/graphics/android/resource_factory.cpp (+2/-9)
src/platform/graphics/android/resource_factory.h (+2/-7)
tests/include/mir_test_doubles/mock_hwc_device_wrapper.h (+1/-1)
tests/integration-tests/graphics/android/test_display_integration.cpp (+3/-3)
tests/unit-tests/graphics/android/test_hwc_common_device.cpp (+34/-16)
tests/unit-tests/graphics/android/test_hwc_wrapper.cpp (+13/-5)
tests/unit-tests/graphics/android/test_output_builder.cpp (+11/-8)
tests/unit-tests/graphics/android/test_resource_factory.cpp (+4/-10)
Changed in mir: | |
status: | New → Confirmed |
Changed in mir: | |
assignee: | nobody → Kevin DuBois (kdub) |
Changed in mir: | |
status: | Confirmed → In Progress |
summary: |
- SIGTERM to server with connected client causes crash + [android] SIGTERM to server with connected client causes crash |
Changed in mir: | |
milestone: | 0.8.0 → 0.9.0 |
Changed in mir: | |
milestone: | 0.9.0 → 0.8.0 |
Changed in mir (Ubuntu): | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in mir: | |
status: | Fix Committed → Fix Released |
Changed in mir (Ubuntu RTM): | |
importance: | Undecided → High |
status: | New → Triaged |
To post a comment you must log in.
The problem seems to be that we are getting a vsync callback after the HWCCommonDevice class has been destroyed (verified with debug prints in ~HWCCommonDevice() and vsync_hook()). Not sure how to solve this (can we unregister the hooks on HWCCommonDevice destruction, does vsync_hook need to handle a destroyed "self"?), so leaving it to our Android resident experts.
The best backtrace I could get is:
Thread 2 (Thread 0xb61563e0 (LWP 24473)): linux-gnueabihf /libc.so. 6 linux-gnueabihf /libc.so. 6 linux-gnueabihf /libc.so. 6 :__verbose_ terminate_ handler( ) () arm-linux- gnueabihf/ libstdc+ +.so.6 arm-linux- gnueabihf/ libstdc+ +.so.6 arm-linux- gnueabihf/ libstdc+ +.so.6 arm-linux- gnueabihf/ libstdc+ +.so.6 :android: :HWCCommonDevic e::notify_ vsync (this=0xcc660) work/mir/ src/platform/ graphics/ android/ hwc_common_ device. cpp:85 ::vsync_ hook (procs=0xcc66c) work/mir/ src/platform/ graphics/ android/ hwc_common_ device. cpp:38
#0 0xb69c88e6 in ?? () from /lib/arm-
#1 0xb69d705e in raise () from /lib/arm-
#2 0xb69d7d4e in abort () from /lib/arm-
#3 0xb6b89184 in __gnu_cxx:
from /usr/lib/
#4 0xb6b879b4 in ?? () from /usr/lib/
#5 0xb6b87a0a in std::terminate() () from /usr/lib/
#6 0xb6b88332 in __cxa_pure_virtual () from /usr/lib/
#7 0xb63fac0a in mir::graphics:
at /storage/
#8 0xb63faa16 in (anonymous namespace)
at /storage/
#9 0xb6164bf8 in ?? ()