Calling cancel() segfaults u-d-m

Bug #1227850 reported by Barry Warsaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-download-manager
Fix Released
Critical
Manuel de la Peña
ubuntu-download-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

One of my tests creates two 40MB files, and starts a download of these two files.

After 1MB has been received, the test calls cancel(). This segfaults the u-d-m process.

Related branches

Revision history for this message
Barry Warsaw (barry) wrote :
Download full text (3.6 KiB)

Core was generated by `ubuntu-download-manager/ubuntu-download-manager -self-signed-certs /home/barry/'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007fdfdfb75be4 in Download::state() ()
   from libubuntudownloadmanager/libubuntudownloadmanager.so.1
(gdb) where
#0 0x00007fdfdfb75be4 in Download::state() ()
   from libubuntudownloadmanager/libubuntudownloadmanager.so.1
#1 0x00007fdfdfb8a201 in GroupDownloadPrivate::cancelDownload() ()
   from libubuntudownloadmanager/libubuntudownloadmanager.so.1
#2 0x00007fdfdfb82472 in DownloadQueue::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
   from libubuntudownloadmanager/libubuntudownloadmanager.so.1
#3 0x00007fdfdf76f066 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4 0x00007fdfdfb76345 in Download::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () from libubuntudownloadmanager/libubuntudownloadmanager.so.1
#5 0x00007fdfdf75398b in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x00007fdfdf757128 in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7 0x00007fdfdfb8b6b1 in GroupDownloadAdaptor::cancel() ()
   from libubuntudownloadmanager/libubuntudownloadmanager.so.1
#8 0x00007fdfdfba9fdd in GroupDownloadAdaptor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
   from libubuntudownloadmanager/libubuntudownloadmanager.so.1
#9 0x00007fdfdfbaa2f3 in GroupDownloadAdaptor::qt_metacall(QMetaObject::Call, int, void**) () from libubuntudownloadmanager/libubuntudownloadmanager.so.1
#10 0x00007fdfde38b0df in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#11 0x00007fdfde38bfe1 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#12 0x00007fdfde38cca3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#13 0x00007fdfde38cd2e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#14 0x00007fdfdf77006e in QObject::event(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007fdfdf74ae5d in QCoreApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007fdfdf74ab8d in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007fdfdf74c367 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007fdfdf78fd13 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007fdfdcfff446 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007fdfdcfff798 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
...

Read more...

Revision history for this message
Manuel de la Peña (mandel) wrote :

Found the issue!!! I need to re-think how I reuse the DownloaQueue within the group downloads, I might go for a simpler implementation for now where downloads are done in parallel in the GroupDownload that way we kill to bugs in one fix.

Changed in ubuntu-download-manager:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Manuel de la Peña (mandel)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-download-manager at revision 131, scheduled for release in ubuntu-download-manager, milestone 0.3

Changed in ubuntu-download-manager:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-download-manager - 0.2+13.10.20130924.2-0ubuntu1

---------------
ubuntu-download-manager (0.2+13.10.20130924.2-0ubuntu1) saucy; urgency=low

  [ Manuel de la Pena ]
  * Ensure that when there is a network error the state of the
    GroupDownload is correctly set. (LP: #1227850, #1227907, #1218031)
  * Provide system dbus API to be used by apps such as the image
    updates. (LP: #1211486)
  * Provide new arg and new method to simplify tests. (LP: #1228233)
  * Ensure that all downloads are canceled and that the files are
    correctly removed. (LP: #1229413)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 135
 -- Ubuntu daily release <email address hidden> Tue, 24 Sep 2013 22:03:24 +0000

Changed in ubuntu-download-manager (Ubuntu):
status: New → Fix Released
Changed in ubuntu-download-manager:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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