memory consumption issues when downloading large files

Bug #1248225 reported by Liviu Andronic
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Midori Web Browser
New
Undecided
Unassigned

Bug Description

For several releases now I've been encountering memory consumption issues with Midori when downloading large files. Consider the following test-case:
1. open a fresh midori profile with: midori -c /tmp/
2. copy URL then paste&proceed to download a 882MB file: http://ftp.tu-chemnitz.de/pub/linux/ubuntu-cdimage/xubuntu/releases/saucy/release/xubuntu-13.10-desktop-amd64.iso
3. wait until the download finishes
4. close Midori

Here's what I can see on the command-line:
liv@malou-laptop:~$ midori -c /tmp/
WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-LWWswe/pkcs11: No such file or directory

(midori4:3354): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.32.4/./gobject/gsignal.c:2459: signal `context-menu' is invalid for instance `0x22264010'
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1ubuntu0.12.04.2)
OpenJDK Server VM (build 20.0-b12, mixed mode)

** (midori4:3354): CRITICAL **: void webkit_download_start(WebKitDownload*): assertion `priv->timer == NULL' failed

Admittedly I'm no expert in measuring RAM usage for programs, but here's what I notice in xfce4-taskmanager:
0. Before opening Midori, memory usage on my Xubuntu Precise with Xfce 4.12 was at 405MB and 0MB for swap usage.
1. After opening Midori, memory usage increased to 415MB and Midori itself registered 31MB of RAM.
2. Immediately after triggering the download dialogue, for some reason Midori accesses OpenJDK and at the same time memory consumption for Midori jumps to ~76MB.
3. While the file downloads, notice how Midori and system memory usage increases progressively. After the download finished, Midori registered 1625MB of memory consumption and the system was at 1809MB of RAM + 418MB of swap.
4. Close Midori, then 'swapoff -a / swapon -a' and system memory consumption reverted to ~405MB.

The trouble is that this issue prevents many browsing use cases. Once you download a biggish file, and sometimes even 2-300MB is sufficient, you may easily saturate the system memory usage and it requires you to restart Midori. Same holds for watching videos in streaming, etc., and this is why I think that this report is somewhat related to Bug #1153772 . A lot of swapping and frequent restarts is one of the reasons why I cannot use Midori regularly. Sometimes I can clearly detect memory leaks, but that's something for a different report.

===
Version numbers in brackets show the version used at runtime.

Command line midori -c /tmp/
Midori midori-0.5.5 ((null))
GTK+ 2.24.10 (2.24.10) Glib 2.32.3 (2.32.4)
WebKitGTK+ 1.8.3 (1.8.3) libSoup 2.38.1
cairo 1.10.2 (1.10.2) libnotify 0.7.5
gcr No granite No
single instance libunique 1.1.6
Platform X11; Linux i686
Identification Mozilla/5.0 (X11; Linux) AppleWebKit/535.22 (KHTML, like Gecko) Chrome/18.0.1025.133 Safari/535.22 Midori/0.5
Video Formats H264 [x] Ogg Theora [x] WebM [x]

Netscape Plugins:

IcedTea-Web Plugin (using IcedTea-Web 1.2.3 (1.2.3-0ubuntu0.12.04.3)) The IcedTea-Web Plugin executes Java applets.
Shockwave Flash Shockwave Flash 11.2 r202

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.