unity8 hangs on SIGTERM if there's a painting/animation going on

Bug #1239409 reported by Michał Sawicz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity-mir
Fix Released
Medium
Albert Astals Cid
unity8 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

u8 hung on exit, forced a SIGSEGV to get a backtrace.

This is with lp:~kdub/mir/android-buffer-syncfence and lp:~aacid/unity-mir/waitforme

I think Albert mentioned this sometimes happens in the added join().

How to reproduce:
 * Run unity8 in the phone
 * open the indicators but don't release your finger
 * adb shell
 * write "kill -15 `pidof unity8`" in the adb shell
 * Now release the indicators and while the open animation is completing press enter in the "kill -15 `pidof unity8`" adb shell

You'll see that the unity8 process does never shutdown itself but is neither eating any CPU

Related branches

Revision history for this message
Michał Sawicz (saviq) wrote :
information type: Private → Public
tags: removed: need-armhf-retrace
Revision history for this message
Michał Sawicz (saviq) wrote :

Seems like this stacktrace will not get us far...

Revision history for this message
Michał Sawicz (saviq) wrote :

Got a slightly better stacktrace:

== Stacktrace ================================= [22/724]
#0 __libc_do_syscall () at ../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:43
No locals.
#1 0x41a77b40 in pthread_join (threadid=<optimized out>, thread_return=0x0) at pthread_join.c:92
        _a2tmp = 0
        _a2 = 0
        _nametmp = 240
        _a3tmp = 7511
#0 __libc_do_syscall () at ../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:43
No locals.
#1 0x41a77b40 in pthread_join (threadid=<optimized out>, thread_return=0x0) at pthread_join.c:92
        _a2tmp = 0
        _a2 = 0
        _nametmp = 240
        _a3tmp = 7511
        _a3 = <optimized out>
        _a1 = 1190642888
        _a4tmp = 0
        _a1tmp = 1190642888
        _a4 = <optimized out>
        _name = <optimized out>
        __tid = 7511
        _buffer = {__routine = 0x41a77a9d <cleanup>, __arg = 0x46f7c67c, __canceltype = 1074700048, __prev = 0x0}
        oldtype = 0
        pd = <optimized out>
        self = <optimized out>
        result = 0
#2 0x40e109f8 in __gthread_join (__value_ptr=0x0, __threadid=<optimized out>) at /build/buildd/gcc-4.8-4.8.1/bui
ld/arm-linux-gnueabihf/libstdc++-v3/include/arm-linux-gnueabihf/bits/gthr-default.h:668
No locals.
#3 std::thread::join (this=0x1e4ea40) at ../../../../../src/libstdc++-v3/src/c++11/thread.cc:107
        __e = 22
#4 0x402240b8 in ?? () from /home/phablet/dev/retrace/sandbox/usr/lib/arm-linux-gnueabihf/libunity-mir.so.1

Revision history for this message
Michał Sawicz (saviq) wrote :

The best trace I got in the attached .crash file.

Revision history for this message
Michał Sawicz (saviq) wrote :

The above stacktrace:
 #0 __libc_do_syscall () at ../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:43
 No locals.
 #1 0x41893b40 in pthread_join (threadid=<optimized out>, thread_return=0x0) at pthread_join.c:92
         _a2tmp = 0
         _a2 = 0
         _nametmp = 240
         _a3tmp = 14898
         _a3 = <optimized out>
         _a1 = 1189709000
         _a4tmp = 0
         _a1tmp = 1189709000
         _a4 = <optimized out>
         _name = <optimized out>
         __tid = 14898
         _buffer = {__routine = 0x41893a9d <cleanup>, __arg = 0x46e9867c, __canceltype = 1074102032, __prev = 0x0}
         oldtype = 0
         pd = <optimized out>
         self = <optimized out>
         result = 0
 #2 0x40d9d9f8 in __gthread_join (__value_ptr=0x0, __threadid=<optimized out>) at /build/buildd/gcc-4.8-4.8.1/build/arm-linux-gnueabihf/libstdc++-v3/include/arm-linux-gnueabihf/bits/gthr-default.h:668
 No locals.
 #3 std::thread::join (this=0x7c0a40) at ../../../../../src/libstdc++-v3/src/c++11/thread.cc:107
         __e = 22
 #4 0x401860b8 in QMirServer::runWithClient(std::function<int (int, char const**, ShellServerConfiguration*)>) (this=this@entry=0x7c0680, client=...) at qmirserver.cpp:67
         argv = 0xbe8fb394
         config = 0x7bcb98
         argc = 2
         t = 0x7c0a40
 #5 0x40186166 in runQMirServerWithClient(QMirServer *, std::function<int(int, char const**, ShellServerConfiguration*)>) (mirServer=0x7c0680, client=...) at qmirserver.cpp:80
 No locals.
 #6 0x0000b280 in ?? ()
 No symbol table info available.
 #7 0x40fcb452 in __libc_start_main (main=0xb1c5, argc=2, ubp_av=0xbe8fb394, init=<optimized out>, fini=0xede1 <__libc_csu_fini+1>, rtld_fini=0x40044291 <_dl_fini>, stack_end=0xbe8fb394) at libc-start.c:260
         self = <optimized out>
         result = <optimized out>
         unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, 0, 1091125248, 0, 0, 0, 1074102272, 0, -1097878968, 1090303015, 0 <repeats 18 times>, 1128923136, 1084436480, -1, 1128924352, 1090256312, 1088905928, 0, 1074018253, 1107492224, 1, 1, 0, 1, 1090243576, 1078122536, -1097878716, 1080607892, -1097878100, 1080137633, 1107491680, 1128923136, 0, 69752, 1128924352, 0, 1074102272, 0, 1074018253, 1107491680, 1, 1, 0, 1079069005, 1090256312, 1, 0}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x40047e34 <_dl_runtime_resolve+24>}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
         not_first_call = <optimized out>
 #8 0x0000b42e in _start ()
 No symbol table info available.

