Bug 330999

Summary: crash when cache update brings in completely new package that must be installed for update
Product: [Applications] Discover Reporter: Alexander <BudnikAV86>
Component: Updates (interactive)Assignee: Aleix Pol <aleixpol>
Status: RESOLVED WORKSFORME    
Severity: crash CC: aleixpol, rohan, sitter
Priority: NOR Keywords: drkonqi, triaged
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: test archive to trigger the bug

Description Alexander 2014-02-11 00:30:31 UTC
Application: muon-updater (2.1.2)
KDE Platform Version: 4.11.5
Qt Version: 4.8.4
Operating System: Linux 3.11.0-15-generic x86_64
Distribution: Ubuntu 13.10

-- Information about the crash:
- What I was doing when the application crashed:
I had installed recent updates for some apps and after installation Muon crushes.

-- Backtrace:
Application: Muon Update Manager (muon-updater), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f5b71b537c0 (LWP 2688))]

Thread 2 (Thread 0x7f5b5eb85700 (LWP 2689)):
#0  0x00007fffc7e85a2f in clock_gettime ()
#1  0x00007f5b6f1d196d in clock_gettime (clock_id=<optimized out>, tp=<optimized out>) at ../sysdeps/unix/clock_gettime.c:115
#2  0x00007f5b6f85d757 in do_gettime (frac=0x7f5b5eb84b00, sec=0x7f5b5eb84af8) at tools/qelapsedtimer_unix.cpp:123
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#4  0x00007f5b6f936fe5 in updateCurrentTime (this=0x7f5b58002860) at kernel/qeventdispatcher_unix.cpp:354
#5  QTimerInfoList::timerWait (this=0x7f5b58002860, tm=...) at kernel/qeventdispatcher_unix.cpp:461
#6  0x00007f5b6f93582c in timerSourcePrepareHelper (src=<optimized out>, timeout=0x7f5b5eb84bb4) at kernel/qeventdispatcher_glib.cpp:136
#7  0x00007f5b6f9358d5 in timerSourcePrepare (source=<optimized out>, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#8  0x00007f5b6c539d4d in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007f5b6c53a5c3 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007f5b6c53a7ac in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007f5b6f935a76 in QEventDispatcherGlib::processEvents (this=0x7f5b580008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#12 0x00007f5b6f9075ef in QEventLoop::processEvents (this=this@entry=0x7f5b5eb84d70, flags=...) at kernel/qeventloop.cpp:149
#13 0x00007f5b6f9078e5 in QEventLoop::exec (this=this@entry=0x7f5b5eb84d70, flags=...) at kernel/qeventloop.cpp:204
#14 0x00007f5b6f80688f in QThread::exec (this=this@entry=0x279da00) at thread/qthread.cpp:542
#15 0x00007f5b6f8e8d13 in QInotifyFileSystemWatcherEngine::run (this=0x279da00) at io/qfilesystemwatcher_inotify.cpp:265
#16 0x00007f5b6f808f2f in QThreadPrivate::start (arg=0x279da00) at thread/qthread_unix.cpp:338
#17 0x00007f5b6ca12f6e in start_thread (arg=0x7f5b5eb85700) at pthread_create.c:311
#18 0x00007f5b6f1bc9cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7f5b71b537c0 (LWP 2688)):
[KCrash Handler]
#6  0x00007f5b6f0f8f77 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#7  0x00007f5b6f0fc5e8 in __GI_abort () at abort.c:90
#8  0x00007f5b6f7fe912 in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=0x4bf1d88 "ASSERT failure in QList<T>::at: \"index out of range\", file /usr/include/qt4/QtCore/qlist.h, line 469") at global/qglobal.cpp:2347
#9  0x00007f5b6f7fec79 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, msg=msg@entry=0x7f5b6f969aa8 "ASSERT failure in %s: \"%s\", file %s, line %d", ap=ap@entry=0x7fffc7e45738) at global/qglobal.cpp:2393
#10 0x00007f5b6f7ff484 in qFatal (msg=msg@entry=0x7f5b6f969aa8 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qglobal.cpp:2576
#11 0x00007f5b6f7ff4ea in qt_assert_x (where=where@entry=0x7f5b5c6340ac "QList<T>::at", what=what@entry=0x7f5b5c63408a "index out of range", file=file@entry=0x7f5b5c633f70 "/usr/include/qt4/QtCore/qlist.h", line=line@entry=469) at global/qglobal.cpp:2029
#12 0x00007f5b5c60305a in at (i=67725, this=0x2b10668) at /usr/include/qt4/QtCore/qlist.h:469
#13 QApt::Backend::stateChanges (this=<optimized out>, oldState=..., excluded=...) at /build/buildd/qapt-2.0.65/src/backend.cpp:754
#14 0x00007f5b5ceb9fb4 in ApplicationUpdates::calculateUpdates (this=this@entry=0x2b10630) at /build/buildd/muon-2.1.2/libmuon/backends/ApplicationBackend/ApplicationUpdates.cpp:448
#15 0x00007f5b5ceba608 in ApplicationUpdates::fetchingChanged (this=0x2b10630) at /build/buildd/muon-2.1.2/libmuon/backends/ApplicationBackend/ApplicationUpdates.cpp:441
#16 0x00007f5b6f91ca58 in QMetaObject::activate (sender=sender@entry=0x2b0ce30, m=m@entry=0x7f5b7196c180 <AbstractResourcesBackend::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3539
#17 0x00007f5b71746040 in AbstractResourcesBackend::fetchingChanged (this=this@entry=0x2b0ce30) at /build/buildd/muon-2.1.2/obj-x86_64-linux-gnu/libmuon/moc_AbstractResourcesBackend.cpp:156
#18 0x00007f5b5ceabe33 in ApplicationBackend::setFetching (this=0x2b0ce30, f=<optimized out>) at /build/buildd/muon-2.1.2/libmuon/backends/ApplicationBackend/ApplicationBackend.cpp:642
#19 0x00007f5b5ceae463 in ApplicationBackend::reload (this=0x2b0ce30) at /build/buildd/muon-2.1.2/libmuon/backends/ApplicationBackend/ApplicationBackend.cpp:175
#20 0x00007f5b5ceb90f4 in ApplicationUpdates::transactionFinished (this=0x2b10630) at /build/buildd/muon-2.1.2/libmuon/backends/ApplicationBackend/ApplicationUpdates.cpp:210
#21 0x00007f5b6f91ca58 in QMetaObject::activate (sender=0x3dfe830, m=m@entry=0x7f5b5c8459c0 <QApt::Transaction::staticMetaObject>, local_signal_index=local_signal_index@entry=8, argv=argv@entry=0x7fffc7e45c80) at kernel/qobject.cpp:3539
#22 0x00007f5b5c630441 in QApt::Transaction::finished (this=<optimized out>, _t1=QApt::ExitSuccess) at /build/buildd/qapt-2.0.65/obj-x86_64-linux-gnu/src/moc_transaction.cxx:338
#23 0x00007f5b5c6231af in QApt::Transaction::updateProperty (this=0x3dfe830, type=2688, variant=...) at /build/buildd/qapt-2.0.65/src/transaction.cpp:546
#24 0x00007f5b5c630974 in QApt::Transaction::qt_static_metacall (_o=0x3dfe830, _c=<optimized out>, _id=<optimized out>, _a=0x7fffc7e45ea0) at /build/buildd/qapt-2.0.65/obj-x86_64-linux-gnu/src/moc_transaction.cxx:164
#25 0x00007f5b6f91ca58 in QMetaObject::activate (sender=sender@entry=0x2b299e0, m=m@entry=0x7f5b5c845aa0 <OrgKubuntuQaptworkerTransactionInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x7fffc7e45ea0) at kernel/qobject.cpp:3539
#26 0x00007f5b5c6313d6 in OrgKubuntuQaptworkerTransactionInterface::propertyChanged (this=this@entry=0x2b299e0, _t1=11, _t2=...) at /build/buildd/qapt-2.0.65/obj-x86_64-linux-gnu/src/moc_transactiondbus.cxx:246
#27 0x00007f5b5c63177c in OrgKubuntuQaptworkerTransactionInterface::qt_static_metacall (_o=_o@entry=0x2b299e0, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=4, _a=_a@entry=0x7fffc7e46160) at /build/buildd/qapt-2.0.65/obj-x86_64-linux-gnu/src/moc_transactiondbus.cxx:111
#28 0x00007f5b5c6320f7 in OrgKubuntuQaptworkerTransactionInterface::qt_metacall (this=0x2b299e0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fffc7e46160) at /build/buildd/qapt-2.0.65/obj-x86_64-linux-gnu/src/moc_transactiondbus.cxx:164
#29 0x00007f5b6e9b7e36 in QDBusConnectionPrivate::deliverCall (this=0x27a9430, object=0x2b299e0, msg=..., metaTypes=..., slotIdx=9) at qdbusintegrator.cpp:951
#30 0x00007f5b6f920dce in QObject::event (this=0x2b299e0, e=<optimized out>) at kernel/qobject.cpp:1194
#31 0x00007f5b702f9dfc in QApplicationPrivate::notify_helper (this=this@entry=0x25bbe60, receiver=receiver@entry=0x2b299e0, e=e@entry=0x439ad70) at kernel/qapplication.cpp:4567
#32 0x00007f5b70300470 in QApplication::notify (this=this@entry=0x7fffc7e46910, receiver=receiver@entry=0x2b299e0, e=e@entry=0x439ad70) at kernel/qapplication.cpp:4353
#33 0x00007f5b71003a6a in KApplication::notify (this=0x7fffc7e46910, receiver=0x2b299e0, event=0x439ad70) at ../../kdeui/kernel/kapplication.cpp:311
#34 0x00007f5b6f9088bd in QCoreApplication::notifyInternal (this=0x7fffc7e46910, receiver=receiver@entry=0x2b299e0, event=event@entry=0x439ad70) at kernel/qcoreapplication.cpp:946
#35 0x00007f5b6f90be1f in sendEvent (event=0x439ad70, receiver=0x2b299e0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#36 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x258a500) at kernel/qcoreapplication.cpp:1570
#37 0x00007f5b6f90c2c3 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1463
#38 0x00007f5b6f936073 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#39 postEventSourceDispatch (s=0x25bc710) at kernel/qeventdispatcher_glib.cpp:279
#40 0x00007f5b6c53a3b6 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007f5b6c53a708 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#42 0x00007f5b6c53a7ac in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007f5b6f935a55 in QEventDispatcherGlib::processEvents (this=0x258bde0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#44 0x00007f5b7039b9d6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#45 0x00007f5b6f9075ef in QEventLoop::processEvents (this=this@entry=0x7fffc7e46810, flags=...) at kernel/qeventloop.cpp:149
#46 0x00007f5b6f9078e5 in QEventLoop::exec (this=this@entry=0x7fffc7e46810, flags=...) at kernel/qeventloop.cpp:204
#47 0x00007f5b6f90ce5b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#48 0x00007f5b702f834c in QApplication::exec () at kernel/qapplication.cpp:3828
#49 0x000000000040ce11 in main (argc=5, argv=0x7fffc7e46a48) at /build/buildd/muon-2.1.2/updater/main.cpp:59

