Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 513756 - www-client/firefox-30 - memory leak when playing HTML 5 videos
Summary: www-client/firefox-30 - memory leak when playing HTML 5 videos
Status: RESOLVED DUPLICATE of bug 494282
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-19 06:38 UTC by xiando
Modified: 2014-06-23 09:21 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description xiando 2014-06-19 06:38:07 UTC
1) "Upgrade" to Firefox 30
2) Don't have flash garbage
3) Go you Youtube and play a video. The video is now played using HTML5 due to no flash
4) Watch Firefox use all your memory until there is no more memory available within a minute.

We are not talking a minor memory leak, if you have 8 GB of RAM then FF will use it up within minutes and it will then try to use all your swap.

Playing 20 minutes of 4minutes new video "Thank You" https://www.youtube.com/watch?v=0WGDBzBzqKM in a brand new fresh Firefox 30 instance made it's memory usage go to 1.5 GB. Playing the whole song is impossible as the system starts swapping like crazy way before the song is through.

I compiled the www-client/firefox 30.0 with "alsa dbus gstreamer jit libnotify minimal" and CFLAGS="-march=core-avx2 -O2 -pipe".

Firefox 30 is masked, just filing a bug to let the Gentoo team that maintains FF know that FF 30 has rather big memory leak when playing HTML5 videos.

This should be easy to reproduce, just install the FF30 and play a HTML5 video. It happens every time. A solution is to use FF 24.6.0 or FF 29.0.1.

Reproducible: Always
Comment 1 xiando 2014-06-19 06:39:10 UTC
I see I wrote "Playing 20 minutes", actually 1.5GB memory is consumed by playing 20 _seconds_
Comment 2 Kolan Sh. 2014-06-19 07:25:47 UTC
I can confirm the bug. The workaround is USE='-gstreamer' emerge -1 firefox. But then H.264 won't be available on YouTube.

As I understand it the problem in GStreamer 1.0 (>=firefox-30.0 uses new version of GStreamer) or is how Firefox uses it.

I've rebuild whole the world (emerge -e @world) with {C,CXX}FLAGS="-O2 -pipe -march=native" also I've rebuild firefox with minimal lists of flags but the bug still remains.

