updater crashes when a cash update introduces a new package dependency

Bug #1295437 reported by Harald Sitter on 2014-03-21
This bug affects 2 people
Affects Status Importance Assigned to Milestone
muon (Ubuntu)
Rohan Garg

Bug Description

updater crashes when a cash update introduces a new package dependency

Download full text (9.6 KiB)

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=0x7fffc7e4...


*** This bug has been marked as a duplicate of bug 325109 ***

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

Created attachment 85093
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)

*** This bug has been marked as a duplicate of bug 325109 ***

Changed in muon:
importance: Unknown → High
Rohan Garg (rohangarg) on 2014-04-14
Changed in muon (Ubuntu):
assignee: nobody → Rohan Garg (rohangarg)

I can't reproduce the crash with muon-updater 2.2.0

Harald, can you check if it's fixed as Rohan suggested?

Changed in muon:
status: Unknown → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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