The reporter indicates this bug may be a duplicate of or related to bug 330615.

Possible duplicates by query: bug 330615, bug 330486, bug 330407, bug 330054, bug 329935.

Reported using DrKonqi
Comment 1 Jekyll Wu 2014-02-11 00:55:47 UTC

*** This bug has been marked as a duplicate of bug 325109 ***
Comment 2 Harald Sitter 2014-02-11 00:59:38 UTC
Actually not a duplicate as such (the reason I know that is because I just hit that crash mysefl :P)

While not obvious from the backtrace this crash is caused by
> void ApplicationUpdates::calculateUpdates()
not being able to resolve the package. The reason it cannot resolve it apparenlty is because ApplicationBackend doesn't refresh m_appList on reload.

How to reproduce:
- install a package foo
- m_appList now contains foo, but not bar
- package gets update that introduces dependency on completely new package bar
- a manual check for new updates is run via muon-updater
- the package cache for the updater now contains both the new foo and the completly new bar, m_appList still only contains foo
- resolution fails and assert fails
Comment 3 Harald Sitter 2014-02-11 01:04:46 UTC
Created attachment 85093 [details]
test archive to trigger the bug

I am attaching a tarball with a simple test archive with two debs and a Packages list that allows the bug to be easily reproduced:

- install kubuntu-docs
- completely update system
- extract tarball somewhere
- edit sources.list and add the following with adjusted path as needed (mind the triple forward slash after file)
> deb file:///home/me/bug330999 ./
- open muon-updater and use ctrl-r to refresh the crash
- observe crash

the tarball contains a fake kubuntu-docs package that depends on the other package (which is not present elsewhere thus not in the cache at startup), the cache refresh will pick up the new fake kubuntu-docs and try to resolve it's depdencies and fail the assert.

(please note that for re-testing you need to delete the extracted directory, apt-get update, and extract it again to make sure the fake packages are gone from the cache)
Comment 4 Jekyll Wu 2014-02-12 15:16:33 UTC

*** This bug has been marked as a duplicate of bug 325109 ***
Comment 5 Rohan Garg 2014-04-15 15:35:56 UTC
I can't reproduce the crash with muon-updater 2.2.0
Comment 6 Aleix Pol 2015-01-14 16:49:16 UTC
Harald, can you check if it's fixed as Rohan suggested?
Comment 7 Andrew Crouthamel 2018-09-25 21:49:29 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Andrew Crouthamel 2018-10-27 02:34:35 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!