Michał Sawicz (saviq)
Changed in unity-mir:
status: New → In Progress
assignee: nobody → Albert Astals Cid (aacid)
Changed in unity8 (Ubuntu):
status: New → Invalid
summary: - unity8 crashed with SIGSEGV in __libc_do_syscall()
+ unity8 hangs on SIGTERM if there's a painting/animation going on
description: updated
Revision history for this message
Albert Astals Cid (aacid) wrote :
Download full text (12.9 KiB)

My thread backtrace, of importance, thread 1 stuck in the join for thread 6 that is stuck in QQuickRenderThreadSingleContextWindowManager::stopRendering and also thread 30 that Mir guys says it's the driver thread seems somehow stuck at mir::graphics::android::MirNativeWindow::dequeueBuffer

Thread 36 (Thread 0x45e30460 (LWP 3012)):
#0 0x40eadfe6 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1 0x40eaa000 in pthread_cond_timedwait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
#2 0x40a659aa in pthread_cond_timedwait () from /lib/arm-linux-gnueabihf/libc.so.6
#3 0x41178c08 in g_cond_wait_until () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#4 0x4112d682 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#5 0x4112d682 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 33 (Thread 0x586ff460 (LWP 2805)):
#0 0xffff0520 in ?? ()
#1 0xffff0520 in ?? ()
#2 0xffff0520 in ?? ()
#3 0xffff0520 in ?? ()
#4 0xffff0520 in ?? ()
#5 0xffff0520 in ?? ()
#6 0xffff0520 in ?? ()
#7 0xffff0520 in ?? ()
#8 0xffff0520 in ?? ()
#9 0xffff0520 in ?? ()
#10 0xffff0520 in ?? ()
#11 0xffff0520 in ?? ()
#12 0xffff0520 in ?? ()
#13 0xffff0520 in ?? ()
#14 0xffff0520 in ?? ()
#15 0xffff0520 in ?? ()
#16 0xffff0520 in ?? ()
#17 0xffff0520 in ?? ()
#18 0x40a542b4 in poll () from /lib/arm-linux-gnueabihf/libc.so.6
#19 0x4114bd8e in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#20 0x4114bd8e in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 32 (Thread 0x51721460 (LWP 2787)):
#0 0xffff0520 in ?? ()
#1 0xffff0520 in ?? ()
#2 0xffff0520 in ?? ()
#3 0xffff0520 in ?? ()
#4 0xffff0520 in ?? ()
#5 0xffff0520 in ?? ()
#6 0xffff0520 in ?? ()
#7 0xffff0520 in ?? ()
#8 0xffff0520 in ?? ()
#9 0xffff0520 in ?? ()
#10 0xffff0520 in ?? ()
#11 0xffff0520 in ?? ()
#12 0xffff0520 in ?? ()
#13 0xffff0520 in ?? ()
#14 0xffff0520 in ?? ()
#15 0x40a542b4 in poll () from /lib/arm-linux-gnueabihf/libc.so.6
#16 0x4114bd8e in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#17 0x4114bd8e in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 30 (Thread 0x55a20460 (LWP 2733)):
#0 0x40eadfe4 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1 0x40ea9d72 in pthread_cond_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
#2 0x40a6598a in pthread_cond_wait () from /lib/arm-linux-gnueabihf/libc.so.6
#3 0x4097e740 in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
#4 0x424b4e86 in mir::compositor::SwitchingBundle::client_acquire() () from /usr/lib/arm-linux-gnueabihf/libmirserver.so.6
#5 0x424b1878 in mir::compositor::TemporaryClientBuffer::TemporaryClientBuffer(std::shared_ptr<mir::compositor::BufferBundle> const&) () from /usr/lib/arm-linux-gnueabihf/libmirserver.so.6
#6 0x424b2228 in mir::compositor::BufferStreamSurfaces::secure_client_buffer() () from /usr/lib/arm...

Changed in unity-mir:
importance: Undecided → Medium
status: In Progress → Confirmed
Revision history for this message
Gerry Boland (gerboland) wrote :

There has been efforts to fix shutdown:
https://code.launchpad.net/~gerboland/unity-mir/shutdown-crash-fix3
which I expect to fix this issue. Marking fix released, please re-open if needed

Changed in unity-mir:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.