"QThread: Destroyed while thread is still running" printed on shutdown
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
Low
|
kevin gunn | ||
unity8 (Ubuntu) |
Fix Released
|
Low
|
Albert Astals Cid |
Bug Description
Sending SIGTERM to unity8 causes this slightly concerning error message to be printed:
QThread: Destroyed while thread is still running
Going a quick dig, I see it came from DashCommunicator:
(gdb) break src/corelib/
Breakpoint 1 at 0x7fafce6bd935: file thread/qthread.cpp, line 417.
(gdb) cont
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x00007fafcddb98dd in poll () at ../sysdeps/
81 in ../sysdeps/
(gdb) signal SIGTERM
Continuing with signal SIGTERM.
Breakpoint 1, QThread::~QThread (this=0x203d1f0, __in_chrg=
417 thread/qthread.cpp: No such file or directory.
(gdb) t
[Current thread is 1 (Thread 0x7fafcfcaf800 (LWP 19100))]
(gdb) info threads
Id Target Id Frame
23 Thread 0x7fafc178b700 (LWP 19101) "unity8" syscall () at ../sysdeps/
22 Thread 0x7fafc0f8a700 (LWP 19102) "unity8" syscall () at ../sysdeps/
21 Thread 0x7fafbbfff700 (LWP 19103) "MirServerThread" 0x00007fafcddb98dd in poll () at ../sysdeps/
20 Thread 0x7fafbb7fe700 (LWP 19104) "RPC Thread" 0x00007fafcddb98dd in poll () at ../sysdeps/
19 Thread 0x7fafb951d700 (LWP 19105) "MirServerThread" pthread_
at ../sysdeps/
18 Thread 0x7fafb8ac0700 (LWP 19106) "Input dispatch" 0x00007fafcddb98dd in poll () at ../sysdeps/
17 Thread 0x7fafaa0db700 (LWP 19107) "Mir/Snapshot" pthread_
at ../sysdeps/
16 Thread 0x7fafa98da700 (LWP 19108) "Mir/IPC" 0x00007fafcddc54f3 in epoll_wait () at ../sysdeps/
15 Thread 0x7fafa90d9700 (LWP 19109) "Mir/IPC" 0x00007fafcddc54f3 in epoll_wait () at ../sysdeps/
14 Thread 0x7faf9db6d700 (LWP 19110) "QQmlThread" 0x00007fafcddb98dd in poll () at ../sysdeps/
13 Thread 0x7faf8de65700 (LWP 19111) "gmain" 0x00007fafcddb98dd in poll () at ../sysdeps/
12 Thread 0x7faf85664700 (LWP 19112) "gdbus" 0x00007fafcbceea91 in g_variant_
info=
at /build/
11 Thread 0x7faf8d3ff700 (LWP 19113) "dconf worker" 0x00007fafcddb98dd in poll () at ../sysdeps/
10 Thread 0x7faf7eba6700 (LWP 19114) "dashCommunicato" 0x00007fafcddb98dd in poll () at ../sysdeps/
9 Thread 0x7faf73fff700 (LWP 19115) "unity8" 0x00007fafcddc54f3 in epoll_wait () at ../sysdeps/
8 Thread 0x7faf735f9700 (LWP 19118) "unity8" pthread_
at ../sysdeps/
7 Thread 0x7faf71dd9700 (LWP 19119) "Qt bearer threa" 0x00007fafcddb98dd in poll () at ../sysdeps/
6 Thread 0x7faf63fff700 (LWP 19121) "QQuickPixmapRea" 0x00007fafcddb98dd in poll () at ../sysdeps/
5 Thread 0x7faf615ad700 (LWP 19123) "Thread (pooled)" pthread_
at ../sysdeps/
4 Thread 0x7faf5ffa0700 (LWP 19124) "QThread" 0x00007fafcddb98dd in poll () at ../sysdeps/
3 Thread 0x7faf5f79f700 (LWP 19125) "QProcessManager" 0x00007fafcddbb743 in select () at ../sysdeps/
2 Thread 0x7faf5ef5e700 (LWP 19135) "QSGRenderThread" pthread_
at ../sysdeps/
* 1 Thread 0x7fafcfcaf800 (LWP 19100) "unity8" QThread::~QThread (this=0x203d1f0, __in_chrg=
at thread/
(gdb) bt
#0 0x00007fafce6bd935 in QThread::~QThread() (this=0x203d1f0, __in_chrg=
#1 0x00007faf845e5ef2 in () at /usr/lib/
#2 0x00007fafce8d1d2b in QObjectPrivate:
#3 0x00007fafce8db620 in QObject::~QObject() (this=<optimized out>, __in_chrg=
#4 0x00007fafcf5b52bd in QQuickItem:
#5 0x00007fafcf5cf7c6 in QQmlPrivate:
at ../../include/
#6 0x00007fafcf5cf7c6 in QQmlPrivate:
at ../../include/
#7 0x00007fafce8d1d2b in QObjectPrivate:
#8 0x00007fafce8db620 in QObject::~QObject() (this=<optimized out>, __in_chrg=
#9 0x00007fafcf5b52bd in QQuickItem:
#10 0x00007fafcf5cf86e in QQmlPrivate:
at items/qquickrec
#11 0x00007fafcf5cf86e in QQmlPrivate:
at ../../include/
#12 0x00007fafcf5cf86e in QQmlPrivate:
at ../../include/
#13 0x00007fafcf66b1aa in QQuickView:
#14 0x000000000040fade in ()
#15 0x000000000040a123 in ()
#16 0x0000000000406374 in ()
#17 0x00007fafcdcdea40 in __libc_start_main (main=
0x4062f0, argc=1, argv=0x7ffe2523
#18 0x0000000000406419 in _start ()
Related branches
- Andrea Cimitan (community): Approve
- PS Jenkins bot (community): Needs Fixing (continuous-integration)
-
Diff: 29 lines (+7/-1)2 files modifiedplugins/Unity/DashCommunicator/dashcommunicator.cpp (+6/-0)
plugins/Unity/DashCommunicator/dashcommunicator.h (+1/-1)
Changed in unity8 (Ubuntu): | |
assignee: | nobody → Albert Astals Cid (aacid) |
status: | New → In Progress |
Changed in canonical-devices-system-image: | |
status: | New → Fix Committed |
importance: | Undecided → Low |
assignee: | nobody → kevin gunn (kgunn72) |
milestone: | none → ww02-2016 |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
DashCommunicator inherits QThread. From the QThread docs:
"Note that deleting a QThread object will not stop the execution of the thread it manages. Deleting a running QThread (i.e. isFinished() returns false) will probably result in a program crash. Wait for the finished() signal before deleting the QThread."
So to fix this, need to refactor DashCommunicator a bit to only delete the QThread after the thread's finished() signal has fired.