Viewing a video for a few minutes eats 8Gb of available RAM.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-06-19 11:09:23 UTC
Please post your `emerge --info www-client/firefox' output in a comment.
Comment 4 xiando 2014-06-19 13:15:25 UTC
# emerge --info www-client/firefox
Portage 2.2.10 (default/linux/amd64/13.0/desktop, gcc-4.7.3, glibc-2.17, 3.14.5-gentoo-r1 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.14.5-gentoo-r1-x86_64-Intel-R-_Core-TM-_i3-4130_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:     8091608 total,   1329816 free
KiB Swap:  117043192 total, 116728188 free
Timestamp of tree: Mon, 16 Jun 2014 10:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.3.3
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo gamerlay betagarden multimedia roslin sunrise flow bitcoin local
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core-avx2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=" --quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distcc ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirror.mdfnet.se/gentoo"
LDFLAGS="-Wl,--as-needed"
MAKEOPTS="-j12"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/gamerlay /var/lib/layman/betagarden /var/lib/layman/multimedia /var/lib/layman/roslin /var/lib/layman/sunrise /var/lib/layman/flow /var/lib/layman/bitcoin /usr/local/portage/xiando"
USE="X a52 aac aacplus accessibility acpi adplug aften airplay alsa amd64 amr ao audiofile auto-hinter avahi avx avx2 bash-completion berkdb bittorrent bluetooth bluray bonjour branding bzip2 cairo cdda cdio cdr cdrkit cdrtools celt chm clang cli clutter consolekit corefonts cracklib crypt cryptsetup css cue cups curl cxx dbus dc1394 dirac djbfft djvu doc doomsday dri dts dv dvd dvdr dvi ebook emboss emerald emovix encode epos exif faac faad fam festival ffmpeg firefox flac flite fontconfig fortran fpx freedoom fts3 gallium gcrypt gdbm geoip geolocation gif gimp glamor glitz gmp gnome-keyring gpg gphoto2 gpm graphviz groupwise gsm gstreamer gtk gusb handbook hddtemp heretic hexen html icecast iceweasel iconv icu idn ieee1394 ilbc imagemagick imap inotify ipv6 java jbig jemalloc joystick jpeg jpeg2k kate kde kdrive kipi kqemu lame laptop lcms libass libmms libnotify libsamplerate libsoxr libtiger llvm lm_sensors lxde lzma lzo mad maps matroska mbrola mdnsresponder-compat mjpeg mmap mms mmx mng mobi mod modplug modules moznoirc moznomail mp3 mp4 mpeg mplayer msn mtp multilib multimedia musepack mysql nautilus ncurses nls nptl nsplugin objc objc++ ocr odf offensive ogg ogv openal opencl openexr opengl openmax openmp opus oscar otr pam pango pcre pdf perl png policykit portaudio ppds projectm python qemu-ifup qt3support qt4 r600-llvm-compiler radeon radeonsi raw rdp readline resources restrict-javascript rfc3779 rtmp rtsp samba scanner schroedinger sdl semantic-desktop sendto session shout sid skins slp sndfile snowberry sox speex spell sql sqlite srtp sse sse2 sse4 sse4_2 ssl ssse3 startup-notification stream subtitles svg taglib tcpd theora threads thumbnail thunar tiff truetype tta twolame udev udisks unicode upnp upower usb utp v4l v4l2 vcd vcdinfo vcdx vdpau vhook video vlm vnc vorbis vpx wavpack webgl webkit webp wmf wxwidgets x264 xcb xcomposite xine xinerama xml xmp xnest xorg xpm xrandr xspf xulrunner xv xvid xvmc yahoo yv12 zeroconf zip zlib zvbi" ABI_X86="32 64" ALSA_CARDS="emu10k1x sbawe sb16 emu10k1" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="braindump flow karbon krita sheets stage words" CAMERAS="adc65 agfa_cl20 aox ax203 barbie canon casio casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z template toshiba toshiba_pdrm11 topfield jl2005c" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse synaptics joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US en_GB nb no nn sv nb_NO af be bg br ca cs cy da de el eo es et fi fo fr ga gl he hr is it nl pl pt ro ru sk sl sr uk vi sv_SE nn_NO ja zh_CN eu" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="radeon radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

www-client/firefox-30.0 was built with the following:
USE="alsa dbus gstreamer jit libnotify minimal -bindist -custom-cflags -custom-optimization -debug -hardened (-pgo) (-pulseaudio) (-selinux) -startup-notification -system-cairo -system-icu -system-jpeg -system-sqlite -test -wifi" LINGUAS="en_GB eu nb_NO nn_NO sv_SE -af -ar -as -ast -be -bg -bn_BD -bn_IN -br -bs -ca -cs -csb -cy -da -de -el -en_ZA -eo -es_AR -es_CL -es_ES -es_MX -et -fa -fi -fr -fy_NL -ga_IE -gd -gl -gu_IN -he -hi_IN -hr -hu -hy_AM -id -is -it -ja -kk -km -kn -ko -ku -lt -lv -mai -mk -ml -mr -nl -or -pa_IN -pl -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -son -sq -sr -ta -te -th -tr -uk -vi -xh -zh_CN -zh_TW -zu"
CFLAGS="-march=core-avx2 -pipe -mno-avx"
CXXFLAGS="-march=core-avx2 -pipe -mno-avx"
Comment 5 Rafał Mużyło 2014-06-19 14:18:24 UTC
A certain detail is missing to be sure, but most likely is a dupe of bug 494282.
Comment 6 xiando 2014-06-19 15:43:16 UTC
Could easily be a dupe of #494282, these are the package versions I have installed:

media-plugins/gst-plugins-libav 1.1.0_pre20130128-r1
media-video/ffmpeg 2.2.3-r1
media-libs/gstreamer 0.10.36 and 1.2.3

It seems Firefox 30.0 would be using gstreamer 1.2.3 and previous versions 0.10.36. These are different versions on my system but there is only one media-plugins/gst-plugins-libav package, the "1.1.0_pre20130128-r1" one - so wouldn't they both be using this?

Please let me know if I can provide additional information that would provide an alternative solution to "don't use FF 30.0".
Comment 7 Rafał Mużyło 2014-06-19 16:52:50 UTC
Only point that matter here is 'media-video/ffmpeg 2.2.3-r1' (though I find it strange you're using 1.1.0_pre20130128, instead at least 1.2.0).

*** This bug has been marked as a duplicate of bug 494282 ***
Comment 8 Rafał Mużyło 2014-06-19 16:56:36 UTC
The solution obviously is: till gstreamer 1.4 arrives, stick to media-video/ffmpeg-1.2.6.

It shouldn't take that long, given some of upstream posts.
Comment 9 EoD 2014-06-23 09:21:17 UTC
(In reply to Rafał Mużyło from comment #8)
> The solution obviously is: till gstreamer 1.4 arrives, stick to
> media-video/ffmpeg-1.2.6.
> 
> It shouldn't take that long, given some of upstream posts.

There is a fix for gstreamer 1.2.4 in an overlay:
https://git.backbone.ws/portage/overlay/commit/db91af191d71c3829af0b9fa1c2e7c54ad1f029f