Bug 399604 - Remove blocking calls in FwupdBackend
Summary: Remove blocking calls in FwupdBackend
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.14.0
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2018-10-10 11:32 UTC by Emil Harder
Modified: 2018-10-10 18:03 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emil Harder 2018-10-10 11:32:09 UTC
Application: plasma-discover (5.14.0)

Qt Version: 5.11.1
Frameworks Version: 5.50.0
Operating System: Linux 4.15.0-36-generic x86_64
Distribution: KDE neon User Edition 5.14

-- Information about the crash:
- Openened .deb for the Chrome browser, downloaded from firefox.

-- Backtrace:
Application: Discover (plasma-discover), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f94b82a5c80 (LWP 31538))]

Thread 11 (Thread 0x7f94652d7700 (LWP 31559)):
#0  0x00007f94b383e839 in syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f94b3f40564 in QSemaphore::acquire(int) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f94b4147d70 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f94b171121b in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#4  0x00007f94b17ab0fd in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#5  0x00007f94b4147ad5 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f94b1706e59 in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#7  0x00007f94b17076f5 in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#8  0x00007f94b4147ad5 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f94b17a4d2f in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#10 0x00007f94b17a1850 in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#11 0x00007f94b17a1be5 in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#12 0x00007f94b17862e1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#13 0x00007f94b4147ad5 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007f94b174eb73 in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#15 0x00007f94b174ec24 in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#16 0x00007f94b17624e1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#17 0x00007f94b572fe8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f94b573745f in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007f94b4118ab8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007f94b41736dd in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007f94adda6287 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007f94adda64c0 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007f94adda654c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f94b4172a9b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007f94b4116dea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007f94b3f41b8a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007f94b3f4caab in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007f94aff426db in start_thread (arg=0x7f94652d7700) at pthread_create.c:463
#29 0x00007f94b384488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 10 (Thread 0x7f947d773700 (LWP 31550)):
#0  0x00007f94aff48ed9 in futex_reltimed_wait_cancelable (private=<optimized out>, reltime=0x7f947d772c30, expected=0, futex_word=0x7f9468005554) at ../sysdeps/unix/sysv/linux/futex-internal.h:142
#1  0x00007f94aff48ed9 in __pthread_cond_wait_common (abstime=0x7f947d772d00, mutex=0x7f9468005500, cond=0x7f9468005528) at pthread_cond_wait.c:533
#2  0x00007f94aff48ed9 in __pthread_cond_timedwait (cond=0x7f9468005528, mutex=0x7f9468005500, abstime=0x7f947d772d00) at pthread_cond_wait.c:667
#3  0x00007f94b3f4d850 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f94b3f4425d in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f94b3f4caab in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f94aff426db in start_thread (arg=0x7f947d773700) at pthread_create.c:463
#7  0x00007f94b384488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 9 (Thread 0x7f947df74700 (LWP 31549)):
#0  0x00007f94b3837bf9 in __GI___poll (fds=0x7f946800abb0, nfds=1, timeout=14796) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f94adda6439 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f94adda654c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f94b4172a9b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f94b4116dea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f94b3f41b8a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f94b3f4caab in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f94aff426db in start_thread (arg=0x7f947df74700) at pthread_create.c:463
#8  0x00007f94b384488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 8 (Thread 0x7f947f4f5700 (LWP 31548)):
#0  0x00007f94adda63e2 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f94adda654c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f94b4172a9b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007f94b4116dea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f94b3f41b8a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f94b3f4caab in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f94aff426db in start_thread (arg=0x7f947f4f5700) at pthread_create.c:463
#7  0x00007f94b384488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 0x7f94805b3700 (LWP 31547)):
#0  0x00007f94b3837bf9 in __GI___poll (fds=0x5611717e2080, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f94adda6439 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f94adda67d2 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f94832b7f66 in  () at /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007f94addcde85 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f94aff426db in start_thread (arg=0x7f94805b3700) at pthread_create.c:463
#6  0x00007f94b384488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 6 (Thread 0x7f9480db4700 (LWP 31546)):
#0  0x00007f94b38330b4 in __GI___libc_read (fd=12, buf=0x7f9480db3ce0, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:27
#1  0x00007f94addeaa00 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f94adda5f27 in g_main_context_check () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f94adda63e0 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f94adda654c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f94adda6591 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f94addcde85 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007f94aff426db in start_thread (arg=0x7f9480db4700) at pthread_create.c:463
#8  0x00007f94b384488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7f948c862700 (LWP 31542)):
#0  0x00007f94b38330b4 in __GI___libc_read (fd=13, buf=0x7f948c861b20, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:27
#1  0x00007f94addeaa00 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f94adda5f27 in g_main_context_check () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f94adda63e0 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f94adda654c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f94b4172a9b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f94b4116dea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f94b3f41b8a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f94b733d906 in  () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#9  0x00007f94b3f4caab in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f94aff426db in start_thread (arg=0x7f948c862700) at pthread_create.c:463
#11 0x00007f94b384488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f949c8ea700 (LWP 31541)):
#0  0x00007f94b41711be in QTimerInfoList::timerWait(timespec&) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1  0x00007f94b41727fe in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f94adda5998 in g_main_context_prepare () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f94adda636b in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f94adda654c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f94b4172a9b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f94b4116dea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f94b3f41b8a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f94b4ae68b5 in  () at /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#9  0x00007f94b3f4caab in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f94aff426db in start_thread (arg=0x7f949c8ea700) at pthread_create.c:463
#11 0x00007f94b384488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f949d0eb700 (LWP 31540)):
#0  0x00007f94b38330b4 in __GI___libc_read (fd=7, buf=0x7f949d0eab60, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:27
#1  0x00007f94addeaa00 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f94adda5f27 in g_main_context_check () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f94adda63e0 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f94adda654c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f94b4172a9b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f94b4116dea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f94b3f41b8a in QThread::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f94b5e3fe45 in  () at /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#9  0x00007f94b3f4caab in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f94aff426db in start_thread (arg=0x7f949d0eb700) at pthread_create.c:463
#11 0x00007f94b384488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f94a5865700 (LWP 31539)):
#0  0x00007f94b3837bf9 in __GI___poll (fds=0x7f94a5864ca8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f94adb3d747 in  () at /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f94adb3f36a in xcb_wait_for_event () at /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f94a8826129 in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007f94b3f4caab in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f94aff426db in start_thread (arg=0x7f94a5865700) at pthread_create.c:463
#6  0x00007f94b384488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f94b82a5c80 (LWP 31538)):
[KCrash Handler]
#6  0x00007f94b3761e97 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#7  0x00007f94b3763801 in __GI_abort () at abort.c:79
#8  0x00007f94b3f1d5db in qErrnoWarning(char const*, ...) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f94b73a22bd in QSGRenderLoop::handleContextCreationFailure(QQuickWindow*, bool) () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#10 0x00007f94b73a3205 in  () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#11 0x00007f94b73a3e2a in  () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#12 0x00007f94b4f40355 in QWindow::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#13 0x00007f94b741d2f5 in QQuickWindow::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#14 0x00007f94b572fe8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007f94b573745f in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007f94b4118ab8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007f94b4f3528f in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#18 0x00007f94b4f35edd in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#19 0x00007f94b4f0ef0b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#20 0x00007f94a88b0edb in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#21 0x00007f94b4116dea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007f9483a048db in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/discover/fwupd-backend.so
#23 0x00007f9483a04e8d in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/discover/fwupd-backend.so
#24 0x00007f9483a061d1 in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/discover/fwupd-backend.so
#25 0x00007f9483a0623a in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/discover/fwupd-backend.so
#26 0x00007f94b4154914 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007f94b41485fb in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007f94b572fe8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007f94b573745f in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007f94b4118ab8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007f94b4171f0e in QTimerInfoList::activateTimers() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007f94b41726d1 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00007f94adda6287 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007f94adda64c0 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007f94adda654c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007f94b4172a7f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#37 0x00007f94a88b0ed1 in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#38 0x00007f94b4116dea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#39 0x00007f94b411ffa0 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#40 0x000056116fbda808 in  ()
#41 0x00007f94b3744b97 in __libc_start_main (main=0x56116fbd9f30, argc=2, argv=0x7ffe5bee71d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe5bee71c8) at ../csu/libc-start.c:310
#42 0x000056116fbdaa8a in _start ()

Reported using DrKonqi
Comment 1 Aleix Pol 2018-10-10 18:03:56 UTC
Git commit 1e138d8014c8e6439c56f14a5c1e8cb765068d90 by Aleix Pol.
Committed on 10/10/2018 at 18:01.
Pushed by apol into branch 'Plasma/5.14'.

fwupd: move fetching of updates into a separate thread

This way it won't be blocking the main thread.

M  +1    -1    libdiscover/backends/FwupdBackend/CMakeLists.txt
M  +43   -33   libdiscover/backends/FwupdBackend/FwupdBackend.cpp
M  +7    -8    libdiscover/backends/FwupdBackend/FwupdBackend.h

https://commits.kde.org/discover/1e138d8014c8e6439c56f14a5c1e8cb765068d90