Application: muon-discover (2.1.2) KDE Platform Version: 4.12.1 Qt Version: 4.8.6 Operating System: Linux 3.13.0-5-generic x86_64 Distribution: Ubuntu Trusty Tahr (development branch) -- Information about the crash: - What I was doing when the application crashed: I uninstalling some applications, next i installed vlc, meanwhile we browsed trought apllications and moun crash - Unusual behavior I noticed: - Custom settings of the application: -- Backtrace: Application: Descoperire Muon (muon-discover), signal: Segmentation fault Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Current thread is 1 (Thread 0x7f419ba07800 (LWP 7169))] Thread 5 (Thread 0x7f417f120700 (LWP 7170)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185 #1 0x00007f41951dbffb in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4 #2 0x00007f41951dc039 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4 #3 0x00007f418d5848f4 in ?? () from /usr/lib/nvidia-304/libGL.so.1 #4 0x00007f41915a2182 in start_thread (arg=0x7f417f120700) at pthread_create.c:312 #5 0x00007f41986d1b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Thread 4 (Thread 0x7f40fdcf0700 (LWP 7171)): #0 0x00007f41986c474d in poll () at ../sysdeps/unix/syscall-template.S:81 #1 0x00007f41910c8d34 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007f41910c8e3c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007f4198e4c836 in QEventDispatcherGlib::processEvents (this=0x7f40f80008f0, flags=...) at kernel/qeventdispatcher_glib.cpp:427 #4 0x00007f4198e1e09f in QEventLoop::processEvents (this=this@entry=0x7f40fdcefce0, flags=...) at kernel/qeventloop.cpp:149 #5 0x00007f4198e1e395 in QEventLoop::exec (this=this@entry=0x7f40fdcefce0, flags=...) at kernel/qeventloop.cpp:204 #6 0x00007f4198d1ac4f in QThread::exec (this=this@entry=0x18b2cd0) at thread/qthread.cpp:537 #7 0x00007f4198dff813 in QInotifyFileSystemWatcherEngine::run (this=0x18b2cd0) at io/qfilesystemwatcher_inotify.cpp:265 #8 0x00007f4198d1d31f in QThreadPrivate::start (arg=0x18b2cd0) at thread/qthread_unix.cpp:349 #9 0x00007f418d5848f4 in ?? () from /usr/lib/nvidia-304/libGL.so.1 #10 0x00007f41915a2182 in start_thread (arg=0x7f40fdcf0700) at pthread_create.c:312 #11 0x00007f41986d1b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Thread 3 (Thread 0x7f40f2f86700 (LWP 7174)): #0 0x00007f41986c2e4d in read () at ../sysdeps/unix/syscall-template.S:81 #1 0x00007f418d5838dc in ?? () from /usr/lib/nvidia-304/libGL.so.1 #2 0x00007f418af3cbf7 in ?? () from /usr/lib/nvidia-304/tls/libnvidia-tls.so.304.117 #3 0x00007f4191108950 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #4 0x00007f41910c8864 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007f41910c8ccb in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #6 0x00007f41910c8e3c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #7 0x00007f4198e4c836 in QEventDispatcherGlib::processEvents (this=0x7f40ec0008f0, flags=...) at kernel/qeventdispatcher_glib.cpp:427 #8 0x00007f4198e1e09f in QEventLoop::processEvents (this=this@entry=0x7f40f2f85d20, flags=...) at kernel/qeventloop.cpp:149 #9 0x00007f4198e1e395 in QEventLoop::exec (this=this@entry=0x7f40f2f85d20, flags=...) at kernel/qeventloop.cpp:204 #10 0x00007f4198d1ac4f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:537 #11 0x00007f4198d1d31f in QThreadPrivate::start (arg=0x1f1ef10) at thread/qthread_unix.cpp:349 #12 0x00007f418d5848f4 in ?? () from /usr/lib/nvidia-304/libGL.so.1 #13 0x00007f41915a2182 in start_thread (arg=0x7f40f2f86700) at pthread_create.c:312 #14 0x00007f41986d1b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Thread 2 (Thread 0x7f40f214d700 (LWP 7175)): #0 0x00007f41915a57ee in __pthread_mutex_unlock_usercnt (decr=1, mutex=0x7f40e4000a90) at pthread_mutex_unlock.c:57 #1 __GI___pthread_mutex_unlock (mutex=0x7f40e4000a90) at pthread_mutex_unlock.c:310 #2 0x00007f41911096d1 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007f41910c83d0 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #4 0x00007f41910c8c53 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007f41910c8e3c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #6 0x00007f4198e4c836 in QEventDispatcherGlib::processEvents (this=0x7f40e40008f0, flags=...) at kernel/qeventdispatcher_glib.cpp:427 #7 0x00007f4198e1e09f in QEventLoop::processEvents (this=this@entry=0x7f40f214cd20, flags=...) at kernel/qeventloop.cpp:149 #8 0x00007f4198e1e395 in QEventLoop::exec (this=this@entry=0x7f40f214cd20, flags=...) at kernel/qeventloop.cpp:204 #9 0x00007f4198d1ac4f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:537 #10 0x00007f4198d1d31f in QThreadPrivate::start (arg=0x1aaf000) at thread/qthread_unix.cpp:349 #11 0x00007f418d5848f4 in ?? () from /usr/lib/nvidia-304/libGL.so.1 #12 0x00007f41915a2182 in start_thread (arg=0x7f40f214d700) at pthread_create.c:312 #13 0x00007f41986d1b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 Thread 1 (Thread 0x7f419ba07800 (LWP 7169)): [KCrash Handler] #6 0x00007f40f0aef14f in FindPkg (this=0x0, Name=...) at /usr/include/apt-pkg/depcache.h:348 #7 QApt::Backend::package (this=this@entry=0x1efc250, name=...) at /build/buildd/qapt-2.0.65/src/backend.cpp:341 #8 0x00007f40f0aef227 in QApt::Backend::package (this=0x1efc250, name=...) at /build/buildd/qapt-2.0.65/src/backend.cpp:334 #9 0x00007f40e27e0e3f in Application::package (this=this@entry=0x7f40d49beef0) at /build/buildd/muon-2.1.2/libmuon/backends/ApplicationBackend/Application.cpp:137 #10 0x00007f40e27e954e in ReviewsBackend::fetchReviews (this=0x20f3300, res=<optimized out>, page=1) at /build/buildd/muon-2.1.2/libmuon/backends/ApplicationBackend/ReviewsBackend.cpp:178 #11 0x00007f419b615638 in ReviewsModel::fetchMore (this=0x649fec0, parent=...) at /build/buildd/muon-2.1.2/libmuon/ReviewsBackend/ReviewsModel.cpp:132 #12 0x00007f419b6149f1 in ReviewsModel::restartFetching (this=0x649fec0) at /build/buildd/muon-2.1.2/libmuon/ReviewsBackend/ReviewsModel.cpp:122 #13 0x00007f4198e37c0e in QObject::event (this=0x649fec0, e=<optimized out>) at kernel/qobject.cpp:1194 #14 0x00007f4199811e2c in QApplicationPrivate::notify_helper (this=this@entry=0x162ed70, receiver=receiver@entry=0x649fec0, e=e@entry=0x6522e70) at kernel/qapplication.cpp:4567 #15 0x00007f41998184a0 in QApplication::notify (this=this@entry=0x7fffbe1c8bd0, receiver=receiver@entry=0x649fec0, e=e@entry=0x6522e70) at kernel/qapplication.cpp:4353 #16 0x00007f419a51eaaa in KApplication::notify (this=0x7fffbe1c8bd0, receiver=0x649fec0, event=0x6522e70) at ../../kdeui/kernel/kapplication.cpp:311 #17 0x00007f4198e1f4cd in QCoreApplication::notifyInternal (this=0x7fffbe1c8bd0, receiver=receiver@entry=0x649fec0, event=event@entry=0x6522e70) at kernel/qcoreapplication.cpp:953 #18 0x00007f4198e22b2d in sendEvent (event=0x6522e70, receiver=0x649fec0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231 #19 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x15641f0) at kernel/qcoreapplication.cpp:1577 #20 0x00007f4198e22fd3 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1470 #21 0x00007f4198e4cf53 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236 #22 postEventSourceDispatch (s=0x161f7b0) at kernel/qeventdispatcher_glib.cpp:280 #23 0x00007f41910c8b54 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #24 0x00007f41910c8d98 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #25 0x00007f41910c8e3c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #26 0x00007f4198e4c815 in QEventDispatcherGlib::processEvents (this=0x1565af0, flags=...) at kernel/qeventdispatcher_glib.cpp:425 #27 0x00007f41998b3bb6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #28 0x00007f4198e2300f in QCoreApplication::processEvents (flags=...) at kernel/qcoreapplication.cpp:1140 #29 0x00007f40f0afb453 in QApt::CacheBuildProgress::Update (this=<optimized out>) at /build/buildd/qapt-2.0.65/src/cache.cpp:34 #30 0x00007f40f07d76fd in OpProgress::OverallProgress(unsigned long long, unsigned long long, unsigned long long, std::string const&) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12 #31 0x00007f40f082ffa7 in pkgCacheGenerator::MakeStatusCache(pkgSourceList&, OpProgress*, MMap**, bool) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12 #32 0x00007f40f0825cee in pkgCacheFile::BuildCaches(OpProgress*, bool) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12 #33 0x00007f40f08260f4 in pkgCacheFile::Open(OpProgress*, bool) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12 #34 0x00007f40f0afb3c3 in ReadOnlyOpen (Progress=<optimized out>, this=<optimized out>) at /usr/include/apt-pkg/cachefile.h:68 #35 QApt::Cache::open (this=<optimized out>) at /build/buildd/qapt-2.0.65/src/cache.cpp:79 #36 0x00007f40f0af6433 in QApt::Backend::reloadCache (this=0x1efc250) at /build/buildd/qapt-2.0.65/src/backend.cpp:176 #37 0x00007f40e27dc3bb in ApplicationBackend::reload (this=0x21081c0) at /build/buildd/muon-2.1.2/libmuon/backends/ApplicationBackend/ApplicationBackend.cpp:167 #38 0x00007f40e27dc7bc in ApplicationBackend::transactionEvent (this=0x21081c0, status=<optimized out>) at /build/buildd/muon-2.1.2/libmuon/backends/ApplicationBackend/ApplicationBackend.cpp:267 #39 0x00007f40e27d8f8b in ApplicationBackend::qt_static_metacall (_o=<optimized out>, _id=<optimized out>, _a=<optimized out>, _c=<optimized out>) at /build/buildd/muon-2.1.2/obj-x86_64-linux-gnu/libmuon/backends/ApplicationBackend/moc_ApplicationBackend.cpp:92 #40 0x00007f4198e33868 in QMetaObject::activate (sender=0x3c3cdb0, m=m@entry=0x7f40f0d339c0 <QApt::Transaction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffbe1c7f60) at kernel/qobject.cpp:3539 #41 0x00007f40f0b1e2e1 in QApt::Transaction::statusChanged (this=<optimized out>, _t1=QApt::FinishedStatus) at /build/buildd/qapt-2.0.65/obj-x86_64-linux-gnu/src/moc_transaction.cxx:291 #42 0x00007f40f0b1144e in QApt::Transaction::updateProperty (this=0x3c3cdb0, type=48841288, variant=...) at /build/buildd/qapt-2.0.65/src/transaction.cpp:518 #43 0x00007f40f0b1e974 in QApt::Transaction::qt_static_metacall (_o=0x3c3cdb0, _c=<optimized out>, _id=<optimized out>, _a=0x7fffbe1c8180) at /build/buildd/qapt-2.0.65/obj-x86_64-linux-gnu/src/moc_transaction.cxx:164 #44 0x00007f4198e33868 in QMetaObject::activate (sender=sender@entry=0x51ba660, m=m@entry=0x7f40f0d33aa0 <OrgKubuntuQaptworkerTransactionInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x7fffbe1c8180) at kernel/qobject.cpp:3539 #45 0x00007f40f0b1f3d6 in OrgKubuntuQaptworkerTransactionInterface::propertyChanged (this=this@entry=0x51ba660, _t1=3, _t2=...) at /build/buildd/qapt-2.0.65/obj-x86_64-linux-gnu/src/moc_transactiondbus.cxx:246 #46 0x00007f40f0b1f77c in OrgKubuntuQaptworkerTransactionInterface::qt_static_metacall (_o=_o@entry=0x51ba660, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=4, _a=_a@entry=0x7fffbe1c8440) at /build/buildd/qapt-2.0.65/obj-x86_64-linux-gnu/src/moc_transactiondbus.cxx:111 #47 0x00007f40f0b200f7 in OrgKubuntuQaptworkerTransactionInterface::qt_metacall (this=0x51ba660, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fffbe1c8440) at /build/buildd/qapt-2.0.65/obj-x86_64-linux-gnu/src/moc_transactiondbus.cxx:164 #48 0x00007f4197bc31f6 in QDBusConnectionPrivate::deliverCall (this=0x1f21790, object=0x51ba660, msg=..., metaTypes=..., slotIdx=9) at qdbusintegrator.cpp:951 #49 0x00007f4198e37c0e in QObject::event (this=0x51ba660, e=<optimized out>) at kernel/qobject.cpp:1194 #50 0x00007f4199811e2c in QApplicationPrivate::notify_helper (this=this@entry=0x162ed70, receiver=receiver@entry=0x51ba660, e=e@entry=0x62c0ca0) at kernel/qapplication.cpp:4567 #51 0x00007f41998184a0 in QApplication::notify (this=this@entry=0x7fffbe1c8bd0, receiver=receiver@entry=0x51ba660, e=e@entry=0x62c0ca0) at kernel/qapplication.cpp:4353 #52 0x00007f419a51eaaa in KApplication::notify (this=0x7fffbe1c8bd0, receiver=0x51ba660, event=0x62c0ca0) at ../../kdeui/kernel/kapplication.cpp:311 #53 0x00007f4198e1f4cd in QCoreApplication::notifyInternal (this=0x7fffbe1c8bd0, receiver=receiver@entry=0x51ba660, event=event@entry=0x62c0ca0) at kernel/qcoreapplication.cpp:953 #54 0x00007f4198e22b2d in sendEvent (event=0x62c0ca0, receiver=0x51ba660) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231 #55 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x15641f0) at kernel/qcoreapplication.cpp:1577 #56 0x00007f4198e22fd3 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1470 #57 0x00007f4198e4cf53 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236 #58 postEventSourceDispatch (s=0x161f7b0) at kernel/qeventdispatcher_glib.cpp:280 #59 0x00007f41910c8b54 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #60 0x00007f41910c8d98 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #61 0x00007f41910c8e3c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #62 0x00007f4198e4c815 in QEventDispatcherGlib::processEvents (this=0x1565af0, flags=...) at kernel/qeventdispatcher_glib.cpp:425 #63 0x00007f41998b3bb6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #64 0x00007f4198e1e09f in QEventLoop::processEvents (this=this@entry=0x7fffbe1c8ae0, flags=...) at kernel/qeventloop.cpp:149 #65 0x00007f4198e1e395 in QEventLoop::exec (this=this@entry=0x7fffbe1c8ae0, flags=...) at kernel/qeventloop.cpp:204 #66 0x00007f4198e23b69 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225 #67 0x00007f419981037c in QApplication::exec () at kernel/qapplication.cpp:3828 #68 0x000000000040b4dc in main (argc=1, argv=0x7fffbe1c8d28) at /build/buildd/muon-2.1.2/discover/main.cpp:86 The reporter indicates this bug may be a duplicate of or related to bug 327406. Possible duplicates by query: bug 328534, bug 327792, bug 327668, bug 327634, bug 327406. Reported using DrKonqi
*** This bug has been marked as a duplicate of bug 327406 ***
Actually this likely is not a duplicate at all. While it results in the same frames as the other bug, it has a completely different wind up.
cache.cpp void Update() { // Evil but Necessary, libapt-pkg not thread safe, afaict QCoreApplication::processEvents(); } so it triggers event processing, which in turn leads to calls inside the qapt::backend which in turn explodes because it is in an inconsistent state there one assumes technically this can crash anywhere, at any time...
Git commit bd2de61727d600f422a192b71433d4eadf4963fa by Harald Sitter. Committed on 29/01/2014 at 01:36. Pushed by sitter into branch 'master'. Revert "Evil but Necessary, libapt-pkg not thread safe, afaict." This reverts commit 362afebca1323573f2b66d557e9c92ab97886ddb. Adhoc testing suggested that there is next to no delay in cache opening, the eventprocessing however essentially causes in-thread-pseudo-threading which can easily cause crashes if the application does not add access guards around QApt::Backend. Should this become a problem in the future again the correct approach would either be to make QApt threadable or thread aptpkg inside Backend itself and introduce appropriate guarding. Please note that it is terribly unlikely for blocking open to cause any problems as muon's initial ::init() is threaded and if an application has issues with initial open they may as well add access guards and thread ::init() to unblock the UI. Subsequent cache opens will just about always hit the disk cache and therefore take no time at all. CCMAIL: echidnaman@kubuntu.org M +1 -11 src/cache.cpp http://commits.kde.org/libqapt/bd2de61727d600f422a192b71433d4eadf4963fa
Moving bug to muon/misc as it still represents an issue inside libmuons' ReviewModel/Backend which checks isFetching, however ReviewBackend's isFetching does not take the ApplicationBackend's isFetching into account. So it is not correctly guarding the QApt::Backend from accesses during init().
http://quickgit.kde.org/?p=muon.git&a=commit&h=b9e1b1103474810b308794b58a775b508a279d44 This commit should fix the bug, please re-open if it's not the case.
*** Bug 327626 has been marked as a duplicate of this bug. ***
*** Bug 327030 has been marked as a duplicate of this bug. ***
*** Bug 331055 has been marked as a duplicate of this bug. ***