Closed Bug 1193520 Opened 9 years ago Closed 7 years ago

Linux Flash videos stop playing without mouse move

Categories

(Core Graveyard :: Plug-ins, defect)

40 Branch
x86
Linux
defect
Not set
normal

Tracking

(e10s-, firefox40 ?)

RESOLVED INCOMPLETE
Tracking Status
e10s - ---
firefox40 --- ?

People

(Reporter: newsmails, Unassigned)

References

()

Details

(Keywords: flashplayer, regression)

Attachments

(4 files)

User Agent: Mozilla/5.0 (X11; Linux i686; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1
Build ID: 20150321194732

Steps to reproduce:

Open this link (live TV in the page) :
http://pluzz.francetv.fr/france3

It is the same with all the videos on this site.
I have the problem on other sites too.


Actual results:

The video freeze after 10" or 30". Only the sound works. Then it restarts or wait again for the video. And restarts.
It seems it works some seconds then read only the sound in a cache and then read some seconds the full stream...

If I move the mouse on the page then the video works. If I stop the mouse the video stops.
It seems that onMouseMove events keep the video alive...

There is no problem when the video is in full screen.

*** I have installed firefox-39.0.3 again : I have no more problem ***

I use the latest Flash plugin on Linux : 11.2.202.508 (idem with the previous one 11.2.202.491)
My linux :  kernel 4.0.0 SMP PREEMPT - i686 AMD Athlon(tm) II X2 245 Processor AMD GNU/Linux


Expected results:

The video should play...
OS: Unspecified → Linux
Hardware: Unspecified → x86
Thanks for the detailed bug report! The information you've provided is very helpful. :)

So you saw the problem with both Flash versions 11.2.202.491 and 11.2.202.508, but only when using Firefox 40?

It sounds like this is a regression in Firefox 40 related to NPAPI plugins. Reading through Firefox 40's release notes, I see a note about "NPAPI Plug-in performance improved via asynchronous initialization" (bug 998863):

https://www.mozilla.org/en-US/firefox/40.0/releasenotes/

Can you please retest the video after changing the about:config "dom.ipc.plugins.asyncInit" pref to false and restarting Firefox?

@ Aaron, could this problem be a regression from asyncInit bug 998863?
Blocks: 998863
Component: General → Plug-ins
Flags: needinfo?(aklotz)
> So you saw the problem with both Flash versions 11.2.202.491 and 11.2.202.508, but only when using Firefox 40?

YES

I will do your test this evening at home.
It sounds to me like the event loop is getting stuck somewhere. This doesn't sound like an async init issue but we can try disabling the pref anyway to verify.
Flags: needinfo?(aklotz)
The test :
Setting dom.ipc.plugins.asyncInit to false does not change anything.
Thanks for testing. If you'd like extra credit :) , you can try the "mozregression" script to help find the first Firefox version with the bug. mozregression will automatically download and run Firefox builds to test. It's pretty straightforward.

https://mozilla.github.io/mozregression/

To limit the test range to between Firefox 39 (good) and 40 (bad), you can use command line arguments like this:

mozregression --good-release 39 --bad-release 40 --profile ~/path/to/your/firefox/profile/directory/
I think that I will not be able to install mozregression (my distrib is too old...).
Could you give me a link to the builds ?
Maybe this one : http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/ ?
The first build (in this folder) has the problem :
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/40.0-candidates/build1/linux-i686/fr/
Firefox 40 development in the Nightly channel began on 2015-03-30 and moved to the Aurora channel on 2015-05-11. Here are links to the ftp directories of Firefox 39's Nightly builds for April and May:

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2015/04/
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2015/05/

These directories contain builds for all Firefox channels for those months: Nightly (aka mozilla-central), Aurora, Beta, and Release. You only need test to the Nightly channel builds (firefox-40.0a1.en-US.linux-i686.tar.bz2) in the directories named "2015-04-...-mozilla-central".

mozregression uses a binary search to search from the middle build and work outward. I recommend you take that same approach: test 2015-04-16-03-02-09-mozilla-central first, then proceed to test older or newer builds until you find the first date that has the bug.

If you have questions, feel free to ping me (cpeterson) on Mozilla's IRC server in the #media channel! :)
Yes a question : "moved to the Aurora channel on 2015-05-11"
What does it mean : the name (firefox-40.0a1.en-US.linux-i686.tar.bz2) changes ? The directories changes ?
(In reply to alertesmails from comment #9)
> Yes a question : "moved to the Aurora channel on 2015-05-11"
> What does it mean : the name (firefox-40.0a1.en-US.linux-i686.tar.bz2)
> changes ? The directories changes ?

Yes. Mozilla releases a new version of Firefox every six weeks and the Firefox Nightly channel moves to a new version number. So the day after 2015-05-11, Nightly channel version changed from 40 to 41 and the Aurora (aka Developer Edition) channel changed from 39 to 40. 

You can see that 2015-05-11's Aurora directory has filename "firefox-39.0a2.en-US.linux-i686.tar.bz2":

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2015/05/2015-05-11-00-40-05-mozilla-aurora/

And then 2015-05-12's Aurora directory has filename "firefox-40.0a2.en-US.linux-i686.tar.bz2":

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2015/05/2015-05-12-00-40-26-mozilla-aurora/
Thanks for your explanations.
I hope that I did not stupid things :
2015-05-11 nightly works fine
2015-05-12 aurora has the problem.

Here are details to know if my tests are valid :
- 2015-05-11 nightly firefox-40.0a1.en-US.linux-i686.tar.bz2
  The title bar shows "Nightly"
  It uses may default profile
  It does not change my profile.ini
- 2015-05-12 Aurora firefox-40.0a2.en-US.linux-i686.tar.bz2
  The title bar shows "Firefox Developer Edition"
  It asks at start for a profile (default or dev-edition-default)
  It creates a profile (even when choosing default) and changes the profile.ini

If the "Developer Edition" is the Aurora of the "Nightly" there is no problem.
(In reply to alertesmails from comment #11)
> Thanks for your explanations.
> I hope that I did not stupid things :
> 2015-05-11 nightly works fine
> 2015-05-12 aurora has the problem.
> 
> Here are details to know if my tests are valid :
> - 2015-05-11 nightly firefox-40.0a1.en-US.linux-i686.tar.bz2
>   The title bar shows "Nightly"
>   It uses may default profile
>   It does not change my profile.ini
> - 2015-05-12 Aurora firefox-40.0a2.en-US.linux-i686.tar.bz2
>   The title bar shows "Firefox Developer Edition"
>   It asks at start for a profile (default or dev-edition-default)
>   It creates a profile (even when choosing default) and changes the
> profile.ini
> 
> If the "Developer Edition" is the Aurora of the "Nightly" there is no
> problem.

Thanks! Yes, "Firefox Developer Edition" is the new marketing name for the "Aurora" release channel. The old Aurora name is easier to type and old habits die hard. :)

These test results are a little odd. They suggest the problem appeared on the first release of Aurora 40, whose code should be very similar to the last release of Nightly 40 the previous day (2015-05-11). One difference between the Nightly and Aurora is that "e10s" (the code name for multi-process Firefox) is enabled for testing in Nightly but not in Aurora.

Can you try enabling or disabling the "Enable multi-process Nightly" checkbox in your Aurora 40 build? Perhaps multi-process mode is causing or masking the bug.
Yes the results were odd. So I thought that I used the bad version.

You have found the problem : :)
With "Enable multi-process Nightly"
- disable : there is the problem
- enable : it works well

But there is another big problem (on this old version) when multi-process is enable : adblock does not filter anything (it is enabled but does nothing).

Other strange things not related with this bug :
- I start aurora. I choose to use the created developer profile.
- I enable multi-process ==> firefox says it will restart 
==> it cannot restart :
Linux$ ./firefox/firefox
XPCOMGlueLoad error for file ./firefox/libmozgtk.so:
libgtk-3.so.0: cannot open shared object file: No such file or directory
Couldn't load XPCOM.

I have to extract again from the archive :
Linux$ rm -r ./firefox
Linux$ tar xvfj firefox-40.0a2.en-US.linux-i686.tar.bz2 
Linux$ ./firefox/firefox
==> it works again

After testing enable/disable multi-process with my default profile I have no more this problem : I can enable/disable multi-process with the developer profile... firefox restarts...
(In reply to alertesmails from comment #13)
> Yes the results were odd. So I thought that I used the bad version.
> 
> You have found the problem : :)
> With "Enable multi-process Nightly"
> - disable : there is the problem
> - enable : it works well

Awesome! Thanks for isolating the problem.

@ Jim: since you work with plugins and e10s, can you recommend someone to investigate this regression?


> But there is another big problem (on this old version) when multi-process is
> enable : adblock does not filter anything (it is enabled but does nothing).

Yes. We have some known bugs when using Adblock and e10s. For more details, see bug 930787 and the bugs blocking it.


> Other strange things not related with this bug :
> - I start aurora. I choose to use the created developer profile.
> - I enable multi-process ==> firefox says it will restart 
> ==> it cannot restart :
> Linux$ ./firefox/firefox
> XPCOMGlueLoad error for file ./firefox/libmozgtk.so:
> libgtk-3.so.0: cannot open shared object file: No such file or directory
> Couldn't load XPCOM.
> 
> I have to extract again from the archive :
> Linux$ rm -r ./firefox
> Linux$ tar xvfj firefox-40.0a2.en-US.linux-i686.tar.bz2 
> Linux$ ./firefox/firefox
> ==> it works again
> 
> After testing enable/disable multi-process with my default profile I have no
> more this problem : I can enable/disable multi-process with the developer
> profile... firefox restarts...

I'm not a Linux user, but I assume this is a problem with the way Firefox is trying to restart itself. If you can reproduce this restart problem using an Aurora build downloaded from [1] instead of the build from the ftp server, I recommend filing a new bug report for that issue.

[1] https://www.mozilla.org/en-US/firefox/channel/#developer
tracking-e10s: --- → ?
Flags: needinfo?(jmathies)
Hmm, we don't support e10s in fx40 and we don't allow users to turn it on either AFAIK, plus that option shouldn't be visible in any ui. How did the user get e10s enabled?
Flags: needinfo?(jmathies)
Jim, the Linux plugin problem only happens when e10s is *disabled*.
> How did the user get e10s enabled?
In preferences/General the second check box :
"Enable multi-process Firefox Developer Edition"

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2015/05/2015-05-12-00-40-26-mozilla-aurora/firefox-40.0a2.en-US.linux-i686.tar.bz2
(In reply to Chris Peterson [:cpeterson] from comment #16)
> Jim, the Linux plugin problem only happens when e10s is *disabled*.

Hmm, ok. So from the comments it sounds like the merge from mc to aurora introduced this on aurora, but it wasn't reproducing on nightly prior to that. Sounds like we need some help from qa to see if we can reproduce.
(In reply to Jim Mathies [:jimm] from comment #18)
> Hmm, ok. So from the comments it sounds like the merge from mc to aurora
> introduced this on aurora, but it wasn't reproducing on nightly prior to
> that. Sounds like we need some help from qa to see if we can reproduce.

Yes. The regression happened sometime during Nightly 40, but was masked by e10s being enabled on Nightly. The problem first revealed in Aurora 40 because e10s is disabled there.
OK, that's all very nice.  NOW, what do we non-programmers do to solve the problem besides keep our mouse moving?  I first noticed it when I updated from 39.x to 40.0.2.  

BTW, since this is still listed as 'unconfirmed', I'd like to mention that I know of two other people with the same problem.
I've got the same symptoms, but with HTML5 videos, not Flash.  Is the cause probably the same or should I file a separate bug?
Not a clue.  I can't tell the difference between html5 and flash.  Youtube videos are flash, and they work fine.  Others (frequently news videos) require mouse activity.  Some have used or disabled the 'Youtube All HTML5' extension, with no help.  I installed it, but it made no difference.
I'm following up with QA.
Summary: Linux - Firefox 40 - Flash videos stop without mouse move → Linux Flash videos stop playing without mouse move when e10s is disabled
Excellent, thank you!
Summary: Linux Flash videos stop playing without mouse move when e10s is disabled → Linux Flash videos stop playing without mouse move
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hey guys, thanks to :jimm for pointing me to this bug. I had the same situation and here's how I solved it (works for me, thus far):
> I can confirm that setting layers.offmainthreadcomposition.enabled to false 
>  (in about:config) fixes this for me: no more video freezing requiring 
>  key/mouse input to unfreeze. (browser restart required to take effect!)
src: https://bugzilla.mozilla.org/show_bug.cgi?id=912521#c11

Cheers!
Thanks for the workaround !
It works for me too. It tested with the aurora that I used to find the problem (2015-05-12).

Cool, thanks ! :)
There's another workaround(?) that I can successfully confirm working for me, thanks to the guys over at https://bugs.gentoo.org/show_bug.cgi?id=558150 , for gentoo that is: not using system's cairo lib (aka USE=-system-cairo). In other words I guess this uses the cairo lib that comes with the firefox source. (this for firefox 40.0.2)
This works(for me at least) with the default about:config setting of true for layers.offmainthreadcomposition.enabled
That (the layers.offmainthreadcomposition.enabled = false thing) worked, thanks!
Karl, can I get you to weigh in here as my resident GTK eventloop expert?
Flags: needinfo?(karlt)
I'm not able to reproduce here.

How is cpu usage?  Are any threads are using close to 100% cpu?
If you run top and then press 'h', individual threads are displayed.

The symptoms remind me of
https://bugzilla.mozilla.org/show_bug.cgi?id=1128934#c17 but that should be
fixed by http://hg.mozilla.org/releases/mozilla-release/rev/ec217b5c0645

Check that gfx.xrender.enabled and gfx.content.azure.backends haven't been
changed from their defaults somehow.

http://pluzz.francetv.fr/france3 is using windowless plugins.

offmainthreadcomposition was meant to help with overloaded event loops.
I don't know why it is making it worse here.
Flags: needinfo?(karlt)
Blocks: 994541
No longer blocks: 998863
I can confirm the problem on CentOS 6.4/64-bit; it started with Firefox 40.

It frequently happens on flash videos, but it is not restricted to that. Quite often, pages stop loading until I move the mouse or press a key (even pages without flash).

Unfortunately, it's not reproducible: sometimes it happens and sometimes everything works fine.

I've tried safe mode, clean profiles, disabling hardware acceleration, ... but nothing helps.

CPU usage of firefox is at 0% when it freezes. This definitely looks like an event loop that is stuck until a mouse or keyboard event enters.
(In reply to Karl Tomlinson (ni?:karlt) from comment #30)
> I'm not able to reproduce here.
I've reproduced it on firefox 40.0.3 too (with any/all plugins disabled; not the extensions though) but it seems the the freezes are happening less often lately(even though I had it happen after 1 minute on other videos with same firefox earlier; browser restarts happened since), and I'm on a different gentoo installation(hardened this time; the 40.0.2 firefox was on a normal gentoo) and sometimes it seems that the freezes last a few seconds then recover... hmm.

I don't have Flash and I've never tested it with flash; this is only with html5 videos on youtube.

> 
> How is cpu usage?  Are any threads are using close to 100% cpu?
While video is playing, firefox is around 180% cpu usage, and X is around 36%
then when video is frozen(with sound still playing)  firefox is around 102% and X is at 1%

> If you run top and then press 'h', individual threads are displayed.
(uppercase H for my top version)
With threads(see included screenshots) I see firefox,X and Compositor at around 36% each, and everything else about under 10% (like 10 MediaPl~ack threads, each at about 7-10% cpu usage)
(Socket Thread  is about 40-58% when the video is loading then it's gone.)
When video is frozen, firefox,X and Compositor(unseen in list) are at at most 2% while MediaPlayback threads are still going as they were (at max 11% 3 of them, and the rest under 10%)

> 
> The symptoms remind me of
> https://bugzilla.mozilla.org/show_bug.cgi?id=1128934#c17 but that should be
> fixed by http://hg.mozilla.org/releases/mozilla-release/rev/ec217b5c0645
> 
> Check that gfx.xrender.enabled and gfx.content.azure.backends haven't been
> changed from their defaults somehow.
they are on their defaults, that is:
gfx.xrender.enabled true
gfx.content.azure.backends cairo
> 
> http://pluzz.francetv.fr/france3 is using windowless plugins.
> 
> offmainthreadcomposition was meant to help with overloaded event loops.
> I don't know why it is making it worse here.
Currently had this layers.offmainthreadcomposition.enabled at its default value of true.


The firefox I just tested with was compiled on a hardened gentoo(with grsec) with system-cairo  and this is my emerge --info (if it might be useful):
# emerge --info firefox
Portage 2.2.20.1 (python 3.4.3-final-0, hardened/linux/amd64/no-multilib, gcc-5.2.0, glibc-2.21-r1, 4.1.6-hardened-r1-g45b4b78 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.1.6-hardened-r1-g45b4b78-x86_64-AMD_A6-3400M_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.2
KiB Mem:    10809864 total,   8943576 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 03 Sep 2015 00:45:01 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
ccache version 3.2.3 [enabled]
app-shells/bash:          4.3_p42::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.10::gentoo, 3.4.3::gentoo
dev-util/ccache:          3.2.3::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r3::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.8.5::gentoo, 5.2.0::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.2::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -ggdb -fvar-tracking-assignments -fno-omit-frame-pointer -ftrack-macro-expansion=2 -fstack-protector-all -fPIC"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native -ggdb -fvar-tracking-assignments -fno-omit-frame-pointer -ftrack-macro-expansion=2 -fstack-protector-all -fPIC"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache cgroup collision-protect config-protect-if-modified distlocks downgrade-backup ebuild-locks fakeroot fixlafiles force-mirror installsources ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip parallel-fetch parallel-install prelink-checksums preserve-libs sandbox sfperms split-elog split-log strict unknown-features-warn unmerge-backup unmerge-logs userfetch userpriv usersandbox webrsync-gpg"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.romnet.org/gentoo/ http://tux.rainside.sk/gentoo/ http://de-mirror.org/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ http://www.las.ic.unicamp.br/pub/gentoo/"
INSTALL_MASK="/lib/systemd /lib32/systemd /lib64/systemd /usr/lib/systemd /usr/lib32/systemd /usr/lib64/systemd /etc/systemd"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
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"
USE="3dnow 3dnowext X acl amd64 berkdb bindist btrfs bzip2 cli consolekit cracklib crypt cryptsetup cscope cxx dbus device-mapper dri egl extensions gdbm git gpg gpm gtk3 hardened iconv jpeg justify lock mmx mmxext modules mosh-hardening ncurses nptl openmp pam pax_kernel pcre pie policykit pulseaudio qt4 readline seccomp session sse sse2 sse3 ssl ssp startup-notification strong-security system-icu system-jpeg system-libvpx system-sqlite urandom xattr xcomposite xtpax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 sse3" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard virtualbox evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="virtualbox" XFCE_PLUGINS="brightness clock trash battery power" 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"
USE_PYTHON="2.7"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

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

www-client/firefox-40.0.3::gentoo was built with the following:
USE="bindist dbus egl gstreamer hardened jemalloc3 pulseaudio startup-notification system-cairo system-icu system-jpeg system-libvpx system-sqlite -custom-cflags -custom-optimization -debug (-gmp-autoupdate) -gstreamer-0 -jit -minimal (-neon) (-pgo) (-selinux) -test -wifi" LINGUAS="-af -ar -as -ast -be -bg -bn_BD -bn_IN -br -bs -ca -cs -cy -da -de -el -en_GB -en_ZA -eo -es_AR -es_CL -es_ES -es_MX -et -eu -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 -lt -lv -mai -mk -ml -mr -nb_NO -nl -nn_NO -or -pa_IN -pl -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv_SE -ta -te -th -tr -uk -vi -xh -zh_CN -zh_TW"
CFLAGS="-pipe -march=native -ggdb -fno-omit-frame-pointer -fstack-protector-all -fPIC"
CXXFLAGS="-pipe -march=native -ggdb -fno-omit-frame-pointer -fstack-protector-all -fPIC"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,relro,-z,now"


My system cairo:
x11-libs/cairo-1.14.2::gentoo was built with the following:
USE="X glib svg (-aqua) -debug (-directfb) (-gles2) -opengl -static-libs -valgrind -xcb -xlib-xcb"
CFLAGS="-O2 -pipe -march=native -ggdb -fvar-tracking-assignments -fno-omit-frame-pointer -ftrack-macro-expansion=2 -fstack-protector-all"
CXXFLAGS="-O2 -pipe -march=native -ggdb -fvar-tracking-assignments -fno-omit-frame-pointer -ftrack-macro-expansion=2 -fstack-protector-all"
(In reply to Karl Tomlinson (ni?:karlt) from comment #30)
> The symptoms remind me of
> https://bugzilla.mozilla.org/show_bug.cgi?id=1128934#c17 but that should be
> fixed by http://hg.mozilla.org/releases/mozilla-release/rev/ec217b5c0645
If I add this NS_WARNING like so:

void
X11BasicCompositor::EndFrame()
{
  BasicCompositor::EndFrame();
  XFlush(DefaultXDisplay());
  NS_WARNING("XFlush(DefaultXDisplay())");
}


shouldn't I be seeing its output on console? because I don't see it... and I'm sure it got into the source code, maybe this EndFrame doesn't actually get called? or perhaps I'm missing something else...

NS_WARNING - "Shows a warning on the console (stderr) and in debug logs (NSPR logging)." src: https://developer.mozilla.org/en-US/docs/NS_WARNING

Any ideas?
Nical, does this bug look like Linux compositor issue? I had assumed it was a plugin bug until I read Emanuel's analysis.
Flags: needinfo?(nical.bugzilla)
(In reply to Emanuel Czirai from comment #33)
> void
> X11BasicCompositor::EndFrame()
> {
>   BasicCompositor::EndFrame();
>   XFlush(DefaultXDisplay());
>   NS_WARNING("XFlush(DefaultXDisplay())");
> }
> 
> 
> shouldn't I be seeing its output on console? because I don't see it... and
> I'm sure it got into the source code, maybe this EndFrame doesn't actually
> get called?

If this EndFrame is not called, then that would explain the bug, but NS_WARNING produces output only in debug builds.  If this is not built with --enable-debug, then change to a (f)printf.
Emanuel's issues may have a different cause to those reported in comment 0, because Mozilla builds do not use system cairo.
(In reply to Karl Tomlinson (ni?:karlt) from comment #35)
> If this EndFrame is not called, then that would explain the bug, but
> NS_WARNING produces output only in debug builds.  If this is not built with
> --enable-debug, then change to a (f)printf.

It was definitely without --enable-debug

I put a fprintf, and I can confirm that it shows, EXCEPT when the video is frozen, although the freezing seems to recover after a few seconds lately* and so is the fprintf, in sync with it. 

 *first time the video freezes, it lasts like 6 seconds and recovers on its own, then a few seconds(or minutes) later freezes again and recovers after 2 sec, then it takes lots of minutes before it freezes again, apparently.

I was using the git version of system cairo now, which seems to be why it takes more time before the video freezing occurs (it was happening like every 1 minute in 40.0.2 firefox with system-cairo 1.14.2). I remember trying git system cairo with 40.0.2 and the freezes were happening much rarely than with 1.14.2 cairo. I think that both 40.0.3 and git system cairo decreased their occurrence.

I set --enable-debug (USE=debug) for the future, just in case I see something interesting. But it crashed on startup (unrelated): https://bugzilla.mozilla.org/show_bug.cgi?id=994859#c12
So I have to turn it off in order to have a usable browser I guess.

(In reply to Karl Tomlinson (ni?:karlt) from comment #36)
> Emanuel's issues may have a different cause to those reported in comment 0,
> because Mozilla builds do not use system cairo.

"Using system cairo is at your own risk. We'll take fixes but are not likely to spend anytime investigating." src: https://bugzilla.mozilla.org/show_bug.cgi?id=1200934#c5
I managed to catch it freezing for more than 1 minute multiple times since then. It wouldn't recover automatically.
And that XFlush(DefaultXDisplay()) doesn't get called, the fprintf stops printing until unfrozen(by moving mouse for example)

While frozen 'top' shows just as I mentioned before(see screenshots included earlier), with the following exception: Normally the firefox(thread?) is at 1% or something, while frozen, but I've seen it once now(see screenshot included) have around 20% and being on top of those MediaPlayback ones which were at around 10-12%.
Attachment #8657040 - Attachment mime type: text/plain → application/x-tar
Attached patch printf-endframeSplinter Review
Could be that something fails in LayerManagerComposite::Render and we return before calling EndFrame, or Render is not called at all for some reason (perhaps we don't properly invalidate regions of the window causing us to skip composition?).

Could you try a build with this patch applied? It doesn't attempt to fix the issue but ads some logging to see what code paths gets executed around EndFrame

The log should get spammed with some of these printfs, I am interested in which of them you see when the freeze is happening.
Flags: needinfo?(nical.bugzilla)
Flags: needinfo?(zazdxscf+bugzilla.mozilla.org)
I had to change the patch a little to apply cleanly on 40.0.3, compiling as we speak...

All output stops when video is frozen.
So I thought maybe you want to know what were the last lines before the output stopped:
Sometimes is this(when it recovers after a few more seconds(like 20)):
 -- EndFrame
LayerManagerComposite::EndTransaction
LayerManagerComposite::EndTransaction
LayerManagerComposite::Render
 -- Empty bounds

also:
LayerManagerComposite::EndTransaction
LayerManagerComposite::Render
 -- EndFrame
LayerManagerComposite::EndTransaction
LayerManagerComposite::Render
 -- EndFrame

also:
LayerManagerComposite::EndTransaction
LayerManagerComposite::Render
 -- EndFrame


Sometimes is this (when it doesn't recover):
 -- EndFrame
LayerManagerComposite::EndTransaction
LayerManagerComposite::Render
 -- EndFrame

also:
 -- EndFrame
LayerManagerComposite::EndTransaction
LayerManagerComposite::EndTransaction
LayerManagerComposite::Render
 -- EndFrame

I don't think these matter though.
Flags: needinfo?(zazdxscf+bugzilla.mozilla.org)
See Also: → 1199214
Resolving old bugs which are likely not relevant any more, since NPAPI plugins are deprecated.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: